int axis_keydown[2];
#ifdef SDL_REDRAW_EVT
int rdraw;
+ SDL_Event redraw;
#endif
keybits_t keystate[SDLK_LAST / KEYBITS_WORD_BITS + 1];
// emulator keys should always be processed immediately lest one is lost
break;
default:
#ifdef SDL_REDRAW_EVT
- state->rdraw |= (one_kc != NULL &&
- event->type == SDL_VIDEORESIZE);
+ if (event->type == SDL_VIDEORESIZE) {
+ state->rdraw = 1;
+ state->redraw = *event;
+ } else
#endif
if (ext_event_handler != NULL)
ext_event_handler(event);
#ifdef SDL_REDRAW_EVT
// if the event queue has been emptied and resize events were in it
if (state->rdraw && count == 0) {
+ if (ext_event_handler != NULL)
+ ext_event_handler(&state->redraw);
state->rdraw = 0;
// dummy key event to force returning from the key loop,
// so the application has a chance to redraw the window
plat_sdl_screen->w != win_w || plat_sdl_screen->h != win_h)
plat_sdl_screen = SDL_SetVideoMode(win_w, win_h, 16, flags);
screen_flags = flags;
+ window_w = win_w;
+ window_h = win_h;
if (plat_sdl_screen == NULL) {
fprintf(stderr, "SDL_SetVideoMode failed: %s\n", SDL_GetError());
return -1;
{
return window_b != 0;
}
+
+int plat_sdl_is_fullscreen(void)
+{
+ // consider window title bar and screen menu here
+ return window_w >= fs_w && window_h >= fs_h - 2*window_b;
+}
// vim:shiftwidth=2:expandtab
int plat_sdl_init(void);
int plat_sdl_is_windowed(void);
+int plat_sdl_is_fullscreen(void);
int plat_sdl_change_video_mode(int w, int h, int force);
void plat_sdl_overlay_clear(void);
void plat_sdl_event_handler(void *event_);