Commit 66d40ad3 authored by Sam Lantinga's avatar Sam Lantinga

Cleanup from the Android commit

parent a64fc29c
...@@ -639,29 +639,18 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags) ...@@ -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 we're in OpenGL mode, just create a stub surface and we're done! */
if (flags & SDL_OPENGL) { if (flags & SDL_OPENGL) {
printf("1\n");
SDL_VideoContext = SDL_GL_CreateContext(SDL_VideoWindow); SDL_VideoContext = SDL_GL_CreateContext(SDL_VideoWindow);
if (!SDL_VideoContext) { if (!SDL_VideoContext) {
return NULL; return NULL;
} }
printf("2\n");
if (SDL_GL_MakeCurrent(SDL_VideoWindow, SDL_VideoContext) < 0) { if (SDL_GL_MakeCurrent(SDL_VideoWindow, SDL_VideoContext) < 0) {
return NULL; return NULL;
} }
printf("3\n");
SDL_VideoSurface = SDL_VideoSurface =
SDL_CreateRGBSurfaceFrom(NULL, width, height, bpp, 0, 0, 0, 0, 0); SDL_CreateRGBSurfaceFrom(NULL, width, height, bpp, 0, 0, 0, 0, 0);
if (!SDL_VideoSurface) { if (!SDL_VideoSurface) {
return NULL; return NULL;
} }
printf("4\n");
SDL_VideoSurface->flags |= surface_flags; SDL_VideoSurface->flags |= surface_flags;
SDL_PublicSurface = SDL_VideoSurface; SDL_PublicSurface = SDL_VideoSurface;
return SDL_PublicSurface; return SDL_PublicSurface;
......
...@@ -729,7 +729,7 @@ SDL_SendKeyboardKey(Uint8 state, SDL_scancode scancode) ...@@ -729,7 +729,7 @@ SDL_SendKeyboardKey(Uint8 state, SDL_scancode scancode)
break; break;
default: default:
/* Invalid state -- bail */ /* Invalid state -- bail */
return 2; return 0;
} }
/* Drop events that don't change state */ /* Drop events that don't change state */
...@@ -738,14 +738,14 @@ SDL_SendKeyboardKey(Uint8 state, SDL_scancode scancode) ...@@ -738,14 +738,14 @@ SDL_SendKeyboardKey(Uint8 state, SDL_scancode scancode)
#if 0 #if 0
printf("Keyboard event didn't change state - dropped!\n"); printf("Keyboard event didn't change state - dropped!\n");
#endif #endif
return 3; return 0;
} }
/* Update internal keyboard state */ /* Update internal keyboard state */
keyboard->keystate[scancode] = state; keyboard->keystate[scancode] = state;
/* Post the event, if desired */ /* Post the event, if desired */
posted = 4; posted = 0;
if (SDL_GetEventState(type) == SDL_ENABLE) { if (SDL_GetEventState(type) == SDL_ENABLE) {
SDL_Event event; SDL_Event event;
event.key.type = type; event.key.type = type;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment