Set render adapter for virtual display driver w/ show detailed virtual display driver status on config

This commit is contained in:
Yukino Song
2024-08-21 00:06:41 +08:00
parent 0f6d9ba66e
commit f2401c08f7
7 changed files with 61 additions and 7 deletions

View File

@@ -58,6 +58,7 @@ namespace proc {
if (vDisplayDriverStatus == VDISPLAY::DRIVER_STATUS::OK) {
if (!VDISPLAY::startPingThread(onVDisplayWatchdogFailed)) {
onVDisplayWatchdogFailed();
return;
}
}
}
@@ -249,6 +250,11 @@ namespace proc {
if (vDisplayDriverStatus == VDISPLAY::DRIVER_STATUS::OK) {
std::wstring prevPrimaryDisplayName = VDISPLAY::getPrimaryDisplay();
// Try set the render adapter matching the capture adapter if user has specified one
if (!config::video.adapter_name.empty()) {
VDISPLAY::setRenderAdapterByName(platf::from_utf8(config::video.adapter_name));
}
memcpy(&launch_session->display_guid, &http::uuid, sizeof(GUID));
std::wstring vdisplayName = VDISPLAY::createVirtualDisplay(