mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
b10a817f7e
Remove some useless includes from the launcher See merge request OpenMW/openmw!775 (cherry picked from commit a84bd643b334eb6ac715681c497184ac22212ced) d3fff8cf Remove some useless includes from the launcher
25 lines
540 B
C++
25 lines
540 B
C++
#include <signal.h>
|
|
|
|
#include <SDL.h>
|
|
|
|
bool initSDL()
|
|
{
|
|
SDL_SetHint(SDL_HINT_RENDER_DRIVER, "software");
|
|
SDL_SetMainReady();
|
|
// Required for determining screen resolution and such on the Graphics tab
|
|
if (SDL_Init(SDL_INIT_VIDEO) != 0)
|
|
{
|
|
return false;
|
|
}
|
|
signal(SIGINT, SIG_DFL); // We don't want to use the SDL event loop in the launcher,
|
|
// so reset SIGINT which SDL wants to redirect to an SDL_Quit event.
|
|
|
|
return true;
|
|
}
|
|
|
|
void quitSDL()
|
|
{
|
|
// Disconnect from SDL processes
|
|
SDL_Quit();
|
|
}
|