mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2024-12-23 09:31:20 -08:00
core: Make sure npad is initialized
This commit is contained in:
parent
d10464de30
commit
e8ad603cd9
@ -20,6 +20,9 @@ InputInterpreter::InputInterpreter(Core::System& system)
|
||||
InputInterpreter::~InputInterpreter() = default;
|
||||
|
||||
void InputInterpreter::PollInput() {
|
||||
if (npad == nullptr) {
|
||||
return;
|
||||
}
|
||||
const auto button_state = npad->GetAndResetPressState();
|
||||
|
||||
previous_index = current_index;
|
||||
|
@ -62,7 +62,7 @@ u64 StandardVmCallbacks::HidKeysDown() {
|
||||
}
|
||||
|
||||
const auto applet_resource = hid->GetResourceManager();
|
||||
if (applet_resource == nullptr) {
|
||||
if (applet_resource == nullptr || applet_resource->GetNpad() == nullptr) {
|
||||
LOG_WARNING(CheatEngine,
|
||||
"Attempted to read input state, but applet resource is not initialized!");
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user