mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Only forbid resizing when videorecorder is recording
This commit is contained in:
parent
7d428676e2
commit
47e6c7cce2
|
@ -21,6 +21,10 @@
|
|||
|
||||
#include <math.h> // cosf, sinf, log2f
|
||||
|
||||
#if defined(CONF_VIDEORECORDER)
|
||||
#include "video.h"
|
||||
#endif
|
||||
|
||||
#include "graphics_threaded.h"
|
||||
|
||||
static CVideoMode g_aFakeModes[] = {
|
||||
|
@ -2050,9 +2054,7 @@ int CGraphics_Threaded::IssueInit()
|
|||
if(g_Config.m_GfxFullscreen) Flags |= IGraphicsBackend::INITFLAG_FULLSCREEN;
|
||||
if(g_Config.m_GfxVsync) Flags |= IGraphicsBackend::INITFLAG_VSYNC;
|
||||
if(g_Config.m_GfxHighdpi) Flags |= IGraphicsBackend::INITFLAG_HIGHDPI;
|
||||
#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();
|
||||
|
@ -2186,6 +2188,11 @@ bool CGraphics_Threaded::SetWindowScreen(int Index)
|
|||
|
||||
void CGraphics_Threaded::Resize(int w, int h)
|
||||
{
|
||||
#if defined(CONF_VIDEORECORDER)
|
||||
if (IVideo::Current() && IVideo::Current()->isRecording())
|
||||
return;
|
||||
#endif
|
||||
|
||||
if(m_ScreenWidth == w && m_ScreenHeight == h)
|
||||
return;
|
||||
|
||||
|
|
|
@ -281,7 +281,7 @@ int CInput::Update()
|
|||
switch (Event.window.event)
|
||||
{
|
||||
case SDL_WINDOWEVENT_RESIZED:
|
||||
#if defined(SDL_VIDEO_DRIVER_X11) && !defined(CONF_VIDEORECORDER)
|
||||
#if defined(SDL_VIDEO_DRIVER_X11)
|
||||
Graphics()->Resize(Event.window.data1, Event.window.data2);
|
||||
#endif
|
||||
break;
|
||||
|
|
|
@ -60,6 +60,7 @@ public:
|
|||
virtual void start();
|
||||
virtual void stop();
|
||||
virtual void pause(bool p);
|
||||
virtual bool isRecording() { return m_Recording; }
|
||||
|
||||
virtual void nextVideoFrame();
|
||||
virtual void nextVideoFrame_thread();
|
||||
|
|
|
@ -11,6 +11,7 @@ public:
|
|||
virtual void start() = 0;
|
||||
virtual void stop() = 0;
|
||||
virtual void pause(bool p) = 0;
|
||||
virtual bool isRecording() = 0;
|
||||
|
||||
virtual void nextVideoFrame() = 0;
|
||||
virtual bool frameRendered() = 0;
|
||||
|
|
Loading…
Reference in a new issue