diff --git a/src/process.cpp b/src/process.cpp index 0fce54cc..b8b970b0 100644 --- a/src/process.cpp +++ b/src/process.cpp @@ -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;