Drop framelimit by fps

Framelimit by fps can't be done per coretiming
This commit is contained in:
degasus 2014-02-06 18:41:25 +01:00
parent f7dc918057
commit a51b5f7815
5 changed files with 1 additions and 18 deletions

View File

@ -55,7 +55,7 @@ struct ConfigCache
unsigned int framelimit; unsigned int framelimit;
TEXIDevices m_EXIDevice[MAX_EXI_CHANNELS]; TEXIDevices m_EXIDevice[MAX_EXI_CHANNELS];
std::string strBackend, sBackend; std::string strBackend, sBackend;
bool bSetFramelimit, bSetEXIDevice[MAX_EXI_CHANNELS], bSetUseFPS, bSetVolume, bSetPads[MAX_SI_CHANNELS], bSetWiimoteSource[MAX_BBMOTES]; bool bSetFramelimit, bSetEXIDevice[MAX_EXI_CHANNELS], bSetVolume, bSetPads[MAX_SI_CHANNELS], bSetWiimoteSource[MAX_BBMOTES];
}; };
static ConfigCache config_cache; static ConfigCache config_cache;
@ -114,7 +114,6 @@ bool BootCore(const std::string& _rFilename)
config_cache.Volume = SConfig::GetInstance().m_Volume; config_cache.Volume = SConfig::GetInstance().m_Volume;
config_cache.sBackend = SConfig::GetInstance().sBackend; config_cache.sBackend = SConfig::GetInstance().sBackend;
config_cache.framelimit = SConfig::GetInstance().m_Framelimit; config_cache.framelimit = SConfig::GetInstance().m_Framelimit;
config_cache.bUseFPS = SConfig::GetInstance().b_UseFPS;
for (unsigned int i = 0; i < MAX_BBMOTES; ++i) for (unsigned int i = 0; i < MAX_BBMOTES; ++i)
{ {
config_cache.iWiimoteSource[i] = g_wiimote_sources[i]; config_cache.iWiimoteSource[i] = g_wiimote_sources[i];
@ -150,8 +149,6 @@ bool BootCore(const std::string& _rFilename)
game_ini.Get("Core", "HLE_BS2", &StartUp.bHLE_BS2, StartUp.bHLE_BS2); game_ini.Get("Core", "HLE_BS2", &StartUp.bHLE_BS2, StartUp.bHLE_BS2);
if (game_ini.Get("Core", "FrameLimit", &SConfig::GetInstance().m_Framelimit, SConfig::GetInstance().m_Framelimit)) if (game_ini.Get("Core", "FrameLimit", &SConfig::GetInstance().m_Framelimit, SConfig::GetInstance().m_Framelimit))
config_cache.bSetFramelimit = true; config_cache.bSetFramelimit = true;
if (game_ini.Get("Core", "UseFPS", &SConfig::GetInstance().b_UseFPS, SConfig::GetInstance().b_UseFPS))
config_cache.bSetUseFPS = true;
if (game_ini.Get("DSP", "Volume", &SConfig::GetInstance().m_Volume, SConfig::GetInstance().m_Volume)) if (game_ini.Get("DSP", "Volume", &SConfig::GetInstance().m_Volume, SConfig::GetInstance().m_Volume))
config_cache.bSetVolume = true; config_cache.bSetVolume = true;
game_ini.Get("DSP", "EnableJIT", &SConfig::GetInstance().m_EnableJIT, SConfig::GetInstance().m_EnableJIT); game_ini.Get("DSP", "EnableJIT", &SConfig::GetInstance().m_EnableJIT, SConfig::GetInstance().m_EnableJIT);
@ -269,8 +266,6 @@ void Stop()
// Only change these back if they were actually set by game ini, since they can be changed while a game is running. // Only change these back if they were actually set by game ini, since they can be changed while a game is running.
if (config_cache.bSetFramelimit) if (config_cache.bSetFramelimit)
SConfig::GetInstance().m_Framelimit = config_cache.framelimit; SConfig::GetInstance().m_Framelimit = config_cache.framelimit;
if (config_cache.bSetUseFPS)
SConfig::GetInstance().b_UseFPS = config_cache.bUseFPS;
if (config_cache.bSetVolume) if (config_cache.bSetVolume)
SConfig::GetInstance().m_Volume = config_cache.Volume; SConfig::GetInstance().m_Volume = config_cache.Volume;

View File

@ -256,7 +256,6 @@ void SConfig::SaveSettings()
ini.Set("Core", "RunCompareServer", m_LocalCoreStartupParameter.bRunCompareServer); ini.Set("Core", "RunCompareServer", m_LocalCoreStartupParameter.bRunCompareServer);
ini.Set("Core", "RunCompareClient", m_LocalCoreStartupParameter.bRunCompareClient); ini.Set("Core", "RunCompareClient", m_LocalCoreStartupParameter.bRunCompareClient);
ini.Set("Core", "FrameLimit", m_Framelimit); ini.Set("Core", "FrameLimit", m_Framelimit);
ini.Set("Core", "UseFPS", b_UseFPS);
// GFX Backend // GFX Backend
ini.Set("Core", "GFXBackend", m_LocalCoreStartupParameter.m_strVideoBackend); ini.Set("Core", "GFXBackend", m_LocalCoreStartupParameter.m_strVideoBackend);
@ -419,7 +418,6 @@ void SConfig::LoadSettings()
ini.Get("Core", "FastDiscSpeed", &m_LocalCoreStartupParameter.bFastDiscSpeed, false); ini.Get("Core", "FastDiscSpeed", &m_LocalCoreStartupParameter.bFastDiscSpeed, false);
ini.Get("Core", "DCBZ", &m_LocalCoreStartupParameter.bDCBZOFF, false); ini.Get("Core", "DCBZ", &m_LocalCoreStartupParameter.bDCBZOFF, false);
ini.Get("Core", "FrameLimit", &m_Framelimit, 1); // auto frame limit by default ini.Get("Core", "FrameLimit", &m_Framelimit, 1); // auto frame limit by default
ini.Get("Core", "UseFPS", &b_UseFPS, false); // use vps as default
// GFX Backend // GFX Backend
ini.Get("Core", "GFXBackend", &m_LocalCoreStartupParameter.m_strVideoBackend, ""); ini.Get("Core", "GFXBackend", &m_LocalCoreStartupParameter.m_strVideoBackend, "");

View File

@ -51,7 +51,6 @@ struct SConfig : NonCopyable
int m_InterfaceLanguage; int m_InterfaceLanguage;
// framelimit choose // framelimit choose
unsigned int m_Framelimit; unsigned int m_Framelimit;
bool b_UseFPS;
// other interface settings // other interface settings
bool m_InterfaceToolbar; bool m_InterfaceToolbar;
bool m_InterfaceStatusbar; bool m_InterfaceStatusbar;

View File

@ -118,7 +118,6 @@ EVT_CHECKBOX(ID_CPUTHREAD, CConfigMain::CoreSettingsChanged)
EVT_CHECKBOX(ID_IDLESKIP, CConfigMain::CoreSettingsChanged) EVT_CHECKBOX(ID_IDLESKIP, CConfigMain::CoreSettingsChanged)
EVT_CHECKBOX(ID_ENABLECHEATS, CConfigMain::CoreSettingsChanged) EVT_CHECKBOX(ID_ENABLECHEATS, CConfigMain::CoreSettingsChanged)
EVT_CHOICE(ID_FRAMELIMIT, CConfigMain::CoreSettingsChanged) EVT_CHOICE(ID_FRAMELIMIT, CConfigMain::CoreSettingsChanged)
EVT_CHECKBOX(ID_FRAMELIMIT_USEFPSFORLIMITING, CConfigMain::CoreSettingsChanged)
EVT_RADIOBOX(ID_CPUENGINE, CConfigMain::CoreSettingsChanged) EVT_RADIOBOX(ID_CPUENGINE, CConfigMain::CoreSettingsChanged)
EVT_CHECKBOX(ID_NTSCJ, CConfigMain::CoreSettingsChanged) EVT_CHECKBOX(ID_NTSCJ, CConfigMain::CoreSettingsChanged)
@ -324,7 +323,6 @@ void CConfigMain::InitializeGUIValues()
SkipIdle->SetValue(startup_params.bSkipIdle); SkipIdle->SetValue(startup_params.bSkipIdle);
EnableCheats->SetValue(startup_params.bEnableCheats); EnableCheats->SetValue(startup_params.bEnableCheats);
Framelimit->SetSelection(SConfig::GetInstance().m_Framelimit); Framelimit->SetSelection(SConfig::GetInstance().m_Framelimit);
UseFPSForLimiting->SetValue(SConfig::GetInstance().b_UseFPS);
// General - Advanced // General - Advanced
for (unsigned int a = 0; a < (sizeof(CPUCores) / sizeof(CPUCore)); ++a) for (unsigned int a = 0; a < (sizeof(CPUCores) / sizeof(CPUCore)); ++a)
@ -549,7 +547,6 @@ void CConfigMain::CreateGUIControls()
EnableCheats = new wxCheckBox(GeneralPage, ID_ENABLECHEATS, _("Enable Cheats"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); EnableCheats = new wxCheckBox(GeneralPage, ID_ENABLECHEATS, _("Enable Cheats"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
// Framelimit // Framelimit
Framelimit = new wxChoice(GeneralPage, ID_FRAMELIMIT, wxDefaultPosition, wxDefaultSize, arrayStringFor_Framelimit, 0, wxDefaultValidator); Framelimit = new wxChoice(GeneralPage, ID_FRAMELIMIT, wxDefaultPosition, wxDefaultSize, arrayStringFor_Framelimit, 0, wxDefaultValidator);
UseFPSForLimiting = new wxCheckBox(GeneralPage, ID_FRAMELIMIT_USEFPSFORLIMITING, _("Limit by FPS"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
// Core Settings - Advanced // Core Settings - Advanced
CPUEngine = new wxRadioBox(GeneralPage, ID_CPUENGINE, _("CPU Emulator Engine"), wxDefaultPosition, wxDefaultSize, arrayStringFor_CPUEngine, 0, wxRA_SPECIFY_ROWS); CPUEngine = new wxRadioBox(GeneralPage, ID_CPUENGINE, _("CPU Emulator Engine"), wxDefaultPosition, wxDefaultSize, arrayStringFor_CPUEngine, 0, wxRA_SPECIFY_ROWS);
_NTSCJ = new wxCheckBox(GeneralPage, ID_NTSCJ, _("Force Console as NTSC-J"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); _NTSCJ = new wxCheckBox(GeneralPage, ID_NTSCJ, _("Force Console as NTSC-J"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
@ -558,7 +555,6 @@ void CConfigMain::CreateGUIControls()
wxBoxSizer* sFramelimit = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* sFramelimit = new wxBoxSizer(wxHORIZONTAL);
sFramelimit->Add(TEXT_BOX(GeneralPage, _("Framelimit:")), 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT | wxBOTTOM, 5); sFramelimit->Add(TEXT_BOX(GeneralPage, _("Framelimit:")), 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT | wxBOTTOM, 5);
sFramelimit->Add(Framelimit, 0, wxLEFT | wxRIGHT | wxBOTTOM | wxEXPAND, 5); sFramelimit->Add(Framelimit, 0, wxLEFT | wxRIGHT | wxBOTTOM | wxEXPAND, 5);
sFramelimit->Add(UseFPSForLimiting, 0, wxALL | wxEXPAND, 5);
wxStaticBoxSizer* const sbBasic = new wxStaticBoxSizer(wxVERTICAL, GeneralPage, _("Basic Settings")); wxStaticBoxSizer* const sbBasic = new wxStaticBoxSizer(wxVERTICAL, GeneralPage, _("Basic Settings"));
sbBasic->Add(CPUThread, 0, wxALL, 5); sbBasic->Add(CPUThread, 0, wxALL, 5);
sbBasic->Add(SkipIdle, 0, wxALL, 5); sbBasic->Add(SkipIdle, 0, wxALL, 5);
@ -890,9 +886,6 @@ void CConfigMain::CoreSettingsChanged(wxCommandEvent& event)
SConfig::GetInstance().m_Framelimit = Framelimit->GetSelection(); SConfig::GetInstance().m_Framelimit = Framelimit->GetSelection();
AudioCommon::UpdateSoundStream(); AudioCommon::UpdateSoundStream();
break; break;
case ID_FRAMELIMIT_USEFPSFORLIMITING:
SConfig::GetInstance().b_UseFPS = UseFPSForLimiting->IsChecked();
break;
// Core - Advanced // Core - Advanced
case ID_CPUENGINE: case ID_CPUENGINE:
SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore = CPUCores[CPUEngine->GetSelection()].CPUid; SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore = CPUCores[CPUEngine->GetSelection()].CPUid;

View File

@ -53,7 +53,6 @@ private:
ID_IDLESKIP, ID_IDLESKIP,
ID_ENABLECHEATS, ID_ENABLECHEATS,
ID_FRAMELIMIT, ID_FRAMELIMIT,
ID_FRAMELIMIT_USEFPSFORLIMITING,
ID_CPUENGINE, ID_CPUENGINE,
ID_DSPTHREAD, ID_DSPTHREAD,
@ -123,7 +122,6 @@ private:
wxCheckBox* SkipIdle; wxCheckBox* SkipIdle;
wxCheckBox* EnableCheats; wxCheckBox* EnableCheats;
wxChoice* Framelimit; wxChoice* Framelimit;
wxCheckBox* UseFPSForLimiting;
// Advanced // Advanced
wxRadioBox* CPUEngine; wxRadioBox* CPUEngine;