[idd] all: add default refresh rate setting support

This commit is contained in:
Geoffrey McRae authored and Geoffrey McRae committed 2026-06-03 08:59:48 +10:00
1 parent c2add993ac
commit 65005c0dc0
7 files changed
+36 -12

No files matched your search

+5 -4
View File
@@ -290,10 +290,11 @@ void CPipeClient::HandleSetCursorPos(const LGPipeMsg& msg)
void CPipeClient::HandleSetDisplayMode(const LGPipeMsg& msg)
{
DEVMODE dm = {};
dm.dmSize = sizeof(dm);
dm.dmPelsWidth = msg.displayMode.width;
dm.dmPelsHeight = msg.displayMode.height;
dm.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT;
dm.dmSize = sizeof(dm);
dm.dmPelsWidth = msg.displayMode.width;
dm.dmPelsHeight = msg.displayMode.height;
dm.dmDisplayFrequency = msg.displayMode.refresh;
dm.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY;
LONG result = ChangeDisplaySettingsEx(NULL, &dm, NULL, CDS_UPDATEREGISTRY, NULL);
if (result != DISP_CHANGE_SUCCESSFUL)