diff --git a/ChangeAppSettings.sh b/ChangeAppSettings.sh index 01c31211c..c42e58a6c 100755 --- a/ChangeAppSettings.sh +++ b/ChangeAppSettings.sh @@ -201,7 +201,7 @@ fi if [ -z "$NonBlockingSwapBuffers" -o -z "$AUTO" ]; then echo echo "Application implements Android-specific routines to put to background, and will not draw anything to screen" -echo "between SDL_ACTIVEEVENT->SDL_APPACTIVE lost / gained notifications - you should check for them" +echo "between SDL_ACTIVEEVENT lost / gained notifications - you should check for them" echo -n "rigth after SDL_Flip(), if (n) then SDL_Flip() will block till app in background (y) or (n) ($NonBlockingSwapBuffers): " read var if [ -n "$var" ] ; then diff --git a/project/jni/application/ballfield/ballfield.cpp b/project/jni/application/ballfield/ballfield.cpp index d87fd2862..90630f07f 100644 --- a/project/jni/application/ballfield/ballfield.cpp +++ b/project/jni/application/ballfield/ballfield.cpp @@ -509,11 +509,11 @@ int main(int argc, char* argv[]) SDL_Event evt; while( SDL_PollEvent(&evt) ) { - if(evt.type == (SDL_KEYUP | SDL_KEYDOWN)) + if(evt.type & (SDL_KEYUP | SDL_KEYDOWN)) { Uint8 *keys = SDL_GetKeyState(&i); if(keys[SDLK_ESCAPE]) - break; + return 0; __android_log_print(ANDROID_LOG_INFO, "Ballfield", "SDL key event: state %d key %d mod %d unicode %d", evt.key.state, (int)evt.key.keysym.sym, (int)evt.key.keysym.mod, (int)evt.key.keysym.unicode); } if(evt.type == SDL_VIDEORESIZE)