aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rw-r--r--backends/events/gph/gph-events.cpp6
-rw-r--r--backends/events/gph/gph-events.h19
-rw-r--r--backends/platform/android/texture.cpp11
3 files changed, 17 insertions, 19 deletions
diff --git a/backends/events/gph/gph-events.cpp b/backends/events/gph/gph-events.cpp
index 8a5bee9b4a..05fd747605 100644
--- a/backends/events/gph/gph-events.cpp
+++ b/backends/events/gph/gph-events.cpp
@@ -122,9 +122,9 @@ enum {
TAPMODE_HOVER = 2
};
-//GPHEventSource::GPHEventSource()
-// : _buttonStateL(false){
-//}
+GPHEventSource::GPHEventSource()
+ : _buttonStateL(false){
+}
//void GPHEventSource::fillMouseEvent(Common::Event &event, int x, int y) {
// if (GPHGraphicsManager::_videoMode.mode == GFX_HALF && !GPHGraphicsManager::_overlayVisible){
diff --git a/backends/events/gph/gph-events.h b/backends/events/gph/gph-events.h
index f929a14113..7672bffed2 100644
--- a/backends/events/gph/gph-events.h
+++ b/backends/events/gph/gph-events.h
@@ -30,8 +30,8 @@
*/
class GPHEventSource : public SdlEventSource {
-//public:
-// GPHEventSource();
+public:
+ GPHEventSource();
protected:
bool _stickBtn[32];
@@ -46,16 +46,11 @@ protected:
*/
void moveStick();
- virtual bool handleKeyDown(SDL_Event &ev, Common::Event &event);
- virtual bool handleJoyButtonDown(SDL_Event &ev, Common::Event &event);
- virtual bool handleJoyButtonUp(SDL_Event &ev, Common::Event &event);
- virtual bool handleMouseButtonDown(SDL_Event &ev, Common::Event &event);
- virtual bool handleMouseButtonUp(SDL_Event &ev, Common::Event &event);
- virtual bool handleJoyAxisMotion(SDL_Event &ev, Common::Event &event);
-
-// void fillMouseEvent(Common::Event &event, int x, int y);
- virtual bool remapKey(SDL_Event &ev, Common::Event &event);
- virtual void SDLModToOSystemKeyFlags(SDLMod mod, Common::Event &event);
+ bool handleJoyButtonDown(SDL_Event &ev, Common::Event &event);
+ bool handleJoyButtonUp(SDL_Event &ev, Common::Event &event);
+ bool handleMouseButtonDown(SDL_Event &ev, Common::Event &event);
+ bool handleMouseButtonUp(SDL_Event &ev, Common::Event &event);
+ bool remapKey(SDL_Event &ev, Common::Event &event);
};
#endif /* BACKEND_EVENTS_GPH_H */
diff --git a/backends/platform/android/texture.cpp b/backends/platform/android/texture.cpp
index 407ba0419d..573f8f83e1 100644
--- a/backends/platform/android/texture.cpp
+++ b/backends/platform/android/texture.cpp
@@ -231,6 +231,8 @@ void GLESTexture::allocBuffer(GLuint w, GLuint h) {
GLESBaseTexture::allocBuffer(w, h);
+ _surface.pitch = w * _pixelFormat.bytesPerPixel;
+
if (_surface.w == oldw && _surface.h == oldh) {
fillBuffer(0);
return;
@@ -243,7 +245,6 @@ void GLESTexture::allocBuffer(GLuint w, GLuint h) {
assert(_pixels);
_surface.pixels = _pixels;
- _surface.pitch = w * _pixelFormat.bytesPerPixel;
fillBuffer(0);
@@ -364,6 +365,8 @@ void GLESPaletteTexture::allocBuffer(GLuint w, GLuint h) {
GLESBaseTexture::allocBuffer(w, h);
+ _surface.pitch = _texture_width;
+
if (_surface.w == oldw && _surface.h == oldh) {
fillBuffer(0);
return;
@@ -375,7 +378,6 @@ void GLESPaletteTexture::allocBuffer(GLuint w, GLuint h) {
assert(_texture);
_surface.pixels = _texture + _paletteSize;
- _surface.pitch = _texture_width;
fillBuffer(0);
@@ -490,6 +492,9 @@ void GLESFakePaletteTexture::allocBuffer(GLuint w, GLuint h) {
GLESBaseTexture::allocBuffer(w, h);
+ _surface.bytesPerPixel = 1;
+ _surface.pitch = w;
+
if (_surface.w == oldw && _surface.h == oldh) {
fillBuffer(0);
return;
@@ -503,8 +508,6 @@ void GLESFakePaletteTexture::allocBuffer(GLuint w, GLuint h) {
// fixup surface, for the outside this is a CLUT8 surface
_surface.pixels = _pixels;
- _surface.bytesPerPixel = 1;
- _surface.pitch = w;
fillBuffer(0);