UpdateScreenExt(rect, FALSE);
}
+void Delay_WithScreenUpdates(unsigned int delay)
+{
+ unsigned int time_current = SDL_GetTicks();
+ unsigned int time_delayed = time_current + delay;
+
+ while (time_current < time_delayed)
+ {
+ // updating the screen contains waiting for frame delay (non-busy)
+ UpdateScreen_WithFrameDelay(NULL);
+
+ time_current = SDL_GetTicks();
+ }
+}
+
static void SDLSetWindowIcon(char *basename)
{
/* (setting the window icon on Mac OS X would replace the high-quality
SDLSetWindowTitle();
}
-inline static void SDLInitVideoBuffer_DrawBuffer()
+inline static void SDLInitVideoBuffer_DrawBuffer(void)
{
/* SDL cannot directly draw to the visible video framebuffer like X11,
but always uses a backbuffer, which is then blitted to the visible
return success;
}
-void SDLSetWindowTitle()
+void SDLSetWindowTitle(void)
{
#if defined(TARGET_SDL2)
if (sdl_window == NULL)
}
}
-void SDLSetDisplaySize()
+void SDLSetDisplaySize(void)
{
SDL_Rect display_bounds;
SDL_RenderSetLogicalSize(sdl_renderer, width, height);
}
-void SDLSetScreenProperties()
+void SDLSetScreenProperties(void)
{
SDLSetScreenSizeAndOffsets(video.width, video.height);
SDLSetScreenSizeForRenderer(video.screen_width, video.screen_height);
#endif
}
-void SDLRedrawWindow()
+void SDLRedrawWindow(void)
{
UpdateScreen_WithoutFrameDelay(NULL);
}
}
if (post_delay > 0)
- {
- unsigned int time_post_delay;
-
- time_current = SDL_GetTicks();
- time_post_delay = time_current + post_delay;
-
- while (time_current < time_post_delay)
- {
- // updating the screen contains waiting for frame delay (non-busy)
- UpdateScreen_WithFrameDelay(NULL);
-
- time_current = SDL_GetTicks();
- }
- }
+ Delay_WithScreenUpdates(post_delay);
// restore function for drawing global masked border
gfx.draw_global_border_function = draw_global_border_function;
static int sdl_js_button[MAX_PLAYERS][2];
static boolean sdl_is_controller[MAX_PLAYERS];
-void SDLClearJoystickState()
+void SDLClearJoystickState(void)
{
int i, j;
}
}
-void SDLInitJoysticks()
+void SDLInitJoysticks(void)
{
static boolean sdl_joystick_subsystem_initialized = FALSE;
boolean print_warning = !sdl_joystick_subsystem_initialized;
SDL_SetRenderDrawColor(sdl_renderer, 0, 0, 0, 255);
}
-static void DrawTouchInputOverlay()
+static void DrawTouchInputOverlay(void)
{
static SDL_Texture *texture = NULL;
static boolean initialized = FALSE;