mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-12 18:51:15 +00:00
remove test window which causes a bug in the vita sdl port to show up
This commit is contained in:
parent
0e59b3847c
commit
40a34ef48e
@ -313,7 +313,7 @@ SDL_AppResult SDL_AppInit(void** appstate, int argc, char** argv)
|
||||
PVRSRVCreateVirtualAppHint(&hint);
|
||||
#endif
|
||||
|
||||
if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK)) {
|
||||
if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK | SDL_INIT_GAMEPAD)) {
|
||||
char buffer[256];
|
||||
SDL_snprintf(
|
||||
buffer,
|
||||
|
||||
@ -9,6 +9,7 @@ FetchContent_Declare(
|
||||
GIT_REPOSITORY "https://github.com/libsdl-org/SDL.git"
|
||||
GIT_TAG "main"
|
||||
EXCLUDE_FROM_ALL
|
||||
UPDATE_DISCONNECTED TRUE
|
||||
PATCH_COMMAND git apply "${SDL3_PATCH_FILE}"
|
||||
)
|
||||
|
||||
|
||||
@ -35,17 +35,9 @@ Direct3DRMRenderer* OpenGLES2Renderer::Create(DWORD width, DWORD height)
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
|
||||
|
||||
SDL_Window* window = DDWindow;
|
||||
bool testWindow = false;
|
||||
if (!window) {
|
||||
window = SDL_CreateWindow("OpenGL ES 2.0 test", width, height, SDL_WINDOW_HIDDEN | SDL_WINDOW_OPENGL);
|
||||
testWindow = true;
|
||||
}
|
||||
|
||||
SDL_GLContext context = SDL_GL_CreateContext(window);
|
||||
if (!context) {
|
||||
if (testWindow) {
|
||||
SDL_DestroyWindow(window);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -202,10 +194,6 @@ Direct3DRMRenderer* OpenGLES2Renderer::Create(DWORD width, DWORD height)
|
||||
glDeleteShader(vs);
|
||||
glDeleteShader(fs);
|
||||
|
||||
if (testWindow) {
|
||||
SDL_DestroyWindow(window);
|
||||
}
|
||||
|
||||
return new OpenGLES2Renderer(width, height, context, fbo, colorTex, depthRb, shaderProgram);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user