Pandora: Fixed compile warnings in video implementation (thanks, Bombo!).
authorPhilipp Wiesemann
Wed, 20 Jul 2016 21:00:36 +0200
changeset 10207e66f6ab2b059
parent 10206 30ca8e64db6a
child 10208 49c460371a4a
Pandora: Fixed compile warnings in video implementation (thanks, Bombo!).

Fixes Bugzilla #2734.
src/video/pandora/SDL_pandora.c
src/video/pandora/SDL_pandora.h
     1.1 --- a/src/video/pandora/SDL_pandora.c	Tue Jul 19 21:02:44 2016 +0200
     1.2 +++ b/src/video/pandora/SDL_pandora.c	Wed Jul 20 21:00:36 2016 +0200
     1.3 @@ -41,8 +41,6 @@
     1.4  static NativeWindowType hNativeWnd = 0; /* A handle to the window we will create. */
     1.5  #endif
     1.6  
     1.7 -static SDL_bool PND_initialized = SDL_FALSE;
     1.8 -
     1.9  static int
    1.10  PND_available(void)
    1.11  {
    1.12 @@ -52,8 +50,6 @@
    1.13  static void
    1.14  PND_destroy(SDL_VideoDevice * device)
    1.15  {
    1.16 -    SDL_VideoData *phdata = (SDL_VideoData *) device->driverdata;
    1.17 -
    1.18      if (device->driverdata != NULL) {
    1.19          device->driverdata = NULL;
    1.20      }
    1.21 @@ -203,10 +199,6 @@
    1.22  
    1.23      SDL_WindowData *wdata;
    1.24  
    1.25 -    uint32_t winargc = 0;
    1.26 -    int32_t status;
    1.27 -
    1.28 -
    1.29      /* Allocate window internal data */
    1.30      wdata = (SDL_WindowData *) SDL_calloc(1, sizeof(SDL_WindowData));
    1.31      if (wdata == NULL) {
    1.32 @@ -291,7 +283,7 @@
    1.33  {
    1.34  }
    1.35  void
    1.36 -PND_setwindowgrab(_THIS, SDL_Window * window)
    1.37 +PND_setwindowgrab(_THIS, SDL_Window * window, SDL_bool grabbed)
    1.38  {
    1.39  }
    1.40  void
    1.41 @@ -325,8 +317,6 @@
    1.42  int
    1.43  PND_gl_loadlibrary(_THIS, const char *path)
    1.44  {
    1.45 -    SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata;
    1.46 -
    1.47      /* Check if OpenGL ES library is specified for GF driver */
    1.48      if (path == NULL) {
    1.49          path = SDL_getenv("SDL_OPENGL_LIBRARY");
    1.50 @@ -364,7 +354,6 @@
    1.51  void *
    1.52  PND_gl_getprocaddres(_THIS, const char *proc)
    1.53  {
    1.54 -    SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata;
    1.55      void *function_address;
    1.56  
    1.57      /* Try to get function address through the egl interface */
    1.58 @@ -408,10 +397,7 @@
    1.59  {
    1.60      SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata;
    1.61      SDL_WindowData *wdata = (SDL_WindowData *) window->driverdata;
    1.62 -    SDL_DisplayData *didata =
    1.63 -        (SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata;
    1.64      EGLBoolean status;
    1.65 -    int32_t gfstatus;
    1.66      EGLint configs;
    1.67      uint32_t attr_pos;
    1.68      EGLint attr_value;
    1.69 @@ -791,9 +777,6 @@
    1.70  {
    1.71      SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata;
    1.72      SDL_WindowData *wdata = (SDL_WindowData *) window->driverdata;
    1.73 -    SDL_DisplayData *didata =
    1.74 -        (SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata;
    1.75 -
    1.76  
    1.77      if (phdata->egl_initialized != SDL_TRUE) {
    1.78          SDL_SetError("PND: GLES initialization failed, no OpenGL ES support");
     2.1 --- a/src/video/pandora/SDL_pandora.h	Tue Jul 19 21:02:44 2016 +0200
     2.2 +++ b/src/video/pandora/SDL_pandora.h	Wed Jul 20 21:00:36 2016 +0200
     2.3 @@ -77,7 +77,7 @@
     2.4  void PND_maximizewindow(_THIS, SDL_Window * window);
     2.5  void PND_minimizewindow(_THIS, SDL_Window * window);
     2.6  void PND_restorewindow(_THIS, SDL_Window * window);
     2.7 -void PND_setwindowgrab(_THIS, SDL_Window * window);
     2.8 +void PND_setwindowgrab(_THIS, SDL_Window * window, SDL_bool grabbed);
     2.9  void PND_destroywindow(_THIS, SDL_Window * window);
    2.10  
    2.11  /* Window manager function */