Consolidate test window creation code

This commit is contained in:
Cameron Gutman
2026-04-09 21:43:29 -05:00
parent 94d47e95fe
commit 1fc1122c65
4 changed files with 35 additions and 28 deletions
+6 -14
View File
@@ -184,21 +184,13 @@ void SystemProperties::startAsyncLoad()
return;
}
testWindow = SDL_CreateWindow("", 0, 0, 1280, 720,
SDL_WINDOW_HIDDEN | StreamUtils::getPlatformWindowFlags());
testWindow = StreamUtils::createTestWindow();
if (!testWindow) {
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
"Failed to create test window with platform flags: %s",
SDL_GetError());
testWindow = SDL_CreateWindow("", 0, 0, 1280, 720, SDL_WINDOW_HIDDEN);
if (!testWindow) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
"Failed to create window for hardware decode test: %s",
SDL_GetError());
SDL_QuitSubSystem(SDL_INIT_VIDEO);
return;
}
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
"Failed to create window for hardware decode test: %s",
SDL_GetError());
SDL_QuitSubSystem(SDL_INIT_VIDEO);
return;
}
// Update display related attributes (max FPS, native resolution, etc).