foxygit / fake-08-xbox360 Log in
commit 9cb2d0abeaec58012a3ff757652fd28feff34063
Author:     jtothebell <j.to.the.bell@gmail.com>
AuthorDate: Wed Jun 23 21:52:59 2021 -0600
Commit:     jtothebell <j.to.the.bell@gmail.com>
CommitDate: Wed Jun 23 21:52:59 2021 -0600

    zero out input variables in setup

    Fix vita bug where garbage value causes weird input on startup
---
 platform/3ds/source/3dsHost.cpp             | 3 +++
 platform/SDL2Common/source/sdl2basehost.cpp | 3 +++
 platform/wiiu/source/WiiUHost.cpp           | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/platform/3ds/source/3dsHost.cpp b/platform/3ds/source/3dsHost.cpp
index 1e12f44..357b799 100644
--- a/platform/3ds/source/3dsHost.cpp
+++ b/platform/3ds/source/3dsHost.cpp
@@ -330,6 +330,9 @@ void Host::oneTimeSetup(Color* paletteColors, Audio* audio){
     frame_time = 0;
     targetFrameTimeMs = 0;

+    currKDown32 = 0;
+    currKHeld32 = 0;
+
     _paletteColors = paletteColors;
     for(int i = 0; i < 144; i++){
         _rgba8Colors[i] = 0xFF | (_paletteColors[i].Blue << 8) | (_paletteColors[i].Green << 16) | (_paletteColors[i].Red << 24);
diff --git a/platform/SDL2Common/source/sdl2basehost.cpp b/platform/SDL2Common/source/sdl2basehost.cpp
index e8f5883..1cebd09 100644
--- a/platform/SDL2Common/source/sdl2basehost.cpp
+++ b/platform/SDL2Common/source/sdl2basehost.cpp
@@ -233,6 +233,9 @@ void Host::oneTimeSetup(Color* paletteColors, Audio* audio){
     frame_time = 0;
     targetFrameTimeMs = 0;

+    currKDown = 0;
+    currKHeld = 0;
+
     _paletteColors = paletteColors;

     loadSettingsIni();
diff --git a/platform/wiiu/source/WiiUHost.cpp b/platform/wiiu/source/WiiUHost.cpp
index 526e41b..f91c87e 100644
--- a/platform/wiiu/source/WiiUHost.cpp
+++ b/platform/wiiu/source/WiiUHost.cpp
@@ -258,6 +258,9 @@ void Host::oneTimeSetup(Color* paletteColors, Audio* audio){
     frame_time = 0;
     targetFrameTimeMs = 0;

+    currKDown = 0;
+    currKHeld = 0;
+
     _paletteColors = paletteColors;

     loadSettingsIni();