From e288d77607c6c0f3eda615f9dcc2cc81f5396f65 Mon Sep 17 00:00:00 2001 From: notaz Date: Wed, 6 Feb 2013 03:45:53 +0200 Subject: [PATCH] sdl: add resize callback --- plat_sdl.c | 4 ++++ plat_sdl.h | 1 + 2 files changed, 5 insertions(+) diff --git a/plat_sdl.c b/plat_sdl.c index f10427d..37370bf 100644 --- a/plat_sdl.c +++ b/plat_sdl.c @@ -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; } diff --git a/plat_sdl.h b/plat_sdl.h index d1d62d6..a953265 100644 --- a/plat_sdl.h +++ b/plat_sdl.h @@ -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); -- 2.39.5