summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAmin Mesbah <mesbahamin@gmail.com>2017-10-24 22:40:14 -0700
committerAmin Mesbah <mesbahamin@gmail.com>2017-10-24 22:40:14 -0700
commit4bdfd2a5efd2151d32275cb48e96ac1e981bbfb9 (patch)
treebd056d100e3734c63ce93d019985097e97587a43 /src
parent90c8e671a8ffc1b4f3aff3c04b0b3c80f87f59b8 (diff)
downloadohsp-4bdfd2a5efd2151d32275cb48e96ac1e981bbfb9.zip
ohsp-4bdfd2a5efd2151d32275cb48e96ac1e981bbfb9.tar.gz
Fix scary bug caused by uninitialized variables
Sometimes the axes would start with absurd values.
Diffstat (limited to 'src')
-rw-r--r--src/platform_sdl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/platform_sdl.c b/src/platform_sdl.c
index f6bc08e..789b427 100644
--- a/src/platform_sdl.c
+++ b/src/platform_sdl.c
@@ -244,8 +244,8 @@ int main(int argc, char *argv[])
struct GameControllerInput controller_input;
controller_input.controller_index = 0;
controller_input.left_stick_x = 0;
- controller_input.right_stick_y = 0;
- controller_input.left_stick_x = 0;
+ controller_input.left_stick_y = 0;
+ controller_input.right_stick_x = 0;
controller_input.right_stick_y = 0;
while (running)