Skip to content

Commit 0cd32ab

Browse files
Enforce doubled refresh rate
resolves #966
1 parent 8cf18b1 commit 0cd32ab

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/process.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,10 @@ namespace proc {
284284
target_fps *= 1000;
285285
}
286286

287+
if (config::video.double_refreshrate) {
288+
target_fps *= 2;
289+
}
290+
287291
std::wstring vdisplayName = VDISPLAY::createVirtualDisplay(
288292
device_uuid_str.c_str(),
289293
device_name.c_str(),
@@ -293,10 +297,6 @@ namespace proc {
293297
launch_session->display_guid
294298
);
295299

296-
if (config::video.double_refreshrate) {
297-
target_fps *= 2;
298-
}
299-
300300
// No matter we get the display name or not, the virtual display might still be created.
301301
// We need to track it properly to remove the display when the session terminates.
302302
launch_session->virtual_display = true;
@@ -311,10 +311,10 @@ namespace proc {
311311
}
312312

313313
// Check the ISOLATED DISPLAY configuration setting and rearrange the displays
314-
if (config::video.isolated_virtual_display_option == true) {
315-
// Apply the isolated display settings
316-
VDISPLAY::changeDisplaySettings2(vdisplayName.c_str(), render_width, render_height, target_fps, true);
317-
}
314+
if (config::video.isolated_virtual_display_option == true) {
315+
// Apply the isolated display settings
316+
VDISPLAY::changeDisplaySettings2(vdisplayName.c_str(), render_width, render_height, target_fps, true);
317+
}
318318

319319
// Set virtual_display to true when everything went fine
320320
this->virtual_display = true;

0 commit comments

Comments
 (0)