feat: ability to turn off vsync

This commit is contained in:
2026-08-23 17:56:01 -04:00
parent 6878c47f24
commit 9cabad158a
3 changed files with 20 additions and 2 deletions
@@ -91,6 +91,10 @@ static Windows64LaunchArgs ParseLaunchArgs()
{
args.fullscreen = true;
}
else if (_wcsicmp(argv[i], L"-no-vsync") == 0) //str1k3r - we all remember -femboysarecool right? also thank u neoapps for naming this arg
{
args.vsync = true;
}
else if (_wcsicmp(argv[i], L"-resolution") == 0)
{
if (i + 1 < argc && argv[i + 1][0] >= L'1' && argv[i + 1][0] <= L'6')
@@ -312,7 +316,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
// Tick UI
ui.tick();
ui.render();
RenderManager.Present();
RenderManager.Present(g_iScreenWidth, g_iScreenWidth);
ui.CheckMenuDisplayed();
// Tick Managers
@@ -736,6 +740,11 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
app.loadMediaArchive();
if(launchArgs.vsync)
{
RenderManager.SetVSync(false); //str1k3r - vsync is set to try by default in 4JLibs
}
RenderManager.Initialise(g_pd3dDevice, g_pSwapChain);
app.loadStringTable();
@@ -863,7 +872,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
ui.render();
// Present the frame.
RenderManager.Present();
RenderManager.Present(g_iScreenWidth, g_iScreenWidth);
ui.CheckMenuDisplayed();