enumerate resolutions

use mixed case for prefs values
This commit is contained in:
Chris Danford
2005-11-26 07:22:33 +00:00
parent b948f686cc
commit 730a113ed6
22 changed files with 246 additions and 103 deletions
@@ -3,7 +3,8 @@
/* This handles low-level operations that OGL 1.x doesn't give us. */
#include "RageDisplay.h" // for VideoModeParams
class DisplayResolutions;
class VideoModeParams;
class LowLevelWindow
{
@@ -15,7 +16,8 @@ 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( VideoModeParams p, bool &bNewDeviceOut ) = 0;
virtual CString TryVideoMode( const VideoModeParams &p, bool &bNewDeviceOut ) = 0;
virtual void GetDisplayResolutions( DisplayResolutions &out ) const = 0;
virtual bool IsSoftwareRenderer( CString &sError ) { return false; }
@@ -44,7 +44,7 @@ void *LowLevelWindow_SDL::GetProcAddress(CString s)
return SDL_GL_GetProcAddress(s);
}
CString LowLevelWindow_SDL::TryVideoMode( VideoModeParams p, bool &bNewDeviceOut )
CString LowLevelWindow_SDL::TryVideoMode( const VideoModeParams &p, bool &bNewDeviceOut )
{
bool wasWindowed = CurrentParams.windowed;
@@ -9,7 +9,7 @@ public:
LowLevelWindow_SDL();
~LowLevelWindow_SDL();
void *GetProcAddress(CString s);
CString TryVideoMode( VideoModeParams p, bool &bNewDeviceOut );
CString TryVideoMode( const VideoModeParams &p, bool &bNewDeviceOut );
void SwapBuffers();
void Update();
@@ -4,6 +4,7 @@
#include "StepMania.h"
#include "RageUtil.h"
#include "RageLog.h"
#include "RageDisplay.h"
#include <GL/gl.h>
@@ -46,8 +47,12 @@ LowLevelWindow_Win32::~LowLevelWindow_Win32()
GraphicsWindow::Shutdown();
}
void LowLevelWindow_Win32::GetDisplayResolutions( DisplayResolutions &out ) const
{
GraphicsWindow::GetDisplayResolutions( out );
}
int ChooseWindowPixelFormat( VideoModeParams p, PIXELFORMATDESCRIPTOR *PixelFormat )
int ChooseWindowPixelFormat( const VideoModeParams &p, PIXELFORMATDESCRIPTOR *PixelFormat )
{
ASSERT( GraphicsWindow::GetHwnd() != NULL );
ASSERT( GraphicsWindow::GetHDC() != NULL );
@@ -98,7 +103,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( VideoModeParams p, bool &bNewDeviceOut )
CString LowLevelWindow_Win32::TryVideoMode( const VideoModeParams &p, bool &bNewDeviceOut )
{
//LOG->Warn( "LowLevelWindow_Win32::TryVideoMode" );
@@ -9,7 +9,8 @@ public:
LowLevelWindow_Win32();
~LowLevelWindow_Win32();
void *GetProcAddress( CString s );
CString TryVideoMode( VideoModeParams p, bool &bNewDeviceOut );
CString TryVideoMode( const VideoModeParams &p, bool &bNewDeviceOut );
void GetDisplayResolutions( DisplayResolutions &out ) const;
bool IsSoftwareRenderer( CString &sError );
void SwapBuffers();
void Update();
@@ -50,7 +50,7 @@ void *LowLevelWindow_X11::GetProcAddress( CString s )
return (void*) glXGetProcAddressARB( (const GLubyte*) s.c_str() );
}
CString LowLevelWindow_X11::TryVideoMode( VideoModeParams p, bool &bNewDeviceOut )
CString LowLevelWindow_X11::TryVideoMode( const VideoModeParams &p, bool &bNewDeviceOut )
{
#if defined(LINUX)
/* nVidia cards: