Changeset View
Changeset View
Standalone View
Standalone View
source/tools/atlas/GameInterface/Handlers/GraphicsSetupHandlers.cpp
Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Lines | MESSAGEHANDLER(InitSDL) | ||||
SDL_GL_LoadLibrary(NULL); // NULL = use default | SDL_GL_LoadLibrary(NULL); // NULL = use default | ||||
// (it shouldn't hurt if this is called multiple times, I think) | // (it shouldn't hurt if this is called multiple times, I think) | ||||
} | } | ||||
MESSAGEHANDLER(InitGraphics) | MESSAGEHANDLER(InitGraphics) | ||||
{ | { | ||||
UNUSED2(msg); | UNUSED2(msg); | ||||
g_VideoMode.CreateBackendDevice(false); | g_VideoMode.CreateBackendDevice(false); | ||||
vladislavbelov: `SDL_GL_GetCurrentWindow` shouldn't guarantee to work, since wxWidgets creates windows not SDL. | |||||
InitGraphics(g_AtlasGameLoop->args, g_InitFlags, {}); | InitGraphics(g_AtlasGameLoop->args, g_InitFlags, {}); | ||||
#if OS_WIN | |||||
// HACK (to stop things looking very ugly when scrolling) - should | |||||
// use proper config system. | |||||
if(ogl_HaveExtension("WGL_EXT_swap_control")) | |||||
pwglSwapIntervalEXT(1); | |||||
#endif | |||||
} | } | ||||
Done Inline ActionsWhy not force always? vladislavbelov: Why not force always? | |||||
Done Inline ActionsTodo said use proper config system but sure I can. Stan: Todo said use proper config system but sure I can. | |||||
MESSAGEHANDLER(Shutdown) | MESSAGEHANDLER(Shutdown) | ||||
{ | { | ||||
UNUSED2(msg); | UNUSED2(msg); | ||||
// Empty the CommandProc, to get rid of its references to entities before | // Empty the CommandProc, to get rid of its references to entities before | ||||
// we kill the EntityManager | // we kill the EntityManager | ||||
▲ Show 20 Lines • Show All 140 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
SDL_GL_GetCurrentWindow shouldn't guarantee to work, since wxWidgets creates windows not SDL.