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:
1 parent
da30c24c5e
commit
6f845b8bb0
5 files changed
+61
-5
No files matched your search
@@ -65,6 +65,8 @@ struct SConfig
|
||||
|
||||
// interface language
|
||||
INTERFACE_LANGUAGE m_InterfaceLanguage;
|
||||
// framelimit choose
|
||||
u32 m_InterfaceFramelimit;
|
||||
// other interface settings
|
||||
bool m_InterfaceToolbar;
|
||||
bool m_InterfaceStatusbar;
|
||||
|
||||
@@ -664,20 +664,42 @@ void Callback_VideoCopiedToXFB()
|
||||
static u64 ticks = 0;
|
||||
static u64 idleTicks = 0;
|
||||
|
||||
|
||||
u32 targetfps = (SConfig::GetInstance().m_InterfaceFramelimit)*5;
|
||||
static u64 old_frametime=0;
|
||||
u64 new_frametime;
|
||||
s16 wait_frametime;
|
||||
|
||||
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)
|
||||
{
|
||||
old_frametime=0;
|
||||
|
||||
u64 newTicks = CoreTiming::GetTicks();
|
||||
u64 newIdleTicks = CoreTiming::GetIdleTicks();
|
||||
|
||||
|
||||
s64 diff = (newTicks - ticks) / 1000000;
|
||||
s64 idleDiff = (newIdleTicks - idleTicks) / 1000000;
|
||||
|
||||
|
||||
ticks = newTicks;
|
||||
idleTicks = newIdleTicks;
|
||||
|
||||
float t = (float)(Timer.GetTimeDifference()) / 1000.f;
|
||||
|
||||
char temp[256];
|
||||
sprintf(temp, "FPS:%8.2f - Core: %s | %s - Speed: %i MHz [Real: %i + IdleSkip: %i] / %i MHz",
|
||||
(float)frames / t,
|
||||
@@ -709,7 +731,7 @@ void Callback_VideoCopiedToXFB()
|
||||
Timer.Update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// __________________________________________________________________________________________________
|
||||
// Callback_DSPLog
|
||||
// WARNING - THIS MAY EXECUTED FROM DSP THREAD
|
||||
|
||||
@@ -237,7 +237,7 @@ void FakeGPWatchdogCallback(u64 userdata, int cyclesLate)
|
||||
|
||||
void Init()
|
||||
{
|
||||
FAKE_GP_WATCHDOG_PERIOD = GetTicksPerSecond() / 15;
|
||||
FAKE_GP_WATCHDOG_PERIOD = GetTicksPerSecond() / 60;
|
||||
if (Core::GetStartupParameter().bWii)
|
||||
{
|
||||
CPU_CORE_CLOCK = 729000000u;
|
||||
|
||||
Reference in new issue
Block a user