OpenClonk Bugtracker - OpenClonk
View Issue Details
0001274OpenClonkEngine - Controlspublic2015-02-13 09:082016-05-01 20:35
ReporterCaesar 
Assigned ToLuchs 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSGentoo LinuxOS Version
Product Version 
Target Version8.0Fixed in Version8.0 
Summary0001274: Gamepad not working
DescriptionUnder linux, my gamepad is not working at all in openclonk.

First off, unless USE_SDL_MAINLOOP is set, the gamepad code is not actually build. (That was easy to fix, see below)

But then I got stuck. The input is received by C4GamePadControl::Execute just fine and are forwared to C4KeyboardInput::DoInput. There, no gamepad keypresses that is triggered seems to have the necessary KEYSTOPE_Control (keyboard input does).

Explanations? Fixes?
Additional Information--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -897,11 +897,10 @@ endif()
 find_package("Audio")
 
 # SDL
-if(USE_SDL_MAINLOOP OR (Audio_TK STREQUAL "SDL_Mixer"))
+if(USE_SDL_MAINLOOP OR (Audio_TK STREQUAL "SDL_Mixer") OR NOT WIN32)
        include(FindSDL)
        SET(HAVE_SDL ${SDL_FOUND})
        include_directories(${SDL_INCLUDE_DIR})
- target_link_libraries(openclonk ${SDL_LIBRARY})
 endif()
 
 ############################################################################
@@ -1287,6 +1286,11 @@ elseif(MINGW)
        endif()
 endif()
 
+# SDL
+if(HAVE_SDL)
+ target_link_libraries(openclonk ${SDL_LIBRARY})
+endif()
+
 CHECK_INCLUDE_FILE_CXX(getopt.h HAVE_GETOPT_H)
 
 # TinyXML
TagsNo tags attached.
Attached Files

Notes
(0003496)
Clonkonaut   
2015-02-13 18:20   
The information you wanted is:

Scope KEYSCOPE_Control (1) C4KeyScope

Gamepad worked for me (Win 8.1)
(0003525)
Armin   
2015-03-08 21:51   
In OC 4.1 my gamepad works. (Even if I am not able to change the the suggested buttons.). In 5.1 not. Using Korora 21 Linux.
(0004389)
Zapper   
2015-12-25 22:37   
We should postpone this to 8.0 as ingame gamepad support will not be ready for 7.0 anyway.

We should probably disable gamepad in the options, though.
(0004445)
Clonkonaut   
2016-01-02 19:41   
Moved to 8.0
(0005092)
Luchs   
2016-05-01 20:35   
Gamepad should now work equally well (or badly) on all platforms, as SDL is now used everywhere.

Issue History
2015-02-13 09:08CaesarNew Issue
2015-02-13 18:20ClonkonautNote Added: 0003496
2015-03-08 21:51ArminNote Added: 0003525
2015-10-16 00:33Sven2Target Version => 7.0
2015-12-25 22:37ZapperNote Added: 0004389
2016-01-02 19:41ClonkonautTarget Version7.0 => 8.0
2016-01-02 19:41ClonkonautNote Added: 0004445
2016-01-02 19:41ClonkonautStatusnew => acknowledged
2016-05-01 20:35LuchsNote Added: 0005092
2016-05-01 20:35LuchsStatusacknowledged => resolved
2016-05-01 20:35LuchsFixed in Version => 8.0
2016-05-01 20:35LuchsResolutionopen => fixed
2016-05-01 20:35LuchsAssigned To => Luchs