Merge pull request #1633 from ogniK5377/reload-input

Fixed HID crash when launching more than 1 game & signaled styleset change event
This commit is contained in:
bunnei 2018-11-05 00:21:27 -05:00 committed by GitHub
commit 722e7c05de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View file

@ -427,6 +427,9 @@ void Controller_NPad::VibrateController(const std::vector<u32>& controller_ids,
} }
Kernel::SharedPtr<Kernel::Event> Controller_NPad::GetStyleSetChangedEvent() const { Kernel::SharedPtr<Kernel::Event> Controller_NPad::GetStyleSetChangedEvent() const {
// TODO(ogniK): Figure out the best time to signal this event. This event seems that it should
// be signalled at least once, and signaled after a new controller is connected?
styleset_changed_event->Signal();
return styleset_changed_event; return styleset_changed_event;
} }

View file

@ -96,6 +96,8 @@ public:
// TODO(shinyquagsire23): Other update callbacks? (accel, gyro?) // TODO(shinyquagsire23): Other update callbacks? (accel, gyro?)
CoreTiming::ScheduleEvent(pad_update_ticks, pad_update_event); CoreTiming::ScheduleEvent(pad_update_ticks, pad_update_event);
ReloadInputDevices();
} }
void ActivateController(HidController controller) { void ActivateController(HidController controller) {