Assorted fixes for NaCl. Hat tip to Sylvain Becker
authorGabriel Jacobo <gabomdq@gmail.com>
Mon, 16 Jun 2014 09:54:33 -0300
changeset 887377ffe680093f
parent 8872 5a6375d96834
child 8874 48d4f2d74d67
Assorted fixes for NaCl. Hat tip to Sylvain Becker
README-nacl.txt
src/video/nacl/SDL_naclvideo.c
src/video/nacl/SDL_naclwindow.c
     1.1 --- a/README-nacl.txt	Mon Jun 16 09:47:23 2014 -0300
     1.2 +++ b/README-nacl.txt	Mon Jun 16 09:54:33 2014 -0300
     1.3 @@ -90,4 +90,5 @@
     1.4  TODO - Known Issues
     1.5  ================================================================================
     1.6  * Testing of all systems with a real application (something other than SDL's tests)
     1.7 +* Key events don't seem to work properly
     1.8  
     2.1 --- a/src/video/nacl/SDL_naclvideo.c	Mon Jun 16 09:47:23 2014 -0300
     2.2 +++ b/src/video/nacl/SDL_naclvideo.c	Mon Jun 16 09:54:33 2014 -0300
     2.3 @@ -139,6 +139,7 @@
     2.4      SDL_VideoData *driverdata = (SDL_VideoData *) _this->driverdata;
     2.5      SDL_DisplayMode mode;
     2.6  
     2.7 +    SDL_zero(mode);
     2.8      mode.format = driverdata->format;
     2.9      mode.w = driverdata->w;
    2.10      mode.h = driverdata->h;
    2.11 @@ -147,8 +148,7 @@
    2.12      if (SDL_AddBasicVideoDisplay(&mode) < 0) {
    2.13          return -1;
    2.14      }
    2.15 -    
    2.16 -    SDL_zero(mode);
    2.17 +
    2.18      SDL_AddDisplayMode(&_this->displays[0], &mode);
    2.19      
    2.20      PSInterfaceInit();
     3.1 --- a/src/video/nacl/SDL_naclwindow.c	Mon Jun 16 09:47:23 2014 -0300
     3.2 +++ b/src/video/nacl/SDL_naclwindow.c	Mon Jun 16 09:54:33 2014 -0300
     3.3 @@ -51,6 +51,9 @@
     3.4      window->flags |= SDL_WINDOW_INPUT_FOCUS;    /* always has input focus */    
     3.5      window->flags |= SDL_WINDOW_OPENGL;
     3.6    
     3.7 +    SDL_SetMouseFocus(window);
     3.8 +    SDL_SetKeyboardFocus(window);
     3.9 +    
    3.10      return 0;
    3.11  }
    3.12