diff options
author | Sam Lantinga <slouken@libsdl.org> | 2011-01-12 19:33:29 -0800 |
---|---|---|
committer | Sam Lantinga <slouken@libsdl.org> | 2011-01-12 19:33:29 -0800 |
commit | 2a89441cce73386c14ae7b0de93c6995070ee6dd (patch) | |
tree | 5193d4c98b6ec6e0b4fd2032851554caae63404b /android-project | |
parent | 0b56f35597648e2d4e1d7ff7feaa38fb85b12436 (diff) |
Fixed video mode format for unknown surface format
Diffstat (limited to 'android-project')
-rw-r--r-- | android-project/src/org/libsdl/app/SDLActivity.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java index f2a49725c7..85dbcf28cb 100644 --- a/android-project/src/org/libsdl/app/SDLActivity.java +++ b/android-project/src/org/libsdl/app/SDLActivity.java @@ -188,7 +188,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, int format, int width, int height) { //Log.v("SDL", "surfaceChanged()"); - int sdlFormat = 0; + int sdlFormat = 0x85151002; // SDL_PIXELFORMAT_RGB565 by default switch (format) { case PixelFormat.A_8: Log.v("SDL", "pixel format A_8"); @@ -228,6 +228,9 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, // Not sure this is right, maybe SDL_PIXELFORMAT_RGB24 instead? sdlFormat = 0x86161804; // SDL_PIXELFORMAT_RGB888 break; + default: + Log.v("SDL", "pixel format unknown " + format); + break; } SDLActivity.onNativeResize(width, height, sdlFormat); @@ -310,12 +313,12 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, public boolean onKey(View v, int keyCode, KeyEvent event) { if (event.getAction() == KeyEvent.ACTION_DOWN) { - //Log.v("SDL", "key down: " + keyCode); + Log.v("SDL", "key down: " + keyCode); SDLActivity.onNativeKeyDown(keyCode); return true; } else if (event.getAction() == KeyEvent.ACTION_UP) { - //Log.v("SDL", "key up: " + keyCode); + Log.v("SDL", "key up: " + keyCode); SDLActivity.onNativeKeyUp(keyCode); return true; } |