mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Headless: Make all GPU backends work correctly on Windows
This commit is contained in:
1 parent
25cf52176f
commit
551e4cd0ab
11 files changed
+85
-62
No files matched your search
@@ -37,17 +37,20 @@
|
||||
|
||||
const bool WINDOW_VISIBLE = false;
|
||||
|
||||
void *CreateHiddenWindow(int w, int h) {
|
||||
WindowDesc CreateHiddenWindow(int w, int h) {
|
||||
Uint32 flags = SDL_WINDOW_OPENGL | SDL_WINDOW_BORDERLESS;
|
||||
if (!WINDOW_VISIBLE) {
|
||||
flags |= SDL_WINDOW_HIDDEN;
|
||||
}
|
||||
return SDL_CreateWindow("PPSSPPHeadless", w, h, flags);
|
||||
WindowDesc desc;
|
||||
desc.data2 = SDL_CreateWindow("PPSSPPHeadless", w, h, flags);
|
||||
desc.winsys = WindowSystem::WINDOWSYSTEM_SDL;
|
||||
return desc;
|
||||
}
|
||||
|
||||
void DestroyHiddenWindow(void *window) {
|
||||
if (window) {
|
||||
SDL_DestroyWindow(static_cast<SDL_Window *>(window));
|
||||
void DestroyHiddenWindow(WindowDesc window) {
|
||||
if (window.data2) {
|
||||
SDL_DestroyWindow(static_cast<SDL_Window *>(window.data2));
|
||||
SDL_Quit();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user