commit
c1a78c2ba8
|
@ -61,7 +61,7 @@ m_CheatsSlectionChanged(false)
|
|||
{
|
||||
gameHertz = (SystemType() == SYSTEM_PAL) ? 50 : 60;
|
||||
}
|
||||
m_Limitor.SetHertz(gameHertz);
|
||||
m_Limiter.SetHertz(gameHertz);
|
||||
g_Settings->SaveDword(GameRunning_ScreenHertz, gameHertz);
|
||||
m_Cheats.LoadCheats(!g_Settings->LoadDword(Setting_RememberCheats), Plugins);
|
||||
}
|
||||
|
@ -1868,7 +1868,7 @@ void CN64System::RefreshScreen()
|
|||
{
|
||||
if (bShowCPUPer()) { m_CPU_Usage.StartTimer(Timer_Idel); }
|
||||
uint32_t FrameRate;
|
||||
if (m_Limitor.Timer_Process(&FrameRate) && bDisplayFrameRate())
|
||||
if (m_Limiter.Timer_Process(&FrameRate) && bDisplayFrameRate())
|
||||
{
|
||||
m_FPS.DisplayViCounter(FrameRate);
|
||||
m_bCleanFrameBox = true;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "ProfilingClass.h"
|
||||
#include "CheatClass.h"
|
||||
#include "FramePerSecondClass.h"
|
||||
#include "SpeedLimitorClass.h"
|
||||
#include "SpeedLimiterClass.h"
|
||||
|
||||
typedef std::list<SystemEvent> EVENT_LIST;
|
||||
|
||||
|
@ -64,8 +64,8 @@ public:
|
|||
void ExternalEvent(SystemEvent action); //covers gui interacting and timers etc..
|
||||
void StartEmulation(bool NewThread);
|
||||
void SyncToAudio();
|
||||
void IncreaseSpeed() { m_Limitor.IncreaseSpeed(); }
|
||||
void DecreaseSpeed() { m_Limitor.DecreaseSpeed(); }
|
||||
void IncreaseSpeed() { m_Limiter.IncreaseSpeed(); }
|
||||
void DecreaseSpeed() { m_Limiter.DecreaseSpeed(); }
|
||||
void Reset(bool bInitReg, bool ClearMenory);
|
||||
void GameReset();
|
||||
void PluginReset();
|
||||
|
@ -147,7 +147,7 @@ private:
|
|||
CProfiling m_CPU_Usage; //used to track the cpu usage
|
||||
CRecompiler * m_Recomp;
|
||||
CAudio m_Audio;
|
||||
CSpeedLimitor m_Limitor;
|
||||
CSpeedLimiter m_Limiter;
|
||||
bool m_InReset;
|
||||
int32_t m_NextTimer;
|
||||
CSystemTimer m_SystemTimer;
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
* *
|
||||
****************************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "SpeedLimitorClass.h"
|
||||
#include "SpeedLimiterClass.h"
|
||||
#include <common/util.h>
|
||||
#include <Windows.h>
|
||||
#include <Mmsystem.h>
|
||||
|
||||
#pragma comment(lib, "winmm.lib")
|
||||
|
||||
CSpeedLimitor::CSpeedLimitor()
|
||||
CSpeedLimiter::CSpeedLimiter()
|
||||
{
|
||||
m_Frames = 0;
|
||||
m_LastTime = 0;
|
||||
|
@ -32,28 +32,28 @@ CSpeedLimitor::CSpeedLimitor()
|
|||
}
|
||||
}
|
||||
|
||||
CSpeedLimitor::~CSpeedLimitor()
|
||||
CSpeedLimiter::~CSpeedLimiter()
|
||||
{
|
||||
TIMECAPS Caps;
|
||||
timeGetDevCaps(&Caps, sizeof(Caps));
|
||||
timeEndPeriod(Caps.wPeriodMin);
|
||||
}
|
||||
|
||||
void CSpeedLimitor::SetHertz(uint32_t Hertz)
|
||||
void CSpeedLimiter::SetHertz(uint32_t Hertz)
|
||||
{
|
||||
m_Speed = Hertz;
|
||||
m_BaseSpeed = Hertz;
|
||||
FixSpeedRatio();
|
||||
}
|
||||
|
||||
void CSpeedLimitor::FixSpeedRatio()
|
||||
void CSpeedLimiter::FixSpeedRatio()
|
||||
{
|
||||
m_Ratio = 1000.0f / static_cast<double>(m_Speed);
|
||||
m_Frames = 0;
|
||||
m_LastTime = timeGetTime();
|
||||
}
|
||||
|
||||
bool CSpeedLimitor::Timer_Process(uint32_t * FrameRate)
|
||||
bool CSpeedLimiter::Timer_Process(uint32_t * FrameRate)
|
||||
{
|
||||
m_Frames += 1;
|
||||
uint32_t CurrentTime = timeGetTime();
|
||||
|
@ -87,7 +87,7 @@ bool CSpeedLimitor::Timer_Process(uint32_t * FrameRate)
|
|||
}
|
||||
}
|
||||
|
||||
void CSpeedLimitor::IncreaseSpeed()
|
||||
void CSpeedLimiter::IncreaseSpeed()
|
||||
{
|
||||
if (m_Speed >= 60)
|
||||
{
|
||||
|
@ -105,7 +105,7 @@ void CSpeedLimitor::IncreaseSpeed()
|
|||
FixSpeedRatio();
|
||||
}
|
||||
|
||||
void CSpeedLimitor::DecreaseSpeed()
|
||||
void CSpeedLimiter::DecreaseSpeed()
|
||||
{
|
||||
if (m_Speed > 60)
|
||||
{
|
|
@ -12,12 +12,12 @@
|
|||
|
||||
#include "../Settings/GameSettings.h"
|
||||
|
||||
class CSpeedLimitor :
|
||||
class CSpeedLimiter :
|
||||
private CGameSettings
|
||||
{
|
||||
public:
|
||||
CSpeedLimitor();
|
||||
~CSpeedLimitor();
|
||||
CSpeedLimiter();
|
||||
~CSpeedLimiter();
|
||||
|
||||
void SetHertz(const uint32_t Hertz);
|
||||
bool Timer_Process(uint32_t* const FrameRate);
|
||||
|
@ -25,8 +25,8 @@ public:
|
|||
void DecreaseSpeed();
|
||||
|
||||
private:
|
||||
CSpeedLimitor(const CSpeedLimitor&); // Disable copy constructor
|
||||
CSpeedLimitor& operator=(const CSpeedLimitor&); // Disable assignment
|
||||
CSpeedLimiter(const CSpeedLimiter&); // Disable copy constructor
|
||||
CSpeedLimiter& operator=(const CSpeedLimiter&); // Disable assignment
|
||||
|
||||
void FixSpeedRatio();
|
||||
|
|
@ -330,7 +330,7 @@
|
|||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\N64System\SpeedLimitorClass.cpp"
|
||||
RelativePath=".\N64System\SpeedLimiterClass.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
@ -552,7 +552,7 @@
|
|||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\N64System\SpeedLimitorClass.h"
|
||||
RelativePath=".\N64System\SpeedLimiterClass.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
<ClCompile Include="N64System\Recompiler\SectionInfo.cpp" />
|
||||
<ClCompile Include="N64System\Recompiler\x86CodeLog.cpp" />
|
||||
<ClCompile Include="N64System\Recompiler\X86ops.cpp" />
|
||||
<ClCompile Include="N64System\SpeedLimitorClass.cpp" />
|
||||
<ClCompile Include="N64System\SpeedLimiterClass.cpp" />
|
||||
<ClCompile Include="N64System\SystemGlobals.cpp" />
|
||||
<ClCompile Include="Plugins\AudioPlugin.cpp" />
|
||||
<ClCompile Include="Plugins\ControllerPlugin.cpp" />
|
||||
|
@ -161,7 +161,7 @@
|
|||
<ClInclude Include="N64System\Recompiler\SectionInfo.h" />
|
||||
<ClInclude Include="N64System\Recompiler\X86CodeLog.h" />
|
||||
<ClInclude Include="N64System\Recompiler\X86ops.h" />
|
||||
<ClInclude Include="N64System\SpeedLimitorClass.h" />
|
||||
<ClInclude Include="N64System\SpeedLimiterClass.h" />
|
||||
<ClInclude Include="N64System\SystemGlobals.h" />
|
||||
<ClInclude Include="Notification.h" />
|
||||
<ClInclude Include="Plugin.h" />
|
||||
|
|
|
@ -201,7 +201,7 @@
|
|||
<ClCompile Include="N64System\ProfilingClass.cpp">
|
||||
<Filter>Source Files\N64 System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="N64System\SpeedLimitorClass.cpp">
|
||||
<ClCompile Include="N64System\SpeedLimiterClass.cpp">
|
||||
<Filter>Source Files\N64 System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="N64System\SystemGlobals.cpp">
|
||||
|
@ -560,7 +560,7 @@
|
|||
<ClInclude Include="Settings\SettingsClass.h">
|
||||
<Filter>Header Files\Settings</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="N64System\SpeedLimitorClass.h">
|
||||
<ClInclude Include="N64System\SpeedLimiterClass.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TraceModulesProject64.h">
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
//General Mips Information
|
||||
#include <Project64-core/N64System/N64RomClass.h>
|
||||
#include "N64System/RomInformationClass.h"
|
||||
#include <Project64-core/N64System/SpeedLimitorClass.h>
|
||||
#include <Project64-core/N64System/SpeedLimiterClass.h>
|
||||
#include <Project64-core/N64System/Mips/OpCode.h>
|
||||
#include <Project64-core/N64System/Recompiler/X86ops.h>
|
||||
#include <Project64-core/N64System/Mips/Mempak.h>
|
||||
|
|
|
@ -539,7 +539,7 @@ SOURCE="N64 System\Rom Information Class.cpp"
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE="N64 System\Speed Limitor Class.cpp"
|
||||
SOURCE="N64 System\Speed Limiter Class.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
@ -1224,7 +1224,7 @@ SOURCE="N64 System\Rom Information Class.h"
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE="N64 System\Speed Limitor Class.h"
|
||||
SOURCE="N64 System\Speed Limiter Class.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
|
Loading…
Reference in New Issue