Fixes for SDL 1.3, the keycodes and invoking from background are broken
This commit is contained in:
@@ -593,10 +593,9 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
if(evt.type == SDL_KEYUP || evt.type == SDL_KEYDOWN)
|
||||
{
|
||||
Uint8 *keys = SDL_GetKeyState(&i);
|
||||
if(keys[SDLK_ESCAPE])
|
||||
if(evt.key.keysym.sym == SDLK_ESCAPE)
|
||||
return 0;
|
||||
__android_log_print(ANDROID_LOG_INFO, "Ballfield", "SDL key event: evt %s state %s key %d RETURN %d mod %d unicode %d", evt.type == SDL_KEYUP ? "UP " : "DOWN" , evt.key.state == SDL_PRESSED ? "PRESSED " : "RELEASED", (int)evt.key.keysym.sym, int(evt.key.keysym.sym == SDLK_RETURN), (int)evt.key.keysym.mod, (int)evt.key.keysym.unicode);
|
||||
__android_log_print(ANDROID_LOG_INFO, "Ballfield", "SDL key event: evt %s state %s key %d scancode %d mod %d unicode %d", evt.type == SDL_KEYUP ? "UP " : "DOWN" , evt.key.state == SDL_PRESSED ? "PRESSED " : "RELEASED", (int)evt.key.keysym.sym, (int)evt.key.keysym.scancode, (int)evt.key.keysym.mod, (int)evt.key.keysym.unicode);
|
||||
}
|
||||
if(evt.type == SDL_VIDEORESIZE)
|
||||
__android_log_print(ANDROID_LOG_INFO, "Ballfield", "SDL resize event: %d x %d", evt.resize.w, evt.resize.h);
|
||||
|
||||
Reference in New Issue
Block a user