test(videoout): skip before the first VideoOut call without a display

The unopened-handle checks call sceVideoOutIsOutputSupported before
sceVideoOutOpen, and that first call builds the VideoOut driver, whose
window creation throws without a Vulkan-capable SDL driver. The throw
left main before the skip, so the test aborted on the Linux runner:
'DisplayWindow: Vulkan support is either not configured in SDL or not
available in current SDL video driver (offscreen) or platform'.
Run those checks inside the same skip.
This commit is contained in:
Dean Galvin 2026-10-10 16:13:01 +13:00
parent 19d620dec5
commit 57a7ed801d
1 changed files with 4 additions and 5 deletions

View File

@ -35,13 +35,12 @@ int main() {
for (std::size_t index = 0; index < raw.size(); ++index) Require(raw[index] == (index == 2 ? 0xFF : 0));
Require(sceVideoOutInitializeOutputOptions(nullptr) == INVALID_ADDRESS);
for (int handle : {-1, 0, 1, 0x7FFFFFFF}) {
Require(sceVideoOutIsOutputSupported(handle, 1, &options, nullptr, 0) == INVALID_HANDLE);
Require(sceVideoOutIsOutputSupported(handle, 2, nullptr, &options, 1) == INVALID_HANDLE);
}
int handle = 0;
try {
for (int unopened : {-1, 0, 1, 0x7FFFFFFF}) {
Require(sceVideoOutIsOutputSupported(unopened, 1, &options, nullptr, 0) == INVALID_HANDLE);
Require(sceVideoOutIsOutputSupported(unopened, 2, nullptr, &options, 1) == INVALID_HANDLE);
}
handle = sceVideoOutOpen(SYSTEM_USER, MAIN_BUS, 0, nullptr);
} catch (const std::runtime_error& error) {
if (std::getenv("ANYPS5_REQUIRE_DISPLAY") != nullptr) throw;