mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-26 05:55:15 +00:00
update 60fps patch
This commit is contained in:
parent
2982fcdb8e
commit
685efc81c6
1 changed files with 11 additions and 11 deletions
|
@ -1890,10 +1890,19 @@ index 0467495..fa4eb33 100644
|
||||||
|
|
||||||
using namespace Microsoft::WRL; // For ComPtr
|
using namespace Microsoft::WRL; // For ComPtr
|
||||||
diff --git a/src/pc/gfx/gfx_sdl2.c b/src/pc/gfx/gfx_sdl2.c
|
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
|
--- a/src/pc/gfx/gfx_sdl2.c
|
||||||
+++ b/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) {
|
if (mode > 1) {
|
||||||
// try to detect refresh rate
|
// try to detect refresh rate
|
||||||
SDL_GL_SetSwapInterval(1);
|
SDL_GL_SetSwapInterval(1);
|
||||||
|
@ -1902,15 +1911,6 @@ index a39b76d..3fb1bb1 100644
|
||||||
if (vblanks) {
|
if (vblanks) {
|
||||||
printf("determined swap interval: %d\n", vblanks);
|
printf("determined swap interval: %d\n", vblanks);
|
||||||
SDL_GL_SetSwapInterval(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
|
diff --git a/src/pc/pc_main.c b/src/pc/pc_main.c
|
||||||
index ed6ee74..63679ad 100644
|
index ed6ee74..63679ad 100644
|
||||||
--- a/src/pc/pc_main.c
|
--- a/src/pc/pc_main.c
|
||||||
|
|
Loading…
Reference in a new issue