mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-23 00:53:02 -05:00
test(libSceVideoOut): run the VideoOut flip tests with SDL's windows driver on Windows
ANYPS5_VIDEO_OUT_TEST_DRIVER defaulted to SDL's offscreen driver on every host. That driver has no Vulkan on Windows, so all thirteen flip tests that open a display skipped there. Windows now defaults to the windows driver. A machine without a Vulkan driver makes DisplayWindow report that Vulkan lacks VK_KHR_surface, so the flip tests also skip on a DisplayWindow error that names Vulkan, as they do on offscreen's message.
This commit is contained in:
1 parent
0225ae65a7
commit
f4f60cf277
2 files changed
+9
-2
No files matched your search
@@ -84,7 +84,12 @@ if(BUILD_TESTING)
|
||||
set_tests_properties(guest_video_out_cursor PROPERTIES ENVIRONMENT_MODIFICATION
|
||||
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
|
||||
endif()
|
||||
set(ANYPS5_VIDEO_OUT_TEST_DRIVER "offscreen" CACHE STRING
|
||||
if(WIN32)
|
||||
set(videoOutTestDriver "windows")
|
||||
else()
|
||||
set(videoOutTestDriver "offscreen")
|
||||
endif()
|
||||
set(ANYPS5_VIDEO_OUT_TEST_DRIVER "${videoOutTestDriver}" CACHE STRING
|
||||
"SDL video driver for VideoOut flip tests")
|
||||
|
||||
foreach(flipMode IN ITEMS labels labels_main)
|
||||
|
||||
@@ -1054,7 +1054,9 @@ int main(int argc, char** argv) {
|
||||
std::fprintf(stderr, "%s\n", error.what());
|
||||
try { LibcRunShutdown_nid_postfix(); }
|
||||
catch (const std::exception& shutdown) { std::fprintf(stderr, "shutdown: %s\n", shutdown.what()); }
|
||||
if (std::string(error.what()).find("Vulkan support") != std::string::npos && !std::getenv("ANYPS5_REQUIRE_DISPLAY")) {
|
||||
const std::string what = error.what();
|
||||
const bool noVulkanWindow = what.find("Vulkan support") != std::string::npos || (what.starts_with("DisplayWindow: ") && what.find("Vulkan") != std::string::npos);
|
||||
if (noVulkanWindow && !std::getenv("ANYPS5_REQUIRE_DISPLAY")) {
|
||||
std::printf("skipped, no display or Vulkan device: %s\n", error.what());
|
||||
return 77;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user