sdl: add resize callback

This commit is contained in:
notaz 2013-02-06 03:45:53 +02:00
parent 63f173a250
commit e288d77607
2 changed files with 5 additions and 0 deletions

View file

@ -24,6 +24,7 @@
SDL_Surface *plat_sdl_screen;
SDL_Overlay *plat_sdl_overlay;
int plat_sdl_gl_active;
void (*plat_sdl_resize_cb)(int w, int h);
void (*plat_sdl_quit_cb)(void);
static char vid_drv_name[32];
@ -117,6 +118,9 @@ int plat_sdl_change_video_mode(int w, int h, int force)
}
old_fullscreen = plat_target.vout_fullscreen;
if (plat_sdl_resize_cb != NULL)
plat_sdl_resize_cb(plat_sdl_screen->w, plat_sdl_screen->h);
return 0;
}

View file

@ -3,6 +3,7 @@
extern SDL_Surface *plat_sdl_screen;
extern SDL_Overlay *plat_sdl_overlay;
extern int plat_sdl_gl_active;
extern void (*plat_sdl_resize_cb)(int w, int h);
extern void (*plat_sdl_quit_cb)(void);
int plat_sdl_init(void);