Skip to content

Commit 9128b25

Browse files
author
Timothy Blut
committed
Fix xbox hack option
1 parent 3ac1f59 commit 9128b25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/Game/Game.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ namespace tankwars {
6464

6565
if (joystickAvailable[i]) {
6666
auto name = glfwGetJoystickName(GLFW_JOYSTICK_1 + i);
67-
isXboxController[i] = (strcmp(name, XboxControllerName) == 0);
68-
if (!disableXboxHack) isXboxController[i] = (i == 0); // HACK: Glfw sees no difference, so still hardcode controller 1 for xbox
67+
//isXboxController[i] = (strcmp(name, XboxControllerName) == 0);
68+
isXboxController[i] = !disableXboxHack ? (i == 0) : false; // HACK: Glfw sees no difference, so still hardcode controller 1 for xbox
6969
std::cout << "Joystick " << (i + 1) << ": \"" << name << "\"\n";
7070

7171
joystickConfigs[i].Turn = isXboxController[i] ? XBoxTurn : GenericTurn;

0 commit comments

Comments
 (0)