src/video/psp/SDL_pspvideo.c
changeset 7191 75360622e65f
parent 7147 370f207f24ec
child 7677 871d43c6968a
     1.1 --- a/src/video/psp/SDL_pspvideo.c	Sat May 18 12:48:50 2013 -0700
     1.2 +++ b/src/video/psp/SDL_pspvideo.c	Sat May 18 14:17:52 2013 -0700
     1.3 @@ -51,7 +51,7 @@
     1.4  static void
     1.5  PSP_Destroy(SDL_VideoDevice * device)
     1.6  {
     1.7 -//    SDL_VideoData *phdata = (SDL_VideoData *) device->driverdata;
     1.8 +/*    SDL_VideoData *phdata = (SDL_VideoData *) device->driverdata; */
     1.9  
    1.10      if (device->driverdata != NULL) {
    1.11          device->driverdata = NULL;
    1.12 @@ -87,15 +87,15 @@
    1.13          SDL_free(device);
    1.14          return NULL;
    1.15      }
    1.16 -        
    1.17 -		gldata = (SDL_GLDriverData *) SDL_calloc(1, sizeof(SDL_GLDriverData));
    1.18 +
    1.19 +        gldata = (SDL_GLDriverData *) SDL_calloc(1, sizeof(SDL_GLDriverData));
    1.20      if (gldata == NULL) {
    1.21          SDL_OutOfMemory();
    1.22          SDL_free(device);
    1.23          return NULL;
    1.24 -    }	
    1.25 +    }
    1.26      device->gl_data = gldata;
    1.27 -    
    1.28 +
    1.29      device->driverdata = phdata;
    1.30  
    1.31      phdata->egl_initialized = SDL_TRUE;
    1.32 @@ -136,11 +136,11 @@
    1.33      device->GL_GetSwapInterval = PSP_GL_GetSwapInterval;
    1.34      device->GL_SwapWindow = PSP_GL_SwapWindow;
    1.35      device->GL_DeleteContext = PSP_GL_DeleteContext;
    1.36 -	device->HasScreenKeyboardSupport = PSP_HasScreenKeyboardSupport;
    1.37 -	device->ShowScreenKeyboard = PSP_ShowScreenKeyboard;
    1.38 -	device->HideScreenKeyboard = PSP_HideScreenKeyboard;
    1.39 -	device->IsScreenKeyboardShown = PSP_IsScreenKeyboardShown;
    1.40 -    
    1.41 +    device->HasScreenKeyboardSupport = PSP_HasScreenKeyboardSupport;
    1.42 +    device->ShowScreenKeyboard = PSP_ShowScreenKeyboard;
    1.43 +    device->HideScreenKeyboard = PSP_HideScreenKeyboard;
    1.44 +    device->IsScreenKeyboardShown = PSP_IsScreenKeyboardShown;
    1.45 +
    1.46      device->PumpEvents = PSP_PumpEvents;
    1.47  
    1.48      return device;
    1.49 @@ -163,15 +163,14 @@
    1.50      SDL_DisplayMode current_mode;
    1.51  
    1.52      SDL_zero(current_mode);
    1.53 -    
    1.54 +
    1.55      current_mode.w = 480;
    1.56      current_mode.h = 272;
    1.57 -    
    1.58 +
    1.59      current_mode.refresh_rate = 60;
    1.60 -    // 32 bpp for default 
    1.61 -   // current_mode.format = SDL_PIXELFORMAT_RGBA8888;
    1.62 +    /* 32 bpp for default */
    1.63      current_mode.format = SDL_PIXELFORMAT_ABGR8888;
    1.64 -    
    1.65 +
    1.66      current_mode.driverdata = NULL;
    1.67  
    1.68      SDL_zero(display);
    1.69 @@ -201,23 +200,21 @@
    1.70  {
    1.71      return 0;
    1.72  }
    1.73 -#define EGLCHK(stmt)							\
    1.74 -	do {										\
    1.75 -		EGLint err;								\
    1.76 -												\
    1.77 -		stmt;									\
    1.78 -		err = eglGetError();					\
    1.79 -		if (err != EGL_SUCCESS) {				\
    1.80 -			SDL_SetError("EGL error %d", err);	\
    1.81 -			return 0;							\
    1.82 -		}										\
    1.83 -	} while (0)
    1.84 -	
    1.85 +#define EGLCHK(stmt)                            \
    1.86 +    do {                                        \
    1.87 +        EGLint err;                             \
    1.88 +                                                \
    1.89 +        stmt;                                   \
    1.90 +        err = eglGetError();                    \
    1.91 +        if (err != EGL_SUCCESS) {               \
    1.92 +            SDL_SetError("EGL error %d", err);  \
    1.93 +            return 0;                           \
    1.94 +        }                                       \
    1.95 +    } while (0)
    1.96 +
    1.97  int
    1.98  PSP_CreateWindow(_THIS, SDL_Window * window)
    1.99  {
   1.100 -//    SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata;
   1.101 -
   1.102      SDL_WindowData *wdata;
   1.103  
   1.104      /* Allocate window internal data */
   1.105 @@ -288,8 +285,6 @@
   1.106  void
   1.107  PSP_DestroyWindow(_THIS, SDL_Window * window)
   1.108  {
   1.109 -	
   1.110 -//    eglTerminate(_this->gl_data->display);
   1.111  }
   1.112  
   1.113  /*****************************************************************************/
   1.114 @@ -324,7 +319,7 @@
   1.115  }
   1.116  SDL_bool PSP_IsScreenKeyboardShown(_THIS, SDL_Window *window)
   1.117  {
   1.118 -	return SDL_FALSE;
   1.119 +    return SDL_FALSE;
   1.120  }
   1.121  
   1.122