From 3ac6b08456971292f6e438765568f68b7c3e2e03 Mon Sep 17 00:00:00 2001 From: "sl1nk3.s" Date: Mon, 3 Aug 2009 21:44:40 +0000 Subject: [PATCH] Disable the framelimiter by default as it will not work correctly on some games git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3935 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/ConfigManager.cpp | 2 +- Source/Core/Core/Src/Core.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/Src/ConfigManager.cpp b/Source/Core/Core/Src/ConfigManager.cpp index 86bb018fab..4ad02bbd6c 100644 --- a/Source/Core/Core/Src/ConfigManager.cpp +++ b/Source/Core/Core/Src/ConfigManager.cpp @@ -237,7 +237,7 @@ void SConfig::LoadSettings() ini.Get("Core", "RunCompareServer", &m_LocalCoreStartupParameter.bRunCompareServer, false); ini.Get("Core", "RunCompareClient", &m_LocalCoreStartupParameter.bRunCompareClient, false); ini.Get("Core", "TLBHack", &m_LocalCoreStartupParameter.iTLBHack, 0); - ini.Get("Core", "FrameLimit", &m_Framelimit,0); + ini.Get("Core", "FrameLimit", &m_Framelimit, 1); // Wii ini.Get("Wii", "Widescreen", &m_LocalCoreStartupParameter.bWidescreen, false); diff --git a/Source/Core/Core/Src/Core.cpp b/Source/Core/Core/Src/Core.cpp index 7c344c0b68..ccb5599746 100644 --- a/Source/Core/Core/Src/Core.cpp +++ b/Source/Core/Core/Src/Core.cpp @@ -609,7 +609,7 @@ void Callback_VideoCopiedToXFB(bool video_update) frames++; // Custom frame limiter - // ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ + // ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ u32 targetfps = SConfig::GetInstance().m_Framelimit * 5; if (targetfps > 5) @@ -624,7 +624,11 @@ void Callback_VideoCopiedToXFB(bool video_update) double wait_frametime = (1000.0 / VideoInterface::TargetRefreshRate); while (Timer.GetTimeDifference() < wait_frametime * videoupd) + { + // TODO : This is wrong, the sleep shouldn't be there but rather in cputhread + // as it's not based on the fps but on the refresh rate... Common::SleepCurrentThread(1); + } } if (Timer.GetTimeDifference() >= 1000)