move VideoModeParams out of RageDisplay to reduce header dependencies

This commit is contained in:
Chris Danford
2005-11-10 18:37:04 +00:00
parent af115bab90
commit 7f5a4b8373
10 changed files with 106 additions and 88 deletions
@@ -3,7 +3,7 @@
/* This handles low-level operations that OGL 1.x doesn't give us. */
#include "RageDisplay.h" // for RageDisplay::VideoModeParams
#include "RageDisplay.h" // for VideoModeParams
class LowLevelWindow
{
@@ -15,12 +15,12 @@ public:
// Return "" if mode change was successful, otherwise an error message.
// bNewDeviceOut is set true if a new device was created and textures
// need to be reloaded.
virtual CString TryVideoMode( RageDisplay::VideoModeParams p, bool &bNewDeviceOut ) = 0;
virtual CString TryVideoMode( VideoModeParams p, bool &bNewDeviceOut ) = 0;
virtual void SwapBuffers() = 0;
virtual void Update() { }
virtual RageDisplay::VideoModeParams GetVideoModeParams() const = 0;
virtual VideoModeParams GetVideoModeParams() const = 0;
};
#endif
@@ -45,7 +45,7 @@ LowLevelWindow_Win32::~LowLevelWindow_Win32()
}
int ChooseWindowPixelFormat( RageDisplay::VideoModeParams p, PIXELFORMATDESCRIPTOR *PixelFormat )
int ChooseWindowPixelFormat( VideoModeParams p, PIXELFORMATDESCRIPTOR *PixelFormat )
{
ASSERT( GraphicsWindow::GetHwnd() != NULL );
ASSERT( GraphicsWindow::GetHDC() != NULL );
@@ -94,7 +94,7 @@ void DumpPixelFormat( const PIXELFORMATDESCRIPTOR &pfd )
/* This function does not reset the video mode if it fails, because we might be trying
* yet another video mode, so we'd just thrash the display. On fatal error,
* LowLevelWindow_Win32::~LowLevelWindow_Win32 will call Shutdown(). */
CString LowLevelWindow_Win32::TryVideoMode( RageDisplay::VideoModeParams p, bool &bNewDeviceOut )
CString LowLevelWindow_Win32::TryVideoMode( VideoModeParams p, bool &bNewDeviceOut )
{
ASSERT_M( p.bpp == 16 || p.bpp == 32, ssprintf("%i", p.bpp) );
@@ -221,9 +221,11 @@ void LowLevelWindow_Win32::Update()
GraphicsWindow::Update();
}
RageDisplay::VideoModeParams LowLevelWindow_Win32::GetVideoModeParams() const
VideoModeParams LowLevelWindow_Win32::GetVideoModeParams() const
{
return GraphicsWindow::GetParams();
VideoModeParams p;
GraphicsWindow::GetParams( p );
return p;
}
/*
@@ -9,11 +9,11 @@ public:
LowLevelWindow_Win32();
~LowLevelWindow_Win32();
void *GetProcAddress( CString s );
CString TryVideoMode( RageDisplay::VideoModeParams p, bool &bNewDeviceOut );
CString TryVideoMode( VideoModeParams p, bool &bNewDeviceOut );
void SwapBuffers();
void Update();
RageDisplay::VideoModeParams GetVideoModeParams() const;
VideoModeParams GetVideoModeParams() const;
};
#ifdef ARCH_LOW_LEVEL_WINDOW