Add "Disable V-Sync" Feature Flag

This commit is contained in:
TheBrokenRail 2022-03-16 19:49:13 -04:00
parent aa471fb4ba
commit 55a815643b
2 changed files with 8 additions and 0 deletions

View File

@ -33,3 +33,4 @@ FALSE Disable Raw Mouse Motion (Not Recommended)
TRUE Fix Furnace Not Checking Item Auxiliary TRUE Fix Furnace Not Checking Item Auxiliary
FALSE Disable Hosting LAN Worlds FALSE Disable Hosting LAN Worlds
TRUE Improved Cursor Rendering TRUE Improved Cursor Rendering
FALSE Disable V-Sync

View File

@ -6,7 +6,9 @@
#include <libreborn/libreborn.h> #include <libreborn/libreborn.h>
#include <symbols/minecraft.h> #include <symbols/minecraft.h>
#include <SDL/SDL.h> #include <SDL/SDL.h>
#include <media-layer/core.h>
#include "../init/init.h" #include "../init/init.h"
#include "../feature/feature.h" #include "../feature/feature.h"
@ -245,6 +247,11 @@ void init_misc() {
overwrite_calls((void *) GameRenderer_render, (void *) GameRenderer_render_injection); overwrite_calls((void *) GameRenderer_render, (void *) GameRenderer_render_injection);
} }
// Disable V-Sync
if (feature_has("Disable V-Sync", 0)) {
media_disable_vsync();
}
// Init C++ And Logging // Init C++ And Logging
_init_misc_cpp(); _init_misc_cpp();
_init_misc_logging(); _init_misc_logging();