Changeset View
Changeset View
Standalone View
Standalone View
source/tools/atlas/GameInterface/Handlers/GraphicsSetupHandlers.cpp
Show All 23 Lines | |||||
#include "../View.h" | #include "../View.h" | ||||
#include "graphics/GameView.h" | #include "graphics/GameView.h" | ||||
#include "graphics/ObjectManager.h" | #include "graphics/ObjectManager.h" | ||||
#include "lib/external_libraries/libsdl.h" | #include "lib/external_libraries/libsdl.h" | ||||
#include "lib/ogl.h" | #include "lib/ogl.h" | ||||
#include "maths/MathUtil.h" | #include "maths/MathUtil.h" | ||||
#include "ps/CConsole.h" | #include "ps/CConsole.h" | ||||
#include "ps/ConfigDB.h" | |||||
#include "ps/Game.h" | #include "ps/Game.h" | ||||
#include "ps/VideoMode.h" | #include "ps/VideoMode.h" | ||||
#include "ps/GameSetup/Config.h" | #include "ps/GameSetup/Config.h" | ||||
#include "ps/GameSetup/GameSetup.h" | #include "ps/GameSetup/GameSetup.h" | ||||
#include "renderer/Renderer.h" | #include "renderer/Renderer.h" | ||||
namespace AtlasMessage { | namespace AtlasMessage { | ||||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
UNUSED2(msg); | UNUSED2(msg); | ||||
ogl_Init(); | ogl_Init(); | ||||
InitGraphics(g_AtlasGameLoop->args, g_InitFlags, {}); | InitGraphics(g_AtlasGameLoop->args, g_InitFlags, {}); | ||||
#if OS_WIN | #if OS_WIN | ||||
// HACK (to stop things looking very ugly when scrolling) - should | // HACK (to stop things looking very ugly when scrolling) | ||||
// use proper config system. | int interval = 1; | ||||
if(ogl_HaveExtension("WGL_EXT_swap_control")) | CFG_GET_VAL("sdl.swapinterval", interval); | ||||
pwglSwapIntervalEXT(1); | SDL_GL_SetSwapInterval(interval); | ||||
#endif | #endif | ||||
} | } | ||||
MESSAGEHANDLER(Shutdown) | MESSAGEHANDLER(Shutdown) | ||||
{ | { | ||||
UNUSED2(msg); | UNUSED2(msg); | ||||
▲ Show 20 Lines • Show All 101 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator