#include "CContext.hpp" #include "API/GraphicsAPI.hpp" #include #include bool CContext::m_screenSaver = false; void CContext::init(SDL_InitFlags sdlFlags) { // Log initialisation. initLog(); // SDL Initialization. if (SDL_Init(sdlFlags)) { SDL_Quit(); //HandleException(CLibException(std::string("Unable to initialize SDL: ") + SDL_GetError()), true); } GraphicsAPI::initAPI(); } bool CContext::isScreenSaverEnable(void) { return m_screenSaver; } void CContext::setScreenSaverEnable(bool newScreenSaver) { m_screenSaver = newScreenSaver; if (m_screenSaver) { SDL_EnableScreenSaver(); } else { SDL_DisableScreenSaver(); } } void CContext::quit(void) { SDL_Quit(); } void CContext::initLog(void) { //todo }