remove unused GetMonitorAspectRatio

This commit is contained in:
Chris Danford
2009-04-08 19:28:49 +00:00
parent ca6f749219
commit e1dee116c7
14 changed files with 0 additions and 46 deletions
-1
View File
@@ -178,7 +178,6 @@ public:
virtual RString GetApiDescription() const = 0;
virtual void GetDisplayResolutions( DisplayResolutions &out ) const = 0;
virtual float GetMonitorAspectRatio() const = 0;
// Don't override this. Override TryVideoMode() instead.
// This will set the video mode to be as close as possible to params.
-10
View File
@@ -325,16 +325,6 @@ void RageDisplay_D3D::GetDisplayResolutions( DisplayResolutions &out ) const
}
}
float RageDisplay_D3D::GetMonitorAspectRatio() const
{
#if defined(XBOX)
VideoModeParams p = GetActualVideoModeParams();
return p.width / (float)p.height;
#else
return g_DesktopMode.Width / (float)g_DesktopMode.Height;
#endif
}
D3DFORMAT FindBackBufferType(bool bWindowed, int iBPP)
{
HRESULT hr;
-1
View File
@@ -12,7 +12,6 @@ public:
virtual RString GetApiDescription() const { return "D3D"; }
virtual void GetDisplayResolutions( DisplayResolutions &out ) const;
virtual float GetMonitorAspectRatio() const;
void ResolutionChanged();
const PixelFormatDesc *GetPixelFormatDesc(PixelFormat pf) const;
-1
View File
@@ -11,7 +11,6 @@ public:
virtual RString GetApiDescription() const { return "Null"; }
virtual void GetDisplayResolutions( DisplayResolutions &out ) const;
virtual float GetMonitorAspectRatio() const { return 4/3.f; }
const PixelFormatDesc *GetPixelFormatDesc(PixelFormat pf) const;
bool BeginFrame() { return true; }
-5
View File
@@ -536,11 +536,6 @@ void RageDisplay_OGL::GetDisplayResolutions( DisplayResolutions &out ) const
g_pWind->GetDisplayResolutions( out );
}
float RageDisplay_OGL::GetMonitorAspectRatio() const
{
return g_pWind->GetMonitorAspectRatio();
}
static void CheckPalettedTextures()
{
RString sError;
-1
View File
@@ -14,7 +14,6 @@ public:
virtual RString GetApiDescription() const { return "OpenGL"; }
virtual void GetDisplayResolutions( DisplayResolutions &out ) const;
virtual float GetMonitorAspectRatio() const;
void ResolutionChanged();
const PixelFormatDesc *GetPixelFormatDesc(PixelFormat pf) const;
@@ -25,7 +25,6 @@ public:
// need to be reloaded.
virtual RString TryVideoMode( const VideoModeParams &p, bool &bNewDeviceOut ) = 0;
virtual void GetDisplayResolutions( DisplayResolutions &out ) const = 0;
virtual float GetMonitorAspectRatio() const = 0;
virtual void LogDebugInformation() const { }
virtual bool IsSoftwareRenderer( RString &sError ) { return false; }
@@ -25,7 +25,6 @@ public:
void *GetProcAddress( RString s );
RString TryVideoMode( const VideoModeParams& p, bool& newDeviceOut );
void GetDisplayResolutions( DisplayResolutions &dr ) const;
float GetMonitorAspectRatio() const;
void SwapBuffers();
void Update();
@@ -62,11 +62,6 @@ void LowLevelWindow_Win32::GetDisplayResolutions( DisplayResolutions &out ) cons
GraphicsWindow::GetDisplayResolutions( out );
}
float LowLevelWindow_Win32::GetMonitorAspectRatio() const
{
return GraphicsWindow::GetMonitorAspectRatio();
}
int ChooseWindowPixelFormat( const VideoModeParams &p, PIXELFORMATDESCRIPTOR *PixelFormat )
{
ASSERT( GraphicsWindow::GetHwnd() != NULL );
@@ -11,7 +11,6 @@ public:
void *GetProcAddress( RString s );
RString TryVideoMode( const VideoModeParams &p, bool &bNewDeviceOut );
void GetDisplayResolutions( DisplayResolutions &out ) const;
float GetMonitorAspectRatio() const;
bool IsSoftwareRenderer( RString &sError );
void SwapBuffers();
void Update();
@@ -316,11 +316,6 @@ void LowLevelWindow_X11::GetDisplayResolutions( DisplayResolutions &out ) const
}
}
float LowLevelWindow_X11::GetMonitorAspectRatio() const
{
return 4.0f/3;
}
bool LowLevelWindow_X11::SupportsThreadedRendering()
{
return g_pBackgroundContext != NULL;
@@ -21,7 +21,6 @@ public:
const VideoModeParams &GetActualVideoModeParams() const { return CurrentParams; }
void GetDisplayResolutions( DisplayResolutions &out ) const;
float GetMonitorAspectRatio() const;
bool SupportsRenderToTexture() const;
RenderTarget *CreateRenderTarget();
@@ -518,18 +518,6 @@ void GraphicsWindow::GetDisplayResolutions( DisplayResolutions &out )
}
}
float GraphicsWindow::GetMonitorAspectRatio()
{
// There's no way to query the monitor for this, so assume that the
// normal desktop resolution is using square pixels.
DEVMODE dm;
ZERO( dm );
dm.dmSize = sizeof(dm);
BOOL bResult = EnumDisplaySettings( NULL, ENUM_REGISTRY_SETTINGS, &dm );
ASSERT( bResult );
return dm.dmPelsWidth / (float)dm.dmPelsHeight;
}
/*
* (c) 2004 Glenn Maynard
@@ -25,7 +25,6 @@ namespace GraphicsWindow
void DestroyGraphicsWindow();
void GetDisplayResolutions( DisplayResolutions &out );
float GetMonitorAspectRatio();
const VideoModeParams &GetParams();
HDC GetHDC();