Patch in Iulius' framelimiter, since it has advantages over "Other Audio" in many games (more speed).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3397 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
da30c24c5e
commit
6f845b8bb0
|
@ -65,6 +65,8 @@ struct SConfig
|
||||||
|
|
||||||
// interface language
|
// interface language
|
||||||
INTERFACE_LANGUAGE m_InterfaceLanguage;
|
INTERFACE_LANGUAGE m_InterfaceLanguage;
|
||||||
|
// framelimit choose
|
||||||
|
u32 m_InterfaceFramelimit;
|
||||||
// other interface settings
|
// other interface settings
|
||||||
bool m_InterfaceToolbar;
|
bool m_InterfaceToolbar;
|
||||||
bool m_InterfaceStatusbar;
|
bool m_InterfaceStatusbar;
|
||||||
|
|
|
@ -664,10 +664,31 @@ void Callback_VideoCopiedToXFB()
|
||||||
static u64 ticks = 0;
|
static u64 ticks = 0;
|
||||||
static u64 idleTicks = 0;
|
static u64 idleTicks = 0;
|
||||||
|
|
||||||
|
|
||||||
|
u32 targetfps = (SConfig::GetInstance().m_InterfaceFramelimit)*5;
|
||||||
|
static u64 old_frametime=0;
|
||||||
|
u64 new_frametime;
|
||||||
|
s16 wait_frametime;
|
||||||
|
|
||||||
frames++;
|
frames++;
|
||||||
|
|
||||||
|
if (targetfps>0)
|
||||||
|
{
|
||||||
|
new_frametime=Timer.GetTimeDifference()-old_frametime;
|
||||||
|
|
||||||
|
old_frametime=Timer.GetTimeDifference();
|
||||||
|
|
||||||
|
wait_frametime=((1000/targetfps)-new_frametime);
|
||||||
|
if (targetfps<35)
|
||||||
|
wait_frametime--;
|
||||||
|
if (wait_frametime>0)
|
||||||
|
Common::SleepCurrentThread(wait_frametime*2);
|
||||||
|
}
|
||||||
|
|
||||||
if (Timer.GetTimeDifference() >= 1000)
|
if (Timer.GetTimeDifference() >= 1000)
|
||||||
{
|
{
|
||||||
|
old_frametime=0;
|
||||||
|
|
||||||
u64 newTicks = CoreTiming::GetTicks();
|
u64 newTicks = CoreTiming::GetTicks();
|
||||||
u64 newIdleTicks = CoreTiming::GetIdleTicks();
|
u64 newIdleTicks = CoreTiming::GetIdleTicks();
|
||||||
|
|
||||||
|
@ -678,6 +699,7 @@ void Callback_VideoCopiedToXFB()
|
||||||
idleTicks = newIdleTicks;
|
idleTicks = newIdleTicks;
|
||||||
|
|
||||||
float t = (float)(Timer.GetTimeDifference()) / 1000.f;
|
float t = (float)(Timer.GetTimeDifference()) / 1000.f;
|
||||||
|
|
||||||
char temp[256];
|
char temp[256];
|
||||||
sprintf(temp, "FPS:%8.2f - Core: %s | %s - Speed: %i MHz [Real: %i + IdleSkip: %i] / %i MHz",
|
sprintf(temp, "FPS:%8.2f - Core: %s | %s - Speed: %i MHz [Real: %i + IdleSkip: %i] / %i MHz",
|
||||||
(float)frames / t,
|
(float)frames / t,
|
||||||
|
|
|
@ -237,7 +237,7 @@ void FakeGPWatchdogCallback(u64 userdata, int cyclesLate)
|
||||||
|
|
||||||
void Init()
|
void Init()
|
||||||
{
|
{
|
||||||
FAKE_GP_WATCHDOG_PERIOD = GetTicksPerSecond() / 15;
|
FAKE_GP_WATCHDOG_PERIOD = GetTicksPerSecond() / 60;
|
||||||
if (Core::GetStartupParameter().bWii)
|
if (Core::GetStartupParameter().bWii)
|
||||||
{
|
{
|
||||||
CPU_CORE_CLOCK = 729000000u;
|
CPU_CORE_CLOCK = 729000000u;
|
||||||
|
|
|
@ -45,6 +45,7 @@ EVT_RADIOBOX(ID_INTERFACE_THEME, CConfigMain::CoreSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_INTERFACE_WIIMOTE_LEDS, CConfigMain::CoreSettingsChanged)
|
EVT_CHECKBOX(ID_INTERFACE_WIIMOTE_LEDS, CConfigMain::CoreSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_INTERFACE_WIIMOTE_SPEAKERS, CConfigMain::CoreSettingsChanged)
|
EVT_CHECKBOX(ID_INTERFACE_WIIMOTE_SPEAKERS, CConfigMain::CoreSettingsChanged)
|
||||||
EVT_CHOICE(ID_INTERFACE_LANG, CConfigMain::CoreSettingsChanged)
|
EVT_CHOICE(ID_INTERFACE_LANG, CConfigMain::CoreSettingsChanged)
|
||||||
|
EVT_CHOICE(ID_INTERFACE_FRAMELIMIT, CConfigMain::CoreSettingsChanged)
|
||||||
|
|
||||||
EVT_CHECKBOX(ID_ALLWAYS_HLEBIOS, CConfigMain::CoreSettingsChanged)
|
EVT_CHECKBOX(ID_ALLWAYS_HLEBIOS, CConfigMain::CoreSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_USEDYNAREC, CConfigMain::CoreSettingsChanged)
|
EVT_CHECKBOX(ID_USEDYNAREC, CConfigMain::CoreSettingsChanged)
|
||||||
|
@ -172,6 +173,20 @@ void CConfigMain::CreateGUIControls()
|
||||||
arrayStringFor_WiiSystemLang.Add(wxT("Korean"));
|
arrayStringFor_WiiSystemLang.Add(wxT("Korean"));
|
||||||
// GUI
|
// GUI
|
||||||
arrayStringFor_InterfaceLang = arrayStringFor_GCSystemLang;
|
arrayStringFor_InterfaceLang = arrayStringFor_GCSystemLang;
|
||||||
|
// Framelimit
|
||||||
|
arrayStringFor_Framelimit.Add(wxT("off"));
|
||||||
|
arrayStringFor_Framelimit.Add(wxT("5"));
|
||||||
|
arrayStringFor_Framelimit.Add(wxT("10"));
|
||||||
|
arrayStringFor_Framelimit.Add(wxT("15"));
|
||||||
|
arrayStringFor_Framelimit.Add(wxT("20"));
|
||||||
|
arrayStringFor_Framelimit.Add(wxT("25"));
|
||||||
|
arrayStringFor_Framelimit.Add(wxT("30"));
|
||||||
|
arrayStringFor_Framelimit.Add(wxT("35"));
|
||||||
|
arrayStringFor_Framelimit.Add(wxT("40"));
|
||||||
|
arrayStringFor_Framelimit.Add(wxT("45"));
|
||||||
|
arrayStringFor_Framelimit.Add(wxT("50"));
|
||||||
|
arrayStringFor_Framelimit.Add(wxT("55"));
|
||||||
|
arrayStringFor_Framelimit.Add(wxT("60"));
|
||||||
|
|
||||||
// Create the notebook and pages
|
// Create the notebook and pages
|
||||||
Notebook = new wxNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize);
|
Notebook = new wxNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize);
|
||||||
|
@ -241,6 +256,11 @@ void CConfigMain::CreateGUIControls()
|
||||||
// need redesign
|
// need redesign
|
||||||
InterfaceLang->SetSelection(SConfig::GetInstance().m_InterfaceLanguage);
|
InterfaceLang->SetSelection(SConfig::GetInstance().m_InterfaceLanguage);
|
||||||
|
|
||||||
|
// Choose Framelimit
|
||||||
|
wxStaticText *InterfaceFramelimitText = new wxStaticText(GeneralPage, ID_INTERFACE_FRAMELIMIT_TEXT, wxT("Framelimit (experimental):"), wxDefaultPosition, wxDefaultSize);
|
||||||
|
InterfaceFramelimit = new wxChoice(GeneralPage, ID_INTERFACE_FRAMELIMIT, wxDefaultPosition, wxDefaultSize, arrayStringFor_Framelimit, 0, wxDefaultValidator);
|
||||||
|
InterfaceFramelimit->SetSelection(SConfig::GetInstance().m_InterfaceFramelimit);
|
||||||
|
|
||||||
// Themes
|
// Themes
|
||||||
wxArrayString ThemeChoices;
|
wxArrayString ThemeChoices;
|
||||||
ThemeChoices.Add(wxT("Boomy"));
|
ThemeChoices.Add(wxT("Boomy"));
|
||||||
|
@ -311,6 +331,10 @@ void CConfigMain::CreateGUIControls()
|
||||||
sInterfaceLanguage->Add(InterfaceLangText, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
sInterfaceLanguage->Add(InterfaceLangText, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||||
sInterfaceLanguage->Add(InterfaceLang, 0, wxEXPAND | wxALL, 5);
|
sInterfaceLanguage->Add(InterfaceLang, 0, wxEXPAND | wxALL, 5);
|
||||||
sbInterface->Add(sInterfaceLanguage, 0, wxEXPAND | wxALL, 5);
|
sbInterface->Add(sInterfaceLanguage, 0, wxEXPAND | wxALL, 5);
|
||||||
|
wxBoxSizer *sInterfaceFramelimit = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
sInterfaceFramelimit->Add(InterfaceFramelimitText, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||||
|
sInterfaceFramelimit->Add(InterfaceFramelimit, 0, wxEXPAND | wxALL, 5);
|
||||||
|
sbInterface->Add(sInterfaceFramelimit, 0, wxEXPAND | wxALL, 5);
|
||||||
|
|
||||||
// Populate the entire page
|
// Populate the entire page
|
||||||
sGeneralPage = new wxBoxSizer(wxVERTICAL);
|
sGeneralPage = new wxBoxSizer(wxVERTICAL);
|
||||||
|
@ -631,6 +655,10 @@ void CConfigMain::CoreSettingsChanged(wxCommandEvent& event)
|
||||||
SConfig::GetInstance().m_InterfaceLanguage = (INTERFACE_LANGUAGE)InterfaceLang->GetSelection();
|
SConfig::GetInstance().m_InterfaceLanguage = (INTERFACE_LANGUAGE)InterfaceLang->GetSelection();
|
||||||
bRefreshList = true;
|
bRefreshList = true;
|
||||||
break;
|
break;
|
||||||
|
case ID_INTERFACE_FRAMELIMIT:
|
||||||
|
SConfig::GetInstance().m_InterfaceFramelimit = (u32)InterfaceFramelimit->GetSelection();
|
||||||
|
bRefreshList = true;
|
||||||
|
break;
|
||||||
|
|
||||||
case ID_ALLWAYS_HLEBIOS: // Core
|
case ID_ALLWAYS_HLEBIOS: // Core
|
||||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bHLEBios = AlwaysUseHLEBIOS->IsChecked();
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bHLEBios = AlwaysUseHLEBIOS->IsChecked();
|
||||||
|
|
|
@ -56,6 +56,9 @@ class CConfigMain
|
||||||
wxArrayString arrayStringFor_InterfaceLang;
|
wxArrayString arrayStringFor_InterfaceLang;
|
||||||
wxChoice* InterfaceLang;
|
wxChoice* InterfaceLang;
|
||||||
|
|
||||||
|
wxArrayString arrayStringFor_Framelimit;
|
||||||
|
wxChoice* InterfaceFramelimit;
|
||||||
|
|
||||||
wxRadioBox* Theme;
|
wxRadioBox* Theme;
|
||||||
|
|
||||||
wxBoxSizer* sCore;
|
wxBoxSizer* sCore;
|
||||||
|
@ -226,6 +229,7 @@ class CConfigMain
|
||||||
ID_INTERFACE_WIIMOTE_TEXT, ID_INTERFACE_WIIMOTE_LEDS, ID_INTERFACE_WIIMOTE_SPEAKERS,
|
ID_INTERFACE_WIIMOTE_TEXT, ID_INTERFACE_WIIMOTE_LEDS, ID_INTERFACE_WIIMOTE_SPEAKERS,
|
||||||
ID_INTERFACE_LANG_TEXT, ID_INTERFACE_LANG,
|
ID_INTERFACE_LANG_TEXT, ID_INTERFACE_LANG,
|
||||||
ID_INTERFACE_THEME,
|
ID_INTERFACE_THEME,
|
||||||
|
ID_INTERFACE_FRAMELIMIT_TEXT, ID_INTERFACE_FRAMELIMIT,
|
||||||
|
|
||||||
ID_GC_SRAM_LNG_TEXT,
|
ID_GC_SRAM_LNG_TEXT,
|
||||||
ID_GC_SRAM_LNG,
|
ID_GC_SRAM_LNG,
|
||||||
|
|
Loading…
Reference in New Issue