Changeset View
Changeset View
Standalone View
Standalone View
source/ps/VideoMode.cpp
Show First 20 Lines • Show All 236 Lines • ▼ Show 20 Lines | #endif | ||||
// by destroying the context *before* the driver's atexit hook is called. | // by destroying the context *before* the driver's atexit hook is called. | ||||
// (Note that atexit hooks are guaranteed to be called in reverse order of their registration.) | // (Note that atexit hooks are guaranteed to be called in reverse order of their registration.) | ||||
atexit(SDL_Quit); | atexit(SDL_Quit); | ||||
// End work around. | // End work around. | ||||
ogl_Init(); // required after each mode change | ogl_Init(); // required after each mode change | ||||
// (TODO: does that mean we need to call this when toggling fullscreen later?) | // (TODO: does that mean we need to call this when toggling fullscreen later?) | ||||
#if !OS_ANDROID | |||||
u16 ramp[256]; | |||||
SDL_CalculateGammaRamp(g_Gamma, ramp); | |||||
if (SDL_SetWindowGammaRamp(m_Window, ramp, ramp, ramp) < 0) | |||||
LOGWARNING("SDL_SetWindowGammaRamp failed"); | |||||
#endif | |||||
m_IsInitialised = true; | m_IsInitialised = true; | ||||
if (!m_ConfigFullscreen) | if (!m_ConfigFullscreen) | ||||
{ | { | ||||
m_WindowedW = w; | m_WindowedW = w; | ||||
m_WindowedH = h; | m_WindowedH = h; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 276 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator