src/video/raspberry/SDL_rpivideo.c
changeset 7799 a67ccdd0c03a
parent 7753 e4c38f17bfad
child 7986 ffb7bf531644
equal deleted inserted replaced
7798:795fc221d417 7799:a67ccdd0c03a
   142 int
   142 int
   143 RPI_VideoInit(_THIS)
   143 RPI_VideoInit(_THIS)
   144 {
   144 {
   145     SDL_VideoDisplay display;
   145     SDL_VideoDisplay display;
   146     SDL_DisplayMode current_mode;
   146     SDL_DisplayMode current_mode;
       
   147     SDL_DisplayData *data;
   147     uint32_t w,h;
   148     uint32_t w,h;
   148 
   149 
   149     /* Initialize BCM Host */
   150     /* Initialize BCM Host */
   150     bcm_host_init();
   151     bcm_host_init();
   151 
   152 
   165     current_mode.driverdata = NULL;
   166     current_mode.driverdata = NULL;
   166 
   167 
   167     SDL_zero(display);
   168     SDL_zero(display);
   168     display.desktop_mode = current_mode;
   169     display.desktop_mode = current_mode;
   169     display.current_mode = current_mode;
   170     display.current_mode = current_mode;
   170 
       
   171     SDL_DisplayData *data;
       
   172 
   171 
   173     /* Allocate display internal data */
   172     /* Allocate display internal data */
   174     data = (SDL_DisplayData *) SDL_calloc(1, sizeof(SDL_DisplayData));
   173     data = (SDL_DisplayData *) SDL_calloc(1, sizeof(SDL_DisplayData));
   175     if (data == NULL) {
   174     if (data == NULL) {
   176         return SDL_OutOfMemory();
   175         return SDL_OutOfMemory();