loader/ams_mitm: Change Down -> Held in API

This commit is contained in:
Michael Scire 2019-03-15 21:28:38 -07:00
parent 35167da6dd
commit 51fa778fb2
5 changed files with 6 additions and 6 deletions

View file

@ -446,7 +446,7 @@ bool Utils::HasSdDisableMitMFlag(u64 tid) {
return false;
}
Result Utils::GetKeysDown(u64 *keys) {
Result Utils::GetKeysHeld(u64 *keys) {
if (!Utils::IsHidAvailable()) {
return MAKERESULT(Module_Libnx, LibnxError_InitFail_HID);
}
@ -459,7 +459,7 @@ Result Utils::GetKeysDown(u64 *keys) {
static bool HasOverrideKey(OverrideKey *cfg) {
u64 kDown = 0;
bool keys_triggered = (R_SUCCEEDED(Utils::GetKeysDown(&kDown)) && ((kDown & cfg->key_combination) != 0));
bool keys_triggered = (R_SUCCEEDED(Utils::GetKeysHeld(&kDown)) && ((kDown & cfg->key_combination) != 0));
return Utils::IsSdInitialized() && (cfg->override_by_default ^ keys_triggered);
}

View file

@ -76,7 +76,7 @@ class Utils {
static bool IsHidAvailable();
static Result GetKeysDown(u64 *keys);
static Result GetKeysHeld(u64 *keys);
static OverrideKey GetTitleOverrideKey(u64 tid);
static bool HasOverrideButton(u64 tid);

View file

@ -376,7 +376,7 @@ OverrideKey ContentManagement::GetTitleOverrideKey(u64 tid) {
static bool ShouldOverrideContents(OverrideKey *cfg) {
u64 kDown = 0;
bool keys_triggered = (R_SUCCEEDED(HidManagement::GetKeysDown(&kDown)) && ((kDown & cfg->key_combination) != 0));
bool keys_triggered = (R_SUCCEEDED(HidManagement::GetKeysHeld(&kDown)) && ((kDown & cfg->key_combination) != 0));
return g_has_initialized_fs_dev && (cfg->override_by_default ^ keys_triggered);
}

View file

@ -20,7 +20,7 @@
#include "ldr_content_management.hpp"
#include "ldr_hid.hpp"
Result HidManagement::GetKeysDown(u64 *keys) {
Result HidManagement::GetKeysHeld(u64 *keys) {
if (!ContentManagement::HasCreatedTitle(0x0100000000000013)) {
return MAKERESULT(Module_Libnx, LibnxError_InitFail_HID);
}

View file

@ -19,5 +19,5 @@
class HidManagement {
public:
static Result GetKeysDown(u64 *keys);
static Result GetKeysHeld(u64 *keys);
};