Commit ca09f55e authored by Gerhard Stein's avatar Gerhard Stein

Cleanups

parent 5eb71be3
......@@ -10,12 +10,12 @@
#include "StringUtils.h"
CCameraSettings::CCameraSettings():
CBaseMenu(CRect<float>(0.15f, 0.24f, 0.7f, 0.4f) ),
CBaseMenu(CRect<float>(0.1f, 0.24f, 0.8f, 0.4f) ),
m_CameraBounds(g_pVideoDriver->getCameraBounds())
{
mpLeftAdjust = new CGUINumberControl( "Left",
50, 270, 10, 60);
50, 270, 10, 60 );
mpMenuDialog->addControl( mpLeftAdjust );
mpRightAdjust = new CGUINumberControl( "Right",
......@@ -31,7 +31,7 @@ m_CameraBounds(g_pVideoDriver->getCameraBounds())
mpMenuDialog->addControl( mpBottomAdjust );
mpSpeedAdjust = new CGUINumberControl( "Speed",
1, 50, 1, 60 );
1, 50, 1, 25 );
mpMenuDialog->addControl( mpSpeedAdjust );
setMenuLabel("OPTIONSMENULABEL");
......@@ -58,5 +58,7 @@ void CCameraSettings::release()
m_CameraBounds.down = mpBottomAdjust->getSelection();
m_CameraBounds.speed = mpSpeedAdjust->getSelection();
g_pVideoDriver->saveCameraBounds(m_CameraBounds);
g_pSettings->saveDrvCfg();
}
......@@ -38,7 +38,11 @@ private:
CVideoSettings::CVideoSettings() :
#if defined(EMBEDDED)
CBaseMenu(CRect<float>(0.15f, 0.24f, 0.65f, 0.25f) )
#else
CBaseMenu(CRect<float>(0.15f, 0.24f, 0.65f, 0.55f) )
#endif
{
// Create the fps config selection control
std::list<std::string> List;
......@@ -65,13 +69,11 @@ CBaseMenu(CRect<float>(0.15f, 0.24f, 0.65f, 0.55f) )
mpSFXSwitch = new CGUISwitch( "Special FX" );
mpMenuDialog->addControl( mpSFXSwitch );
#if !defined(EMBEDDED)
mpCameraButton = new CGUIButton( "Camera",
new OpenMenuEvent( new CCameraSettings() ) );
mpMenuDialog->addControl( mpCameraButton );
#if !defined(EMBEDDED)
mpScalerSelection = new CGUIComboSelection( "Scaler",
filledStrList( 4, "none", "2x", "3x", "4x" ) );
mpMenuDialog->addControl( mpScalerSelection );
......@@ -156,6 +158,8 @@ void CVideoSettings::release()
mUserVidConf.showfps = mpShowFPSSwitch->isEnabled();
mUserVidConf.m_special_fx = mpSFXSwitch->isEnabled();
// In case the user changed something in the camera settings, reload that.
mUserVidConf.m_CameraBounds = g_pVideoDriver->getCameraBounds();
CVidConfig oldVidConf = g_pVideoDriver->getVidConfig();
g_pVideoDriver->setVidConfig(mUserVidConf);
......
......@@ -12,6 +12,7 @@
#define CVIDCONFIG_H_
#include <SDL.h>
#include "hardware/Configurator.h"
const unsigned int RES_BPP = 32;
......@@ -58,11 +59,12 @@ public:
bool showfps;
bool vsync;
#ifdef USE_OPENGL
st_camera_bounds m_CameraBounds;
#if defined(USE_OPENGL)
GLint m_opengl_filter;
#endif
st_camera_bounds m_CameraBounds;
};
#endif /* CVIDCONFIG_H_ */
......@@ -200,12 +200,6 @@ bool CVideoDriver::applyMode()
while(((Res.w/GameRect.w) < m_VidConfig.Zoom || (Res.h/GameRect.h) < m_VidConfig.Zoom) && (m_VidConfig.Zoom > 1))
m_VidConfig.Zoom--;
#if defined(EMBEDDED)
// Force the default settings on iPhone.
// There is no reason yet to play with it, most likely other settings will
// either not work, will crash or will just be totally screwed up.
resetSettings();
#endif
// Check if some zoom/filter modes are illogical and roll them back accordingly
if( (m_VidConfig.Zoom == 3 && m_VidConfig.m_ScaleXFilter == 1) && !m_VidConfig.m_opengl )
......
......@@ -4,6 +4,8 @@
* Created on: 04.06.2009
* Author: gerstrong
*/
#include "hardware/Configurator.h"
#ifdef USE_OPENGL
#include "COpenGL.h"
......
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