src/video/nacl/SDL_naclvideo.c
changeset 8873 77ffe680093f
parent 8833 ae720d61d14d
child 9619 b94b6d0bff0f
equal deleted inserted replaced
8872:5a6375d96834 8873:77ffe680093f
   137 
   137 
   138 int NACL_VideoInit(_THIS) {
   138 int NACL_VideoInit(_THIS) {
   139     SDL_VideoData *driverdata = (SDL_VideoData *) _this->driverdata;
   139     SDL_VideoData *driverdata = (SDL_VideoData *) _this->driverdata;
   140     SDL_DisplayMode mode;
   140     SDL_DisplayMode mode;
   141 
   141 
       
   142     SDL_zero(mode);
   142     mode.format = driverdata->format;
   143     mode.format = driverdata->format;
   143     mode.w = driverdata->w;
   144     mode.w = driverdata->w;
   144     mode.h = driverdata->h;
   145     mode.h = driverdata->h;
   145     mode.refresh_rate = 0;
   146     mode.refresh_rate = 0;
   146     mode.driverdata = NULL;
   147     mode.driverdata = NULL;
   147     if (SDL_AddBasicVideoDisplay(&mode) < 0) {
   148     if (SDL_AddBasicVideoDisplay(&mode) < 0) {
   148         return -1;
   149         return -1;
   149     }
   150     }
   150     
   151 
   151     SDL_zero(mode);
       
   152     SDL_AddDisplayMode(&_this->displays[0], &mode);
   152     SDL_AddDisplayMode(&_this->displays[0], &mode);
   153     
   153     
   154     PSInterfaceInit();
   154     PSInterfaceInit();
   155     driverdata->instance = PSGetInstanceId();
   155     driverdata->instance = PSGetInstanceId();
   156     driverdata->ppb_graphics = PSInterfaceGraphics3D();
   156     driverdata->ppb_graphics = PSInterfaceGraphics3D();