Skip to content

Commit

Permalink
Merge pull request #481 from RamonUnch/RamonUnch-Add-RezTimer=4-for-A…
Browse files Browse the repository at this point in the history
…uto-1-or-3

Add RezTimer=4 for Auto 1 or 3
  • Loading branch information
RamonUnch authored Oct 16, 2023
2 parents 88d6f6e + 490ed30 commit 99bb216
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -6164,14 +6164,17 @@ __declspec(dllexport) HWND WINAPI Load(HWND mainhwnd)
conf.ResizeRate = max(1, conf.ResizeRate);

// [Performance]
if (conf.RezTimer == 2) {
conf.RezTimer = 0;
if (conf.RezTimer == 2 || conf.RezTimer == 4) {
// 2 => Auto 1 (if 60Hz monitor) or 0.
// 4 => Auto 1 (if 60Hz monitor) or 3.
conf.RezTimer = conf.RezTimer == 2? 0: 3;
DEVMODE dvm;
mem00(&dvm, sizeof(dvm));
dvm.dmSize = sizeof(DEVMODE);
if (EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dvm)) {
LOG("Display Frequency = %dHz", dvm.dmDisplayFrequency);
conf.RezTimer = dvm.dmDisplayFrequency == 60;
if (dvm.dmDisplayFrequency == 60)
conf.RezTimer = 1;
}
}
if (conf.RezTimer) conf.RefreshRate=0; // Ignore the refresh rate in RezTimer mode.
Expand Down

0 comments on commit 99bb216

Please sign in to comment.