Changed the GC controller timer from a host based one to one based on the emulated hardware. This helps the emulator become more deterministic.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6552 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
1021ba0406
commit
0447abef36
|
@ -29,7 +29,8 @@
|
|||
|
||||
#include "../OnFrame.h"
|
||||
|
||||
#include "Timer.h"
|
||||
#include "../CoreTiming.h"
|
||||
#include "SystemTimers.h"
|
||||
#include "ProcessorInterface.h"
|
||||
|
||||
|
||||
|
@ -205,7 +206,6 @@ bool CSIDevice_GCController::GetData(u32& _Hi, u32& _Low)
|
|||
}
|
||||
|
||||
// Keep track of the special button combos (embedded in controller hardware... :( )
|
||||
// Should technically be in "gc time", but we just use host system time :)
|
||||
EButtonCombo tempCombo;
|
||||
if ((PadStatus.button & 0xff00) == (PAD_BUTTON_Y|PAD_BUTTON_X|PAD_BUTTON_START))
|
||||
tempCombo = COMBO_ORIGIN;
|
||||
|
@ -217,12 +217,12 @@ bool CSIDevice_GCController::GetData(u32& _Hi, u32& _Low)
|
|||
{
|
||||
m_LastButtonCombo = tempCombo;
|
||||
if (m_LastButtonCombo != COMBO_NONE)
|
||||
m_TButtonComboStart = Common::Timer::GetTimeMs();
|
||||
m_TButtonComboStart = CoreTiming::GetTicks();
|
||||
}
|
||||
if (m_LastButtonCombo != COMBO_NONE)
|
||||
{
|
||||
m_TButtonCombo = Common::Timer::GetTimeMs();
|
||||
if ((m_TButtonCombo - m_TButtonComboStart) > 3000)
|
||||
m_TButtonCombo = CoreTiming::GetTicks();
|
||||
if ((m_TButtonCombo - m_TButtonComboStart) > SystemTimers::GetTicksPerSecond() * 3)
|
||||
{
|
||||
if (m_LastButtonCombo == COMBO_RESET)
|
||||
ProcessorInterface::ResetButton_Tap();
|
||||
|
|
Loading…
Reference in New Issue