Merge pull request #3479 from Sonicadvance1/fix_hotkeys

Fix hotkeys not reporting inputs.
This commit is contained in:
Ryan Houdek 2016-01-19 02:15:25 -05:00
commit 7b9eeba168
2 changed files with 5 additions and 9 deletions

View File

@ -10,7 +10,6 @@
#include "Core/HW/GCPadEmu.h" #include "Core/HW/GCPadEmu.h"
#include "InputCommon/GCPadStatus.h" #include "InputCommon/GCPadStatus.h"
#include "InputCommon/InputConfig.h" #include "InputCommon/InputConfig.h"
#include "InputCommon/ControllerInterface/ControllerInterface.h"
namespace Pad namespace Pad
{ {
@ -53,14 +52,6 @@ void GetStatus(u8 pad_num, GCPadStatus* pad_status)
memset(pad_status, 0, sizeof(*pad_status)); memset(pad_status, 0, sizeof(*pad_status));
pad_status->err = PAD_ERR_NONE; pad_status->err = PAD_ERR_NONE;
// If we are on the next input cycle, update output and input
static int last_pad_num = 4;
if (pad_num <= last_pad_num)
{
g_controller_interface.UpdateInput();
}
last_pad_num = pad_num;
// Get input // Get input
static_cast<GCPad*>(s_config.GetController(pad_num))->GetInput(pad_status); static_cast<GCPad*>(s_config.GetController(pad_num))->GetInput(pad_status);
} }

View File

@ -18,6 +18,7 @@
#include "Core/HW/SI.h" #include "Core/HW/SI.h"
#include "Core/HW/SI_DeviceGBA.h" #include "Core/HW/SI_DeviceGBA.h"
#include "InputCommon/ControllerInterface/ControllerInterface.h"
namespace SerialInterface namespace SerialInterface
{ {
@ -511,6 +512,10 @@ void ChangeDevice(SIDevices device, int channel)
void UpdateDevices() void UpdateDevices()
{ {
// Update inputs at the rate of SI
// Typically 120hz but is variable
g_controller_interface.UpdateInput();
// Update channels and set the status bit if there's new data // Update channels and set the status bit if there's new data
g_StatusReg.RDST0 = !!g_Channel[0].m_device->GetData(g_Channel[0].m_InHi.Hex, g_Channel[0].m_InLo.Hex); g_StatusReg.RDST0 = !!g_Channel[0].m_device->GetData(g_Channel[0].m_InHi.Hex, g_Channel[0].m_InLo.Hex);
g_StatusReg.RDST1 = !!g_Channel[1].m_device->GetData(g_Channel[1].m_InHi.Hex, g_Channel[1].m_InLo.Hex); g_StatusReg.RDST1 = !!g_Channel[1].m_device->GetData(g_Channel[1].m_InHi.Hex, g_Channel[1].m_InLo.Hex);