commit 968c7d6ece7c12705583f6e6f9eebc1762287b30
Author: jtothebell <j.to.the.bell@gmail.com>
AuthorDate: Mon Nov 23 06:24:40 2020 -0700
Commit: jtothebell <j.to.the.bell@gmail.com>
CommitDate: Mon Nov 23 06:24:40 2020 -0700
update 3ds and switch hosts for host/vm changes
---
platform/3ds/source/3dsHost.cpp | 16 ++++++----------
platform/switch/source/SwitchHost.cpp | 15 ++++++---------
2 files changed, 12 insertions(+), 19 deletions(-)
diff --git a/platform/3ds/source/3dsHost.cpp b/platform/3ds/source/3dsHost.cpp
index 6063626..0b80e16 100644
--- a/platform/3ds/source/3dsHost.cpp
+++ b/platform/3ds/source/3dsHost.cpp
@@ -224,22 +224,18 @@ void Host::changeStretch(){
}
}
-void Host::scanInput(){
+InputState_t Host::scanInput(){
hidScanInput();
currKDown = hidKeysDown();
currKHeld = hidKeysHeld();
-}
-
-uint8_t Host::getKeysDown(){
- return ConvertInputToP8(currKDown);
-}
-uint8_t Host::getKeysHeld(){
- return ConvertInputToP8(currKHeld);
+ return InputState_t {
+ ConvertInputToP8(currKDown),
+ ConvertInputToP8(currKHeld)
+ };
}
-
bool Host::shouldQuit() {
bool lpressed = currKHeld & KEY_L;
bool rpressed = currKDown & KEY_R;
@@ -393,7 +389,7 @@ void Host::playFilledAudioBuffer(){
fillBlock = !fillBlock;
}
-bool Host::mainLoop(){
+bool Host::shouldRunMainLoop(){
return aptMainLoop();
}
diff --git a/platform/switch/source/SwitchHost.cpp b/platform/switch/source/SwitchHost.cpp
index e52adae..a5545cb 100644
--- a/platform/switch/source/SwitchHost.cpp
+++ b/platform/switch/source/SwitchHost.cpp
@@ -207,19 +207,16 @@ void Host::changeStretch(){
}
}
-void Host::scanInput(){
+InputState_t Host::scanInput(){
hidScanInput();
currKDown = hidKeysDown(CONTROLLER_P1_AUTO);
currKHeld = hidKeysHeld(CONTROLLER_P1_AUTO);
-}
-
-uint8_t Host::getKeysDown(){
- return ConvertInputToP8(currKDown);
-}
-uint8_t Host::getKeysHeld(){
- return ConvertInputToP8(currKHeld);
+ return InputState_t {
+ ConvertInputToP8(currKDown),
+ ConvertInputToP8(currKHeld)
+ };
}
@@ -315,7 +312,7 @@ void Host::playFilledAudioBuffer(){
fillBlock = !fillBlock;
}
-bool Host::mainLoop(){
+bool Host::shouldRunMainLoop(){
return appletMainLoop();
}