diff options
author | cpasjuste <cpasjuste@gmail.com> | 2020-04-24 09:59:06 +0200 |
---|---|---|
committer | cpasjuste <cpasjuste@gmail.com> | 2020-04-24 09:59:06 +0200 |
commit | fb95def24c42392fe79b6ab672b5a6edc7210195 (patch) | |
tree | 4802156f54de4e30418b984578b91d22d837d5de | |
parent | e124615493f4f84d372a99ea604220a8e850dde1 (diff) | |
download | manaverse-fb95def24c42392fe79b6ab672b5a6edc7210195.tar.gz manaverse-fb95def24c42392fe79b6ab672b5a6edc7210195.tar.bz2 manaverse-fb95def24c42392fe79b6ab672b5a6edc7210195.tar.xz manaverse-fb95def24c42392fe79b6ab672b5a6edc7210195.zip |
switch: fix joystick directions
-rw-r--r-- | CMakeLists.txt.switch | 2 | ||||
-rw-r--r-- | src/defaults.cpp | 2 | ||||
-rw-r--r-- | src/input/joystick.cpp | 11 |
3 files changed, 7 insertions, 8 deletions
diff --git a/CMakeLists.txt.switch b/CMakeLists.txt.switch index 12f2d5c3f..a34744d3a 100644 --- a/CMakeLists.txt.switch +++ b/CMakeLists.txt.switch @@ -66,6 +66,7 @@ set(FLAGS -DPACKAGE_NAME=\"ManaPlus\" -DPACKAGE_TARNAME=\"manaplus\" -DPACKAGE_V -DHAVE_CURL_CURL_H=1 -DHAVE_LIBXML2=1 -DHAVE_LIBXML_XMLREADER_H=1 -DHAVE_LIBPNG=1 -DSTDC_HEADERS=1 -DHAVE_ARPA_INET_H=1 -DHAVE_FCNTL_H=1 -DHAVE_MALLOC_H=1 -DHAVE_NETDB_H=1 -DHAVE_NETINET_IN_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_UNISTD_H=1 -Wall -DENABLE_ASSERTS -DHAVE_GLEXT -DENABLE_LIBXML -DUSE_SDL2 -DTMWA_SUPPORT -DCURL_STATICLIB + -DUSE_OPENGL=1 ) add_executable(${PROJECT_NAME} ${SOURCES}) @@ -79,6 +80,7 @@ target_link_libraries(${PROJECT_NAME} SDL2_net SDL2_ttf freetype bz2 curl mbedtls mbedx509 mbedcrypto + GLESv2 EGL glapi drm_nouveau diff --git a/src/defaults.cpp b/src/defaults.cpp index b566c3206..3ece72195 100644 --- a/src/defaults.cpp +++ b/src/defaults.cpp @@ -185,7 +185,7 @@ void setConfigDefaults(Configuration &cfg) AddDEF("useScreenshotDirectorySuffix", true); AddDEF("screenshotDirectorySuffix", ""); #ifdef __SWITCH__ - AddDEF("joystickEnabled", false); + AddDEF("joystickEnabled", true); #else AddDEF("joystickEnabled", false); #endif diff --git a/src/input/joystick.cpp b/src/input/joystick.cpp index 814affa46..7b2eb7d7b 100644 --- a/src/input/joystick.cpp +++ b/src/input/joystick.cpp @@ -178,14 +178,11 @@ bool Joystick::open() mButtonsNumber = MAX_BUTTONS; #ifdef __SWITCH__ - /* config.setValue("joystick" + toString(mNumber) + "calibrated", true); - config.setValue("leftTolerance" + toString(mNumber), 1000); - config.setValue("rightTolerance" + toString(mNumber), 1000); - config.setValue("upTolerance" + toString(mNumber), 1000); - config.setValue("downTolerance" + toString(mNumber), 1000); - //config.setValue("useInactiveJoystick", true); - */ + config.setValue("leftTolerance" + toString(mNumber), -10000); + config.setValue("rightTolerance" + toString(mNumber), 10000); + config.setValue("upTolerance" + toString(mNumber), -10000); + config.setValue("downTolerance" + toString(mNumber), 10000); #endif mCalibrated = config.getValueBool("joystick" + toString(mNumber) + "calibrated", false); |