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:
parent
64150bcb5b
commit
3fe9b1590c
1 changed files with 8 additions and 3 deletions
|
@ -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());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue