# HG changeset patch # User Sam Lantinga # Date 1294889609 28800 # Node ID dc9924fc5070307241cdf3863e25db7dc00f7b53 # Parent 397e748d901ae82ced7b56f1f7ff86f9dc49c424 Fixed video mode format for unknown surface format diff -r 397e748d901a -r dc9924fc5070 android-project/src/org/libsdl/app/SDLActivity.java --- a/android-project/src/org/libsdl/app/SDLActivity.java Wed Jan 12 19:33:04 2011 -0800 +++ b/android-project/src/org/libsdl/app/SDLActivity.java Wed Jan 12 19:33:29 2011 -0800 @@ -188,7 +188,7 @@ 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 @@ // 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 @@ 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; }