From 30e6010a8875f7e1081733cb06ef27f68c9b0394 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Sat, 18 Jan 2025 08:53:59 +0100 Subject: [PATCH] revert "disable Vsync checkbox in case we are in borderelss or windowed mode to avoid unnecessary input lag" --- config/ConfigFormUnit.cpp | 34 ---------------------------------- config/ConfigFormUnit.h | 1 - 2 files changed, 35 deletions(-) diff --git a/config/ConfigFormUnit.cpp b/config/ConfigFormUnit.cpp index 7cad46f..7d40a88 100644 --- a/config/ConfigFormUnit.cpp +++ b/config/ConfigFormUnit.cpp @@ -9,7 +9,6 @@ #include #include #include -#include #include "ConfigFormUnit.h" //--------------------------------------------------------------------------- #pragma package(smart_init) @@ -1286,11 +1285,6 @@ void __fastcall TConfigForm::FormCreate(TObject *Sender) delete ini; - VsyncChk->Enabled = VsyncAllowed(); - if (!VsyncChk->Enabled) { - VsyncChk->State = tssOff; - } - Initialized = true; } @@ -1712,31 +1706,8 @@ bool TConfigForm::GetBool(TIniFile *ini, System::UnicodeString key, bool defValu return s == "true" || s == "yes" || s == "1"; } -bool TConfigForm::VsyncAllowed() -{ - if (GetProcAddress(GetModuleHandleW(L"ntdll.dll"), "wine_get_version")) { - return true; - } - - if (!IsWindows8OrGreater()) { - return true; - } - - if (NonexclusiveChk->State == tssOff && - (PresentationCbx->ItemIndex == 0 || PresentationCbx->ItemIndex == 1)) { - return true; - } - - return false; -} - void __fastcall TConfigForm::PresentationCbxChange(TObject *Sender) { - VsyncChk->Enabled = VsyncAllowed(); - if (!VsyncChk->Enabled) { - VsyncChk->State = tssOff; - } - SaveSettings(); } @@ -1845,11 +1816,6 @@ void __fastcall TConfigForm::SinglecpuChkClick(TObject *Sender) void __fastcall TConfigForm::NonexclusiveChkClick(TObject *Sender) { - VsyncChk->Enabled = VsyncAllowed(); - if (!VsyncChk->Enabled) { - VsyncChk->State = tssOff; - } - SaveSettings(); } diff --git a/config/ConfigFormUnit.h b/config/ConfigFormUnit.h index 8a46bf8..8a8a14c 100644 --- a/config/ConfigFormUnit.h +++ b/config/ConfigFormUnit.h @@ -118,7 +118,6 @@ private: // Benutzer-Deklarationen virtual void __fastcall CreateParams(TCreateParams & Params); void SaveSettings(); bool GetBool(TIniFile *ini, System::UnicodeString key, bool defValue); - bool VsyncAllowed(); void ApplyTranslation(TIniFile *ini); System::UnicodeString GetKeyText(WORD key); WORD GetKeyCode(System::UnicodeString text);