Try fix probing failed issue on some weird systems
This commit is contained in:
@@ -419,11 +419,13 @@ namespace platf::dxgi {
|
|||||||
|
|
||||||
// Try probing with different GPU preferences and verify_frame_capture flag
|
// Try probing with different GPU preferences and verify_frame_capture flag
|
||||||
if (validate_and_test_gpu_preference(display_name, true)) {
|
if (validate_and_test_gpu_preference(display_name, true)) {
|
||||||
|
set_gpu_preference = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If no valid configuration was found, try again with verify_frame_capture == false
|
// If no valid configuration was found, try again with verify_frame_capture == false
|
||||||
if (validate_and_test_gpu_preference(display_name, false)) {
|
if (validate_and_test_gpu_preference(display_name, false)) {
|
||||||
|
set_gpu_preference = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+11
-2
@@ -252,14 +252,23 @@ namespace proc {
|
|||||||
// Set primary display if needed
|
// Set primary display if needed
|
||||||
if (shouldActuallySetPrimary) {
|
if (shouldActuallySetPrimary) {
|
||||||
auto disp = shouldSetVDisplayPrimary ? vdisplayName : prevPrimaryDisplayName;
|
auto disp = shouldSetVDisplayPrimary ? vdisplayName : prevPrimaryDisplayName;
|
||||||
BOOST_LOG(info) << "Setting display " << disp << " primary!!!";
|
BOOST_LOG(info) << "Setting display " << disp << " primary";
|
||||||
|
|
||||||
VDISPLAY::setPrimaryDisplay(disp.c_str());
|
if (!VDISPLAY::setPrimaryDisplay(disp.c_str())) {
|
||||||
|
BOOST_LOG(info) << "Setting display " << disp << " primary failed! Are you using Windows 11 24H2?";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set virtual_display to true when everything went fine
|
// Set virtual_display to true when everything went fine
|
||||||
this->virtual_display = true;
|
this->virtual_display = true;
|
||||||
this->display_name = platf::to_utf8(vdisplayName);
|
this->display_name = platf::to_utf8(vdisplayName);
|
||||||
|
|
||||||
|
if (config::video.headless_mode) {
|
||||||
|
// When using headless mode, we don't care which display user configured to use.
|
||||||
|
// So we always set output_name to the newly created virtual display as a workaround for
|
||||||
|
// empty name when probing graphics cards.
|
||||||
|
config::video.output_name = this->display_name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user