Cleanup from the Android commit
authorSam Lantinga <slouken@libsdl.org>
Sun, 22 Aug 2010 12:35:34 -0700
changeset 4762833a225613e2
parent 4729 1f7ad083fd3c
child 4763 518d1679d2d0
Cleanup from the Android commit
src/SDL_compat.c
src/events/SDL_keyboard.c
     1.1 --- a/src/SDL_compat.c	Sun Aug 22 12:23:55 2010 -0700
     1.2 +++ b/src/SDL_compat.c	Sun Aug 22 12:35:34 2010 -0700
     1.3 @@ -639,29 +639,18 @@
     1.4  
     1.5      /* If we're in OpenGL mode, just create a stub surface and we're done! */
     1.6      if (flags & SDL_OPENGL) {
     1.7 -        
     1.8 -       printf("1\n");
     1.9 -    
    1.10          SDL_VideoContext = SDL_GL_CreateContext(SDL_VideoWindow);
    1.11          if (!SDL_VideoContext) {
    1.12              return NULL;
    1.13          }
    1.14 -
    1.15 -        
    1.16 -    printf("2\n");
    1.17 -    
    1.18          if (SDL_GL_MakeCurrent(SDL_VideoWindow, SDL_VideoContext) < 0) {
    1.19              return NULL;
    1.20          }
    1.21 -        
    1.22 -    printf("3\n");
    1.23          SDL_VideoSurface =
    1.24              SDL_CreateRGBSurfaceFrom(NULL, width, height, bpp, 0, 0, 0, 0, 0);
    1.25          if (!SDL_VideoSurface) {
    1.26              return NULL;
    1.27          }
    1.28 -        
    1.29 -    printf("4\n");
    1.30          SDL_VideoSurface->flags |= surface_flags;
    1.31          SDL_PublicSurface = SDL_VideoSurface;
    1.32          return SDL_PublicSurface;
     2.1 --- a/src/events/SDL_keyboard.c	Sun Aug 22 12:23:55 2010 -0700
     2.2 +++ b/src/events/SDL_keyboard.c	Sun Aug 22 12:35:34 2010 -0700
     2.3 @@ -729,7 +729,7 @@
     2.4          break;
     2.5      default:
     2.6          /* Invalid state -- bail */
     2.7 -        return 2;
     2.8 +        return 0;
     2.9      }
    2.10  
    2.11      /* Drop events that don't change state */
    2.12 @@ -738,14 +738,14 @@
    2.13  #if 0
    2.14          printf("Keyboard event didn't change state - dropped!\n");
    2.15  #endif
    2.16 -        return 3;
    2.17 +        return 0;
    2.18      }
    2.19  
    2.20      /* Update internal keyboard state */
    2.21      keyboard->keystate[scancode] = state;
    2.22  
    2.23      /* Post the event, if desired */
    2.24 -    posted = 4;
    2.25 +    posted = 0;
    2.26      if (SDL_GetEventState(type) == SDL_ENABLE) {
    2.27          SDL_Event event;
    2.28          event.key.type = type;