mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-25 06:44:59 +00:00
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
1 changed files with 5 additions and 5 deletions
|
@ -29,7 +29,8 @@
|
||||||
|
|
||||||
#include "../OnFrame.h"
|
#include "../OnFrame.h"
|
||||||
|
|
||||||
#include "Timer.h"
|
#include "../CoreTiming.h"
|
||||||
|
#include "SystemTimers.h"
|
||||||
#include "ProcessorInterface.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... :( )
|
// 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;
|
EButtonCombo tempCombo;
|
||||||
if ((PadStatus.button & 0xff00) == (PAD_BUTTON_Y|PAD_BUTTON_X|PAD_BUTTON_START))
|
if ((PadStatus.button & 0xff00) == (PAD_BUTTON_Y|PAD_BUTTON_X|PAD_BUTTON_START))
|
||||||
tempCombo = COMBO_ORIGIN;
|
tempCombo = COMBO_ORIGIN;
|
||||||
|
@ -217,12 +217,12 @@ bool CSIDevice_GCController::GetData(u32& _Hi, u32& _Low)
|
||||||
{
|
{
|
||||||
m_LastButtonCombo = tempCombo;
|
m_LastButtonCombo = tempCombo;
|
||||||
if (m_LastButtonCombo != COMBO_NONE)
|
if (m_LastButtonCombo != COMBO_NONE)
|
||||||
m_TButtonComboStart = Common::Timer::GetTimeMs();
|
m_TButtonComboStart = CoreTiming::GetTicks();
|
||||||
}
|
}
|
||||||
if (m_LastButtonCombo != COMBO_NONE)
|
if (m_LastButtonCombo != COMBO_NONE)
|
||||||
{
|
{
|
||||||
m_TButtonCombo = Common::Timer::GetTimeMs();
|
m_TButtonCombo = CoreTiming::GetTicks();
|
||||||
if ((m_TButtonCombo - m_TButtonComboStart) > 3000)
|
if ((m_TButtonCombo - m_TButtonComboStart) > SystemTimers::GetTicksPerSecond() * 3)
|
||||||
{
|
{
|
||||||
if (m_LastButtonCombo == COMBO_RESET)
|
if (m_LastButtonCombo == COMBO_RESET)
|
||||||
ProcessorInterface::ResetButton_Tap();
|
ProcessorInterface::ResetButton_Tap();
|
||||||
|
|
Loading…
Add table
Reference in a new issue