supertuxkart / stk-code

The code base of supertuxkart
Other
4.53k stars 1.06k forks source link

STK doesn't check for game controller until the options page is opened. #4791

Open DaniAngel opened 2 years ago

DaniAngel commented 2 years ago

Description

I am using the git version. Linux Mint 20.3 Cinnamon. Asus x415 laptop with 20GB RAM and 500GB ssd. Every time I start STK, I have to use the mouse or Keyboard to open the options page. Once the options page is displayed, my wireless, usb ps3 controller will work, until I get on the options page, STK doesn't recognize it. Everything is fine until I quit the game and restart it. Then I have to open the options screen again.

Steps to reproduce

I cloned the git files and compiled and installed from source. Not sure how to determine version. Git was cloned on 8/8/2022. When using a wireless usb ps3 controller, everything seems to work after setting up the controller. Gameplay is good. When I quit the game, and then restart the game, only the keyboard and mouse are detected until I press the options wrench. as soon as I am on the options screen, the ps3 controller works as it is supposed to. Is there a setting I need to change for the game to auto discover the controller without having to click on the options button? The previous version of STK, from the repository worked properly in this regard. However I could not connect to the STK servers with that version, thus the GIT clone, build and install from source route for the latest version.

Configuration

STK release version: Git version

STK Source (PPA, distribution package, official binary, etc.): Git Clone from STK on github (downloaded on 8/8/2022)

System: linux mint 20.3 cinnamon Running on Asus X415 with 20GB Ram, 500GB ssd Graphics card: Intel UHD

CPU: Intel core i3 Gamepads/keyboards models if related to the issue: Afterglow PS3 usb wireless controller

Additional information

stdout.log:

[info   ] [FileManager]: Data files will be fetched from: '/usr/local/share/supertuxkart/data/'
[info   ] [FileManager]: User directory is '/home/daniel/.config/supertuxkart/config-0.10/'.
[info   ] [FileManager]: Addons files will be stored in '/home/daniel/.local/share/supertuxkart/addons/'.
[info   ] [FileManager]: Screenshots will be stored in '/home/daniel/.local/share/supertuxkart/screenshots/'.
[info   ] [FileManager]: User-defined grand prix will be stored in '/home/daniel/.local/share/supertuxkart/grandprix/'.
[info   ] [FileManager]: Asset 0 will be loaded from '/usr/local/share/supertuxkart/data/challenges/'.
[info   ] [FileManager]: Asset 1 will be loaded from '/usr/local/share/supertuxkart/data/gfx/'.
[info   ] [FileManager]: Asset 2 will be loaded from '/usr/local/share/supertuxkart/data/grandprix/'.
[info   ] [FileManager]: Asset 3 will be loaded from '/usr/local/share/supertuxkart/data/gui/icons/'.
[info   ] [FileManager]: Asset 4 will be loaded from '/usr/local/share/supertuxkart/data/gui/screens/'.
[info   ] [FileManager]: Asset 5 will be loaded from '/usr/local/share/supertuxkart/data/gui/dialogs/'.
[info   ] [FileManager]: Asset 6 will be loaded from '/usr/local/share/supertuxkart/data/replay/'.
[info   ] [FileManager]: Asset 7 will be loaded from '/usr/local/share/supertuxkart/data/shaders/'.
[info   ] [FileManager]: Asset 8 will be loaded from '/usr/local/share/supertuxkart/data/skins/'.
[info   ] [FileManager]: Asset 9 will be loaded from '/usr/local/share/supertuxkart/data/ttf/'.
[info   ] [FileManager]: Asset 10 will be loaded from '/usr/local/share/supertuxkart/data/po/'.
[info   ] [FileManager]: Asset 11 will be loaded from '/usr/local/share/supertuxkart/data/library/'.
[info   ] [FileManager]: Asset 12 will be loaded from '/usr/local/share/supertuxkart/data/models/'.
[info   ] [FileManager]: Asset 13 will be loaded from '/usr/local/share/supertuxkart/data/music/'.
[info   ] [FileManager]: Asset 14 will be loaded from '/usr/local/share/supertuxkart/data/sfx/'.
[info   ] [FileManager]: Asset 15 will be loaded from '/usr/local/share/supertuxkart/data/textures/'.
[info   ] [FileManager]: Asset 16 will be loaded from '/usr/local/share/supertuxkart/data/tracks/'.
[verbose  ] translation: Env var LANGUAGE = 'en_US'.
[verbose  ] translation: Language 'English (United States)'.
[info   ] [IrrDriver Logger]: ..:: Antarctica Rendering Engine 2.0 ::..
[info   ] [IrrDriver Logger]: SDL Version 2.0.10
[info   ] [IrrDriver Logger]: Using renderer: OpenGL 4.6
[info   ] [IrrDriver Logger]: Mesa Intel(R) UHD Graphics (TGL GT2): Intel
[info   ] [IrrDriver Logger]: OpenGL driver version is 1.2 or better.
[info   ] [IrrDriver Logger]: GLSL version: 4.6
[info   ] IrrDriver: OpenGL version: 4.6
[info   ] IrrDriver: OpenGL vendor: Intel
[info   ] IrrDriver: OpenGL renderer: Mesa Intel(R) UHD Graphics (TGL GT2)
[info   ] IrrDriver: OpenGL version string: 4.6 (Core Profile) Mesa 21.2.6
[info   ] GLDriver: ARB Buffer Storage Present
[info   ] GLDriver: ARB Compute Shader Present
[info   ] GLDriver: ARB Arrays of Arrays Present
[info   ] GLDriver: ARB Texture Storage Present
[info   ] GLDriver: ARB Texture View Present
[info   ] GLDriver: ARB Image Load Store Present
[info   ] GLDriver: ARB Shader Atomic Counters Present
[info   ] GLDriver: ARB Shader Storage Buffer Object Present
[info   ] GLDriver: EXT Texture Compression S3TC Present
[info   ] GLDriver: ARB Uniform Buffer Object Present
[info   ] GLDriver: ARB Explicit Attrib Location Present
[info   ] GLDriver: EXT Texture Filter Anisotropic Present
[info   ] GLDriver: Geometry Shaders Present
[info   ] GLDriver: ARB Texture Buffer Object Present
[info   ] GLDriver: ARB Texture Swizzle Present
[info   ] GLDriver: ARB Pixel Buffer Object Present
[info   ] GLDriver: ARB Sampler Objects Present
[info   ] GLDriver: ARB Vertex Type 2_10_10_10_rev Present
[info   ] GLDriver: ARB Instanced Arrays Present
[info   ] SharedGPUObjects: Hardware Skinning enabled, method: TBO, max bones: 1024
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/screenquad.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/motion_blur.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/lightning.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/primitive2dlist.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/transparent.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/texturedquad.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/uniformcolortexturedquad.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/texturedquad.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/coloredquad.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/coloredquad.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/colortexturedquad.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/colortexturedquad.frag
[info   ] irr_driver: GLSL supported.
[info   ] GUI: Loading skin data from file: /usr/local/share/supertuxkart/data/skins/peach/stkskin.xml
[info   ] SDLController: Generic X-Box pad plugged in: buttons: 11, axes: 6, hats: 1.
[info   ] SDLController: Generic X-Box pad uses game controller mapping XInput Controller.
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_pass.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_solid.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_shadow.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/white.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_skinning.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_skinning_shadow.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_normal_map.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_alpha_test.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_shadow_alpha_test.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_decal.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_grass_pass.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_grass.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_grass_shadow.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_unlit.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_transparent.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_ghost.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_dynamic_night_bloom.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_tilling_mitigation.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_vertical_mapping.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_road_blending.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_displace.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/colorize.frag
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_normal_visualizer.vert
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_normal_visualizer.geom
[info   ] ShaderFilesManager: Compiling shader: /usr/local/share/supertuxkart/data/shaders/sp_normal_visualizer.frag
[info   ] HTTPRequest: Sending userid=376970&token=************************ to https://online.supertuxkart.net/api/v2/user/saved-session/
[info   ] HTTPRequest: Downloading https://online.supertuxkart.net/dl/xml/online_news.xml
[info   ] GrandPrixManager: Loading Grand Prix files from /usr/local/share/supertuxkart/data/grandprix/
[info   ] GrandPrixManager: Loading Grand Prix files from /home/daniel/.local/share/supertuxkart/grandprix/
[warn   ] SPMeshBuffer: kartDirt shader is missing, fallback to solid
[warn   ] SPMeshBuffer: kartDirt shader is missing, fallback to solid
[warn   ] SPMeshBuffer: kartDirt shader is missing, fallback to solid
[warn   ] SPMeshBuffer: kartDirt shader is missing, fallback to solid
[warn   ] SPMeshBuffer: kartDirt shader is missing, fallback to solid
[info   ] Achievements: Synching achievement 2,5,7,9 to server.
[info   ] HTTPRequest: Sending userid=376970&token=************************&achievementid=2%2C5%2C7%2C9 to https://online.supertuxkart.net/api/v2/user/achieving/
[info   ] addons: Using cached addons.xml.
[info   ] HTTPRequest: Sending userid=376970&token=************************&visitingid=376970 to https://online.supertuxkart.net/api/v2/user/get-friends-list/
[info   ] HTTPRequest: Sending userid=376970&token=************************ to https://online.supertuxkart.net/api/v2/user/poll/
[info   ] SDLController: Generic X-Box pad unplugged.
[info   ] HTTPRequest: Sending userid=376970&token=************************ to https://online.supertuxkart.net/api/v2/user/client-quit/
[verbose  ] Thread: Start waiting 2249143.385000
[verbose  ] Thread: Waited 0.010000 seconds for thread to become deleteable.
[verbose  ] Thread: Stop waiting 2249143.396000
[verbose  ] Thread: Start waiting 2249143.404000
[verbose  ] Thread: Waited 0.263000 seconds for thread to become deleteable.
[verbose  ] Thread: Stop waiting 2249143.667000
[info   ] Singleton: Destroyed singleton.
[info   ] Singleton: Destroyed singleton.
[info   ] Singleton: Destroyed singleton.
[info   ] Singleton: Destroyed singleton.
[info   ] Singleton: Destroyed singleton.
[info   ] Singleton: Destroyed singleton.
[info   ] Singleton: Destroyed singleton.
[info   ] Singleton: Destroyed singleton.
[info   ] Singleton: Destroyed singleton.
[info   ] Singleton: Destroyed singleton.

input.xml:

<input version="1">

<!--
Event 1 : Keyboard button press
    'id' indicates which button, as defined by irrlicht's EKEY_CODE enum
Event 2 : Gamepad stick motion
    'id' indicates which stick, starting from 0
    'direction' 0 means negative, 1 means positive
Event 3 : Gamepad button press
    'id' indicates which button, starting from 0
-->

<keyboard enabled="true" configName="">
     <action name="steerLeft" event="1" id="37" />
    <action name="steerRight" event="1" id="39" />
    <action name="accel" event="1" id="38" />
    <action name="brake" event="1" id="40" />
    <action name="nitro" event="1" id="78" />
    <action name="drift" event="1" id="86" />
    <action name="rescue" event="1" id="8" />
    <action name="fire" event="1" id="32" />
    <action name="lookBack" event="1" id="66" />
    <action name="pauserace" event="1" id="27" />
    <action name="menuUp" event="1" id="38" />
    <action name="menuDown" event="1" id="40" />
    <action name="menuLeft" event="1" id="37" />
    <action name="menuRight" event="1" id="39" />
    <action name="menuSelect" event="1" id="13" />
    <action name="menuCancel" event="1" id="27" />
</keyboard>

<gamepad name ="Generic X-Box pad" deadzone="4096" desensitize="0" auto-center="20" force-feedback="1" enabled="true" configName="">
     <action name="steerLeft" event="2" id="0" direction="0" range="0" />
    <action name="steerRight" event="2" id="0" direction="1" range="0" />
    <action name="accel" event="2" id="2" direction="1" range="1" />
    <action name="brake" event="3" id="4" />
    <action name="nitro" event="3" id="3" />
    <action name="drift" event="3" id="5" />
    <action name="rescue" event="3" id="6" />
    <action name="fire" event="2" id="5" direction="1" range="1" />
    <action name="lookBack" event="3" id="2" />
    <action name="pauserace" event="3" id="7" />
    <action name="menuUp" event="2" id="1" direction="0" range="0" />
    <action name="menuDown" event="2" id="1" direction="1" range="0" />
    <action name="menuLeft" event="2" id="0" direction="0" range="0" />
    <action name="menuRight" event="2" id="0" direction="1" range="0" />
    <action name="menuSelect" event="3" id="0" />
    <action name="menuCancel" event="3" id="3" />
</gamepad>

</input>

Error message:

not applicable
Benau commented 2 years ago

no input code changes recently so you need to git bisect to find out if there is really a regression

DaniAngel commented 2 years ago

Thank you for the reply. I will read up on git bisect. I have never used this command. I have been playing around with it a little more and found the underlying problem. I created a launcher for my desktop to run the STK Git version that I compiled and installed. When I launch STK from the launcher, it launches in full screen mode, however it is NOT the active application, thus it doesn't take input from either the controller or the keyboard. My memory of using the keyboard was wrong. I must use the mouse. I don't have to click on the options button...I just have to click anywhere in the STK window to make it the active application. Then both the controller and the keyboard work as expected. Is there a way to modify the launcher to make sure it is the active window? Currently the launcher runs the following command: "/usr/local/bin/supertuxkart" Dani

Benau commented 2 years ago

maybe this will work

try edit your stk-code/lib/irrlicht/source/Irrlicht/CIrrDeviceSDL.cpp and use SDL_WINDOW_FULLSCREEN_DESKTOP instead of SDL_WINDOW_FULLSCREEN

DaniAngel commented 2 years ago

maybe this will work

try edit your stk-code/lib/irrlicht/source/Irrlicht/CIrrDeviceSDL.cpp and use SDL_WINDOW_FULLSCREEN_DESKTOP instead of SDL_WINDOW_FULLSCREEN

Thank you for the reply. Is this something that I need to recompile and build after making the switch? Dani

Benau commented 2 years ago

Yes

DaniAngel commented 2 years ago

maybe this will work

try edit your stk-code/lib/irrlicht/source/Irrlicht/CIrrDeviceSDL.cpp and use SDL_WINDOW_FULLSCREEN_DESKTOP instead of SDL_WINDOW_FULLSCREEN

Thank you for the reply. Is this something that I need to recompile and build after making the switch? Dani

maybe this will work

try edit your stk-code/lib/irrlicht/source/Irrlicht/CIrrDeviceSDL.cpp and use SDL_WINDOW_FULLSCREEN_DESKTOP instead of SDL_WINDOW_FULLSCREEN

This worked!!!! Thank you so much! Dani