- partial cleanup of Framebuffer interface

This commit is contained in:
Christoph Oelckers 2022-05-20 11:09:38 +02:00
parent c3300ad88e
commit 49a395f561
7 changed files with 14 additions and 16 deletions

View file

@ -519,7 +519,6 @@ static SystemBaseFrameBuffer* frameBuffer;
SystemBaseFrameBuffer::SystemBaseFrameBuffer(void*, const bool fullscreen)
: DFrameBuffer(vid_defwidth, vid_defheight)
, m_fullscreen(false)
, m_hiDPI(false)
, m_window(nullptr)

View file

@ -11,7 +11,7 @@ class SystemBaseFrameBuffer : public DFrameBuffer
public:
// this must have the same parameters as the Windows version, even if they are not used!
SystemBaseFrameBuffer (void *hMonitor, bool fullscreen);
SystemBaseFrameBuffer(void *hMonitor, bool fullscreen);
bool IsFullscreen() override;

View file

@ -200,7 +200,7 @@ public:
SDLVideo ();
~SDLVideo ();
DFrameBuffer *CreateFrameBuffer (bool fullscreen);
DFrameBuffer *CreateFrameBuffer(bool fullscreen);
private:
#ifdef HAVE_VULKAN
@ -436,7 +436,7 @@ SDLVideo::~SDLVideo ()
#endif
}
DFrameBuffer *SDLVideo::CreateFrameBuffer (bool fullscreen)
DFrameBuffer *SDLVideo::CreateFrameBuffer(bool fullscreen)
{
SystemBaseFrameBuffer *fb = nullptr;
@ -491,8 +491,7 @@ IVideo *gl_CreateVideo()
// FrameBuffer Implementation -----------------------------------------------
SystemBaseFrameBuffer::SystemBaseFrameBuffer (void *, bool fullscreen)
: DFrameBuffer (vid_defwidth, vid_defheight)
SystemBaseFrameBuffer::SystemBaseFrameBuffer(void *, bool fullscreen)
{
if (Priv::window != nullptr)
{
@ -656,7 +655,7 @@ SystemGLFrameBuffer::SystemGLFrameBuffer(void *hMonitor, bool fullscreen)
}
}
SystemGLFrameBuffer::~SystemGLFrameBuffer ()
SystemGLFrameBuffer::~SystemGLFrameBuffer()
{
if (Priv::window)
{

View file

@ -70,9 +70,8 @@ EXTERN_CVAR(Int, screenblocks)
//
//==========================================================================
DFrameBuffer::DFrameBuffer (int width, int height)
DFrameBuffer::DFrameBuffer()
{
SetSize(width, height);
}
DFrameBuffer::~DFrameBuffer()

View file

@ -146,8 +146,7 @@ class DDummyFrameBuffer : public DFrameBuffer
{
typedef DFrameBuffer Super;
public:
DDummyFrameBuffer (int width, int height)
: DFrameBuffer (0, 0)
DDummyFrameBuffer(int width, int height)
{
SetVirtualSize(width, height);
}
@ -372,9 +371,9 @@ void V_InitScreenSize ()
vid_defheight = height;
}
void V_InitScreen()
void V_InitScreen(int width, int height)
{
screen = new DDummyFrameBuffer (vid_defwidth, vid_defheight);
screen = new DDummyFrameBuffer(width, height);
}
void V_Init2()

View file

@ -156,7 +156,7 @@ public:
double scaleFactor = 1.;
public:
DFrameBuffer (int width=1, int height=1);
DFrameBuffer();
virtual ~DFrameBuffer();
virtual void InitializeState() = 0; // For stuff that needs 'screen' set.
virtual bool IsVulkan() { return false; }
@ -303,7 +303,7 @@ EXTERN_CVAR (Float, vid_gamma)
// Allocates buffer screens, call before R_Init.
void V_InitScreenSize();
void V_InitScreen();
void V_InitScreen(int, int);
// Initializes graphics mode for the first time.
void V_Init2 ();

View file

@ -195,6 +195,8 @@ EXTERN_CVAR (Bool, sv_unlimited_pickup)
EXTERN_CVAR (Bool, r_drawplayersprites)
EXTERN_CVAR (Bool, show_messages)
EXTERN_CVAR(Bool, ticker)
EXTERN_CVAR(Int, vid_defwidth)
EXTERN_CVAR(Int, vid_defheight)
extern bool setmodeneeded;
extern bool demorecording;
@ -3114,7 +3116,7 @@ static int D_InitGame(const FIWADInfo* iwad_info, TArray<FString>& allwads, TArr
{
V_InitScreenSize();
// This allocates a dummy framebuffer as a stand-in until V_Init2 is called.
V_InitScreen ();
V_InitScreen (vid_defwidth, vid_defheight);
if (StartScreen != nullptr)
{