- Added vid_refreshrate cvar to override Windows' automatic refresh rate

selection.


SVN r754 (trunk)
This commit is contained in:
Randy Heit 2008-02-19 02:48:56 +00:00
commit f2c9227243
6 changed files with 83 additions and 4 deletions

View file

@ -150,6 +150,7 @@ CVAR (Int, vid_defbits, 8, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
CVAR (Bool, vid_fps, false, 0)
CVAR (Bool, ticker, false, 0)
CVAR (Int, vid_showpalette, 0, 0)
CUSTOM_CVAR (Bool, vid_vsync, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
{
if (screen != NULL)
@ -158,6 +159,14 @@ CUSTOM_CVAR (Bool, vid_vsync, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
}
}
CUSTOM_CVAR (Int, vid_refreshrate, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
{
if (screen != NULL)
{
screen->NewRefreshRate();
}
}
CUSTOM_CVAR (Float, dimamount, 0.2f, CVAR_ARCHIVE)
{
if (self < 0.f)
@ -1075,6 +1084,19 @@ void DFrameBuffer::SetVSync (bool vsync)
{
}
//==========================================================================
//
// DFrameBuffer :: NewRefreshRate
//
// Sets the fullscreen display to the new refresh rate in vid_refreshrate,
// if possible.
//
//==========================================================================
void DFrameBuffer::NewRefreshRate ()
{
}
//==========================================================================
//
// DFrameBuffer :: SetBlendingRect