notaz.gp2x.de
/
libpicofe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
63f173a
)
sdl: add resize callback
author
notaz
<notasas@gmail.com>
Wed, 6 Feb 2013 01:45:53 +0000
(
03:45
+0200)
committer
notaz
<notasas@gmail.com>
Wed, 6 Feb 2013 01:45:53 +0000
(
03:45
+0200)
plat_sdl.c
patch
|
blob
|
blame
|
history
plat_sdl.h
patch
|
blob
|
blame
|
history
diff --git
a/plat_sdl.c
b/plat_sdl.c
index
f10427d
..
37370bf
100644
(file)
--- 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;
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];
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;
}
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;
}
return 0;
}
diff --git
a/plat_sdl.h
b/plat_sdl.h
index
d1d62d6
..
a953265
100644
(file)
--- 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 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);
extern void (*plat_sdl_quit_cb)(void);
int plat_sdl_init(void);