fix #376 - Games slow if no entry in Project64.cfg

This commit is contained in:
zilmar 2015-04-20 08:50:07 +10:00
parent 5b68545136
commit edda4f0555
4 changed files with 12 additions and 7 deletions

View File

@ -286,7 +286,7 @@ void CRegisters::SetAsCurrentSystem ( void )
void CRegisters::CheckInterrupts ( void )
{
if (!m_System->bFixedAudio() && (CPU_TYPE)g_Settings->LoadDword(Game_CpuType) != CPU_SyncCores)
if (!m_System->bFixedAudio() && CpuType() != CPU_SyncCores)
{
MI_INTR_REG &= ~MI_INTR_AI;
MI_INTR_REG |= (m_AudioIntrReg & MI_INTR_AI);

View File

@ -485,6 +485,7 @@ class CSystemEvents;
class CRegisters :
private CDebugSettings,
private CGameSettings,
protected CSystemRegisters,
public CP0registers,
public Rdram_InterfaceReg,

View File

@ -33,6 +33,7 @@ bool CGameSettings::m_RegCaching;
bool CGameSettings::m_bLinkBlocks;
DWORD CGameSettings::m_LookUpMode; //FUNC_LOOKUP_METHOD
SYSTEM_TYPE CGameSettings::m_SystemType = SYSTEM_NTSC;
CPU_TYPE CGameSettings::m_CpuType = CPU_Recompiler;
void CGameSettings::RefreshGameSettings()
{
@ -58,6 +59,7 @@ void CGameSettings::RefreshGameSettings()
m_bLinkBlocks = g_Settings->LoadBool(Game_BlockLinking);
m_LookUpMode = g_Settings->LoadDword(Game_FuncLookupMode);
m_SystemType = (SYSTEM_TYPE)g_Settings->LoadDword(Game_SystemType);
m_CpuType = (CPU_TYPE)g_Settings->LoadDword(Game_CpuType);
m_bSyncingToAudio = m_bSyncToAudio;
if (m_CountPerOp == 0)

View File

@ -21,7 +21,7 @@ public:
inline static bool bRegCaching ( void ) { return m_RegCaching; }
inline static bool bLinkBlocks ( void ) { return m_bLinkBlocks; }
inline static FUNC_LOOKUP_METHOD LookUpMode ( void ) { return (FUNC_LOOKUP_METHOD)m_LookUpMode; }
static inline bool bUseTlb ( void ) { return m_bUseTlb; }
inline static bool bUseTlb ( void ) { return m_bUseTlb; }
inline static DWORD CountPerOp ( void ) { return m_CountPerOp; }
inline static DWORD ViRefreshRate ( void ) { return m_ViRefreshRate; }
inline static DWORD AiCountPerBytes ( void ) { return m_AiCountPerBytes; }
@ -33,12 +33,13 @@ public:
inline static bool bFastSP ( void ) { return m_bFastSP; }
inline static bool b32BitCore ( void ) { return m_b32Bit; }
inline static bool RspAudioSignal ( void ) { return m_RspAudioSignal; }
static inline bool bSMM_StoreInstruc ( void ) { return m_bSMM_StoreInstruc; }
static inline bool bSMM_Protect ( void ) { return m_bSMM_Protect; }
static inline bool bSMM_ValidFunc ( void ) { return m_bSMM_ValidFunc; }
static inline bool bSMM_PIDMA ( void ) { return m_bSMM_PIDMA; }
static inline bool bSMM_TLB ( void ) { return m_bSMM_TLB; }
inline static bool bSMM_StoreInstruc ( void ) { return m_bSMM_StoreInstruc; }
inline static bool bSMM_Protect ( void ) { return m_bSMM_Protect; }
inline static bool bSMM_ValidFunc ( void ) { return m_bSMM_ValidFunc; }
inline static bool bSMM_PIDMA ( void ) { return m_bSMM_PIDMA; }
inline static bool bSMM_TLB ( void ) { return m_bSMM_TLB; }
inline static SYSTEM_TYPE SystemType ( void ) { return m_SystemType; }
inline static CPU_TYPE CpuType ( void ) { return m_CpuType; }
protected:
static void SpeedChanged (int SpeedLimit );
@ -68,4 +69,5 @@ private:
static bool m_bSMM_PIDMA;
static bool m_bSMM_TLB;
static SYSTEM_TYPE m_SystemType;
static CPU_TYPE m_CpuType;
};