From 6169c3167e5c34019f74de5330ca9a54ca124bb5 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 22 Aug 2010 12:35:34 -0700 Subject: [PATCH] Cleanup from the Android commit --- src/SDL_compat.c | 11 ----------- src/events/SDL_keyboard.c | 6 +++--- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/SDL_compat.c b/src/SDL_compat.c index be7129e41..bb8e46ba8 100644 --- a/src/SDL_compat.c +++ b/src/SDL_compat.c @@ -639,29 +639,18 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags) /* If we're in OpenGL mode, just create a stub surface and we're done! */ if (flags & SDL_OPENGL) { - - printf("1\n"); - SDL_VideoContext = SDL_GL_CreateContext(SDL_VideoWindow); if (!SDL_VideoContext) { return NULL; } - - - printf("2\n"); - if (SDL_GL_MakeCurrent(SDL_VideoWindow, SDL_VideoContext) < 0) { return NULL; } - - printf("3\n"); SDL_VideoSurface = SDL_CreateRGBSurfaceFrom(NULL, width, height, bpp, 0, 0, 0, 0, 0); if (!SDL_VideoSurface) { return NULL; } - - printf("4\n"); SDL_VideoSurface->flags |= surface_flags; SDL_PublicSurface = SDL_VideoSurface; return SDL_PublicSurface; diff --git a/src/events/SDL_keyboard.c b/src/events/SDL_keyboard.c index 56171a1b2..23c85d70d 100644 --- a/src/events/SDL_keyboard.c +++ b/src/events/SDL_keyboard.c @@ -729,7 +729,7 @@ SDL_SendKeyboardKey(Uint8 state, SDL_scancode scancode) break; default: /* Invalid state -- bail */ - return 2; + return 0; } /* Drop events that don't change state */ @@ -738,14 +738,14 @@ SDL_SendKeyboardKey(Uint8 state, SDL_scancode scancode) #if 0 printf("Keyboard event didn't change state - dropped!\n"); #endif - return 3; + return 0; } /* Update internal keyboard state */ keyboard->keystate[scancode] = state; /* Post the event, if desired */ - posted = 4; + posted = 0; if (SDL_GetEventState(type) == SDL_ENABLE) { SDL_Event event; event.key.type = type;