[Scummvm-cvs-logs] scummvm master -> 70e2c4266b20d09e4bc2d89fcd3d3fba6ddaade9
dhewg
dhewg at wiibrew.org
Thu Mar 17 19:36:53 CET 2011
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
2ea6380040 ANDROID: Plug RGB cursor memleak
23213d23dc ANDROID: Log ASCII code of invalid keycodes
f4fd9e8b50 ANDROID: Fix cursor visibility
82bcddf8da ANDROID: Init vars to match with the defaults
70e2c4266b ANDROID: Get rid of more gfx glitches
Commit: 2ea6380040e934802de2ed65abeb074c98304b4a
https://github.com/scummvm/scummvm/commit/2ea6380040e934802de2ed65abeb074c98304b4a
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-17T11:35:57-07:00
Commit Message:
ANDROID: Plug RGB cursor memleak
Changed paths:
backends/platform/android/gfx.cpp
diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp
index d7e31fc..ec98c35 100644
--- a/backends/platform/android/gfx.cpp
+++ b/backends/platform/android/gfx.cpp
@@ -679,10 +679,13 @@ void OSystem_Android::setMouseCursor(const byte *buf, uint w, uint h,
#ifdef USE_RGB_COLOR
if (format && format->bytesPerPixel > 1) {
- if (_mouse_texture != _mouse_texture_rgb)
+ if (_mouse_texture != _mouse_texture_rgb) {
LOGD("switching to rgb mouse cursor");
- _mouse_texture_rgb = new GLES5551Texture();
+ assert(!_mouse_texture_rgb);
+ _mouse_texture_rgb = new GLES5551Texture();
+ }
+
_mouse_texture = _mouse_texture_rgb;
} else {
if (_mouse_texture != _mouse_texture_palette)
Commit: 23213d23dc51d158321ce22c4cefddf771a3a36f
https://github.com/scummvm/scummvm/commit/23213d23dc51d158321ce22c4cefddf771a3a36f
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-17T11:35:57-07:00
Commit Message:
ANDROID: Log ASCII code of invalid keycodes
Changed paths:
backends/platform/android/events.cpp
diff --git a/backends/platform/android/events.cpp b/backends/platform/android/events.cpp
index 1715e6a..b8e8d8e 100644
--- a/backends/platform/android/events.cpp
+++ b/backends/platform/android/events.cpp
@@ -419,7 +419,7 @@ void OSystem_Android::pushEvent(int type, int arg1, int arg2, int arg3,
}
if (arg2 < 1 || arg2 > ARRAYSIZE(jkeymap)) {
- LOGE("received invalid keycode: %d", arg2);
+ LOGE("received invalid keycode: %d (%d)", arg2, arg3);
return;
}
Commit: f4fd9e8b504a2e49fbd67d288e591377c466760c
https://github.com/scummvm/scummvm/commit/f4fd9e8b504a2e49fbd67d288e591377c466760c
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-17T11:35:58-07:00
Commit Message:
ANDROID: Fix cursor visibility
Changed paths:
backends/platform/android/gfx.cpp
backends/platform/android/texture.h
diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp
index ec98c35..8a03a19 100644
--- a/backends/platform/android/gfx.cpp
+++ b/backends/platform/android/gfx.cpp
@@ -477,7 +477,7 @@ void OSystem_Android::updateScreen() {
GLCALL(_overlay_texture->drawTextureRect());
}
- if (_show_mouse) {
+ if (_show_mouse && !_mouse_texture->isEmpty()) {
GLCALL(glPushMatrix());
const Common::Point &mouse = getEventManager()->getMousePos();
@@ -710,10 +710,8 @@ void OSystem_Android::setMouseCursor(const byte *buf, uint w, uint h,
WRITE_UINT16(_mouse_texture_palette->palette() + keycolor * 2, 0);
}
- if (w == 0 || h == 0) {
- _show_mouse = false;
+ if (w == 0 || h == 0)
return;
- }
if (_mouse_texture == _mouse_texture_palette) {
_mouse_texture->updateBuffer(0, 0, w, h, buf, w);
@@ -730,7 +728,7 @@ void OSystem_Android::setMouseCursor(const byte *buf, uint w, uint h,
delete[] tmp;
- _show_mouse = false;
+ _mouse_texture->allocBuffer(0, 0);
return;
}
diff --git a/backends/platform/android/texture.h b/backends/platform/android/texture.h
index 64489da..9254187 100644
--- a/backends/platform/android/texture.h
+++ b/backends/platform/android/texture.h
@@ -98,6 +98,10 @@ public:
return _surface.pitch;
}
+ inline bool isEmpty() const {
+ return _surface.w == 0 || _surface.h == 0;
+ }
+
inline const Graphics::Surface *surface_const() const {
return &_surface;
}
Commit: 82bcddf8dacb894fe1155ca768df9a072984ef91
https://github.com/scummvm/scummvm/commit/82bcddf8dacb894fe1155ca768df9a072984ef91
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-17T11:35:58-07:00
Commit Message:
ANDROID: Init vars to match with the defaults
The feature flags are set too late, so lets fix that here
Changed paths:
backends/platform/android/android.cpp
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index 4e1373a..483b373 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -109,9 +109,9 @@ OSystem_Android::OSystem_Android(int audio_sample_rate, int audio_buffer_size) :
_mouse_hotspot(),
_mouse_keycolor(0),
_use_mouse_palette(false),
- _fullscreen(false),
_graphicsMode(0),
- _ar_correction(false),
+ _fullscreen(true),
+ _ar_correction(true),
_show_mouse(false),
_show_overlay(false),
_enable_zoning(false),
Commit: 70e2c4266b20d09e4bc2d89fcd3d3fba6ddaade9
https://github.com/scummvm/scummvm/commit/70e2c4266b20d09e4bc2d89fcd3d3fba6ddaade9
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-17T11:35:58-07:00
Commit Message:
ANDROID: Get rid of more gfx glitches
Changed paths:
backends/platform/android/gfx.cpp
diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp
index 8a03a19..5b03af9 100644
--- a/backends/platform/android/gfx.cpp
+++ b/backends/platform/android/gfx.cpp
@@ -286,6 +286,9 @@ void OSystem_Android::initSize(uint width, uint height,
void OSystem_Android::clearScreen(FixupType type, byte count) {
assert(count > 0);
+ bool sm = _show_mouse;
+ _show_mouse = false;
+
GLCALL(glDisable(GL_SCISSOR_TEST));
for (byte i = 0; i < count; ++i) {
@@ -310,6 +313,9 @@ void OSystem_Android::clearScreen(FixupType type, byte count) {
if (!_show_overlay)
GLCALL(glEnable(GL_SCISSOR_TEST));
+
+ _show_mouse = sm;
+ _force_redraw = true;
}
void OSystem_Android::updateScreenRect() {
@@ -592,15 +598,15 @@ void OSystem_Android::showOverlay() {
void OSystem_Android::hideOverlay() {
ENTER();
- clearScreen(kClear);
-
_show_overlay = false;
- _force_redraw = true;
updateEventScale();
warpMouse(_game_texture->width() / 2, _game_texture->height() / 2);
+ // double buffered, flip twice
+ clearScreen(kClearUpdate, 2);
+
GLCALL(glEnable(GL_SCISSOR_TEST));
}
More information about the Scummvm-git-logs
mailing list