Disallow resizing windows when videorecorder is compiled in

This commit is contained in:
def 2020-01-03 21:40:41 +01:00
parent a0362019f0
commit 54ae929b2f
2 changed files with 3 additions and 1 deletions

View file

@ -2049,7 +2049,9 @@ int CGraphics_Threaded::IssueInit()
if(g_Config.m_GfxBorderless) Flags |= IGraphicsBackend::INITFLAG_BORDERLESS;
if(g_Config.m_GfxFullscreen) Flags |= IGraphicsBackend::INITFLAG_FULLSCREEN;
if(g_Config.m_GfxVsync) Flags |= IGraphicsBackend::INITFLAG_VSYNC;
#ifndef CONF_VIDEORECORDER
if(g_Config.m_GfxResizable) Flags |= IGraphicsBackend::INITFLAG_RESIZABLE;
#endif
int r = m_pBackend->Init("DDNet Client", &g_Config.m_GfxScreen, &g_Config.m_GfxScreenWidth, &g_Config.m_GfxScreenHeight, g_Config.m_GfxFsaaSamples, Flags, &m_DesktopScreenWidth, &m_DesktopScreenHeight, &m_ScreenWidth, &m_ScreenHeight, m_pStorage);
m_UseOpenGL3_3 = m_pBackend->IsOpenGL3_3();

View file

@ -281,7 +281,7 @@ int CInput::Update()
switch (Event.window.event)
{
case SDL_WINDOWEVENT_RESIZED:
#if defined(SDL_VIDEO_DRIVER_X11)
#if defined(SDL_VIDEO_DRIVER_X11) and !defined(CONF_VIDEORECORDER)
Graphics()->Resize(Event.window.data1, Event.window.data2);
#endif
break;