Let HID service choose between InputCommon and EmuWindow for input

This commit is contained in:
Daniel Stuart Baxter 2015-05-30 01:37:49 -05:00
parent eeb785c9ff
commit ecb059daa9

View File

@ -16,6 +16,8 @@
#include "video_core/video_core.h" #include "video_core/video_core.h"
#include "input_common/input_common.h"
namespace Service { namespace Service {
namespace HID { namespace HID {
@ -49,7 +51,7 @@ static u32 next_touch_index;
void Update() { void Update() {
SharedMem* mem = reinterpret_cast<SharedMem*>(shared_mem->GetPointer()); SharedMem* mem = reinterpret_cast<SharedMem*>(shared_mem->GetPointer());
const PadState state = VideoCore::g_emu_window->GetPadState(); const PadState state = (InputCommon::g_user_input == nullptr) ? VideoCore::g_emu_window->GetPadState() : InputCommon::g_user_input->GetPadState();
if (mem == nullptr) { if (mem == nullptr) {
LOG_DEBUG(Service_HID, "Cannot update HID prior to mapping shared memory!"); LOG_DEBUG(Service_HID, "Cannot update HID prior to mapping shared memory!");