nillerusr / source-engine

Modified source engine (2017) developed by valve and leaked in 2020. Not for commercial purporses
Other
1.23k stars 195 forks source link

Controller not working #165

Open Moe-Baker opened 1 year ago

Moe-Baker commented 1 year ago

Hello, and thank you for this awesome project.

I'm trying to play Portal on my phone using a controller and the controller is not working in-game. I have enabled the Controller option inside the touch menu. I tried the program with the controller on two other phones and it worked fine, so I'm thinking this might be because of my phone/ROM, I'm using a Poco F3 running Evolution X custom ROM, I also had Arrow OS custom rom and it also had the same problem.

Here's a link to my steam account that owns these games.

This is the log file of the engine when I'm trying to play Portal.

Looking at it I'm noticing these lines about the controller being detected as #1 but the android accelerometer being used as #0

[2.6652] Initializing joystick #0 and making it active. [2.6653] Unable to initialize rumble for joystick #0: Haptic: Joystick isn't a haptic device. [2.6654] ConVarRef joystick doesn't point to an existing ConVar [2.6655] Detected supported joystick #1 'Xbox One S Controller'. Currently active joystick is #0. [2.6655] Found joystick 'Android Accelerometer' (05000000416e64720000000000000000), but no recognized controller configuration for it.

Perhaps this has something to do with the problem?

I'd appreciate any help you can spare me. Cheers, and thank you.

stephen-cusi commented 1 year ago

It doesn't work in other games

Moe-Baker commented 1 year ago

It doesn't work in other games

I'm not sure I understand what you mean. the controller support works fine on an LG G8 with the same games.

stephen-cusi commented 1 year ago

在其他游戏中不起作用

我不确定我明白你的意思。控制器支持在具有相同游戏的 LG G8 上运行良好。 Well, maybe there is something wrong with my Android version.

Moe-Baker commented 1 year ago

Well, maybe there is something wrong with my Android version.

There might be something wrong indeed, but this is the only software that is giving me this issue, AetherSX2, Skyline, PPSSPP all work fine with controller. So I'm thinking it might be a small problem with controller detection in this program combined with my android version?

nillerusr commented 1 year ago

[2.6654] ConVarRef joystick doesn't point to an existing ConVar

Hm, that's strange

Moe-Baker commented 1 year ago

Hm, that's strange

Here's some more information I found, apparently my fingerprint sensor is being detected as a gamepad, this is a "problem" with android. You can find out more about it from here https://github.com/libgdx/libgdx/issues/5596 It seems like it's recommended to ignore controllers with the name "uinput-fpc" & "uinput-goodix" Maybe this is my problem?

Moe-Baker commented 1 year ago

Made pull request on nillerusr/source-thirdparty to add the fix mentioned in this SDL issue. Maybe this will fix the problem, I'm trying to build the project but having some issues with Ubuntu 16.04.7 64bit, will download 32bit version and try that.

Moe-Baker commented 1 year ago

Any news on this issue?