Commit 7c41db3f authored by Gerhard Stein's avatar Gerhard Stein

Fixed FPS Input Configuration

parent c4acf659
......@@ -98,7 +98,7 @@ void CVideoSettings::init()
mUserVidConf = g_pVideoDriver->getVidConfig();
// Load the config into the GUI
mpFPSSelection->setSelection( mUserVidConf.m_targetfps );
mpFPSSelection->setSelection( g_pTimer->getFrameRate() );
mpOpenGLSwitch->enable( mUserVidConf.m_opengl );
mpOGLFilterSelection->setSelection( mUserVidConf.m_opengl_filter==GL_LINEAR ? "linear" : "nearest" );
mpOGLFilterSelection->enable( mUserVidConf.m_opengl );
......@@ -121,7 +121,7 @@ void CVideoSettings::release()
{
// Save up the changed stuff
mUserVidConf.m_targetfps = mpFPSSelection->getSelection();
g_pTimer->setFPS( mpFPSSelection->getSelection() );
#ifdef USE_OPENGL
mUserVidConf.m_opengl_filter = mpOGLFilterSelection->getSelection() == "linear" ? GL_LINEAR : GL_NEAREST;
......
......@@ -185,19 +185,19 @@ void CGUIButton::drawNoStyle(SDL_Rect& lRect)
if( mButtonUp )
{
drawRect( blitsfc, &lRect, 1, 0x00BBBBBB, 0x00BFBFBF );
drawRect( blitsfc, &lRect, 1, 0xFFBBBBBB, 0xFFBFBFBF );
}
else if( mButtonDown )
{
drawRect( blitsfc, &lRect, 1, 0x00BBBBBB, 0x00CFCFCF );
drawRect( blitsfc, &lRect, 1, 0xFFBBBBBB, 0xFFCFCFCF );
}
else if( mHovered )
{
drawRect( blitsfc, &lRect, 1, 0x00BBBBBB, 0x00DFDFDF );
drawRect( blitsfc, &lRect, 1, 0xFFBBBBBB, 0xFFDFDFDF );
}
else
{
drawRect( blitsfc, &lRect, 1, 0x00BBBBBB, 0x00FFFFFF );
drawRect( blitsfc, &lRect, 1, 0xFFBBBBBB, 0xFFFFFFFF );
}
// Now lets draw the text of the list control
......
......@@ -97,7 +97,7 @@ void CGUITextSelectionList::processRender(const CRect<float> &RectDispCoordFloat
displayRect.transform(RectDispCoordFloat);
SDL_Rect lRect = displayRect.SDLRect();
SDL_FillRect(Blitsurface, &lRect, 0x00FFFFFF);
SDL_FillRect(Blitsurface, &lRect, 0xFFFFFFFF);
// Now lets draw the text of the list control
CFont &Font = g_pGfxEngine->getFont(mFontID);
......@@ -112,7 +112,7 @@ void CGUITextSelectionList::processRender(const CRect<float> &RectDispCoordFloat
if(mSelection == line)
{
lRect.y = ypos+(line*10)-1;
SDL_FillRect(Blitsurface, &lRect, 0x00C5C5F1);
SDL_FillRect(Blitsurface, &lRect, 0xFFC5C5F1);
}
Font.drawFont(Blitsurface, *it, xpos, ypos+(line*10), false);
}
......
......@@ -46,7 +46,6 @@ void CVidConfig::reset()
#endif
m_ScaleXFilter=1;
Zoom=1;
m_targetfps = 60; // Enable automatic frameskipping by default at 30
#ifdef USE_OPENGL
m_opengl_filter = GL_NEAREST;
......@@ -66,7 +65,6 @@ void CVidConfig::reset()
m_opengl = true;
Zoom = 1;
m_ScaleXFilter = 1;
m_targetfps = 30;
m_aspect_correction = false;
#endif
}
......
......@@ -49,7 +49,6 @@ public:
bool Fullscreen;
short m_ScaleXFilter;
unsigned short Zoom;
unsigned int m_targetfps; // Used for automatic frame skipping
bool m_opengl;
bool m_aspect_correction;
bool m_special_fx;
......
......@@ -29,10 +29,10 @@ bool CVideoEngine::init()
#if defined(CAANOO) || defined(WIZ) || defined(DINGOO) || defined(NANONOTE) || defined(ANDROID)
m_Mode = SDL_SWSURFACE;
#elif defined(GP2X)
m_Mode = SDL_DOUBLEBUF | SDL_HWSURFACE;
m_Mode = SDL_HWSURFACE;
#else
// Support for double-buffering
m_Mode = SDL_DOUBLEBUF | SDL_HWPALETTE | SDL_HWSURFACE;
m_Mode = SDL_HWPALETTE | SDL_HWSURFACE;
#endif
// Enable OpenGL
......@@ -47,7 +47,12 @@ bool CVideoEngine::init()
m_Mode |= SDL_OPENGL;
}
else
#endif
{
m_Mode |= SDL_DOUBLEBUF;
}
// Now we decide if it will be fullscreen or windowed mode.
if(m_VidConfig.Fullscreen)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment