Fixed Ballfield

This commit is contained in:
pelya
2011-03-14 19:13:12 +02:00
parent 8fce28ca72
commit 3c12f641d2
2 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -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)