1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-08-06 22:30:20 +00:00

SDL 1.2 backend compiles again, but window stays black

This commit is contained in:
fgenesis 2018-04-17 01:28:23 +02:00
parent 64150bcb5b
commit 3fe9b1590c

View file

@ -302,7 +302,7 @@ void Core::initGraphics(int w, int h, int fullscreen, int vsync, int bpp, int di
if(w != oldw || h != oldh) if(w != oldw || h != oldh)
{ {
reloadRes = true; // Always reload resources on SDL 1.2, since it loses the GL context! reloadRes = true; // Always reload resources on SDL 1.2, since it loses the GL context!
createWindow(w, h, false, fullscreen, bpp); createWindow(w, h, false, fullscreen, bpp, 0);
} }
#endif #endif
@ -706,15 +706,20 @@ void Core::init()
{ {
setupFileAccess(); setupFileAccess();
unsigned sdlflags = SDL_INIT_EVERYTHING;
quitNestedMainFlag = false; quitNestedMainFlag = false;
#ifndef BBGE_BUILD_SDL2 #ifdef BBGE_BUILD_SDL2
// Haptic is inited separately, in Jostick.cpp, when a joystick is actually plugged in
sdlflags &= ~SDL_INIT_HAPTIC;
#else
// Disable relative mouse motion at the edges of the screen, which breaks // Disable relative mouse motion at the edges of the screen, which breaks
// mouse control for absolute input devices like Wacom tablets and touchscreens. // mouse control for absolute input devices like Wacom tablets and touchscreens.
SDL_putenv((char *) "SDL_MOUSE_RELATIVE=0"); SDL_putenv((char *) "SDL_MOUSE_RELATIVE=0");
#endif #endif
// Haptic is inited separately, in Jostick.cpp, when a joystick is actually plugged in // Haptic is inited separately, in Jostick.cpp, when a joystick is actually plugged in
if((SDL_Init(SDL_INIT_EVERYTHING & ~SDL_INIT_HAPTIC))==-1) if((SDL_Init(sdlflags))==-1)
{ {
std::string msg("Failed to init SDL: "); std::string msg("Failed to init SDL: ");
msg.append(SDL_GetError()); msg.append(SDL_GetError());