Enforce doubled refresh rate

resolves #966
This commit is contained in:
Yukino Song
2025-08-06 17:55:19 +08:00
parent 8cf18b19a3
commit 0cd32abaaa

View File

@@ -284,6 +284,10 @@ namespace proc {
target_fps *= 1000;
}
if (config::video.double_refreshrate) {
target_fps *= 2;
}
std::wstring vdisplayName = VDISPLAY::createVirtualDisplay(
device_uuid_str.c_str(),
device_name.c_str(),
@@ -293,10 +297,6 @@ namespace proc {
launch_session->display_guid
);
if (config::video.double_refreshrate) {
target_fps *= 2;
}
// No matter we get the display name or not, the virtual display might still be created.
// We need to track it properly to remove the display when the session terminates.
launch_session->virtual_display = true;
@@ -311,10 +311,10 @@ namespace proc {
}
// Check the ISOLATED DISPLAY configuration setting and rearrange the displays
if (config::video.isolated_virtual_display_option == true) {
// Apply the isolated display settings
VDISPLAY::changeDisplaySettings2(vdisplayName.c_str(), render_width, render_height, target_fps, true);
}
if (config::video.isolated_virtual_display_option == true) {
// Apply the isolated display settings
VDISPLAY::changeDisplaySettings2(vdisplayName.c_str(), render_width, render_height, target_fps, true);
}
// Set virtual_display to true when everything went fine
this->virtual_display = true;