From 685efc81c6dd1f682012360015d2d9105eeb56c7 Mon Sep 17 00:00:00 2001 From: fgsfds Date: Wed, 8 Jul 2020 13:31:34 +0300 Subject: [PATCH] update 60fps patch --- enhancements/60fps_ex.patch | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/enhancements/60fps_ex.patch b/enhancements/60fps_ex.patch index 01c17945..fe7c6e24 100644 --- a/enhancements/60fps_ex.patch +++ b/enhancements/60fps_ex.patch @@ -1890,10 +1890,19 @@ index 0467495..fa4eb33 100644 using namespace Microsoft::WRL; // For ComPtr diff --git a/src/pc/gfx/gfx_sdl2.c b/src/pc/gfx/gfx_sdl2.c -index a39b76d..3fb1bb1 100644 +index aef2978..ff53b27 100644 --- a/src/pc/gfx/gfx_sdl2.c +++ b/src/pc/gfx/gfx_sdl2.c -@@ -141,7 +141,7 @@ static inline void gfx_sdl_set_vsync(int mode) { +@@ -53,7 +53,7 @@ static void (*kb_all_keys_up)(void) = NULL; + // whether to use timer for frame control + static bool use_timer = true; + // time between consequtive game frames +-static const Uint32 frame_time = 1000 / FRAMERATE; ++static const Uint32 frame_time = 1000 / (2 * FRAMERATE); + static Uint32 frame_start = 0; + + const SDL_Scancode windows_scancode_table[] = { +@@ -142,7 +142,7 @@ static inline void gfx_sdl_set_vsync(int mode) { if (mode > 1) { // try to detect refresh rate SDL_GL_SetSwapInterval(1); @@ -1902,15 +1911,6 @@ index a39b76d..3fb1bb1 100644 if (vblanks) { printf("determined swap interval: %d\n", vblanks); SDL_GL_SetSwapInterval(vblanks); -@@ -225,7 +225,7 @@ static void gfx_sdl_init(const char *window_title) { - gfx_sdl_set_fullscreen(); - - qpc_freq = SDL_GetPerformanceFrequency(); -- frame_time = qpc_freq / FRAMERATE; -+ frame_time = qpc_freq / (2 * FRAMERATE); - - for (size_t i = 0; i < sizeof(windows_scancode_table) / sizeof(SDL_Scancode); i++) { - inverted_scancode_table[windows_scancode_table[i]] = i; diff --git a/src/pc/pc_main.c b/src/pc/pc_main.c index ed6ee74..63679ad 100644 --- a/src/pc/pc_main.c