captainys / TOWNSEMU

FM Towns Emulator "Tsugaru"
BSD 3-Clause "New" or "Revised" License
238 stars 17 forks source link

Controller input not working on Linux #45

Open leonstyhre opened 2 years ago

leonstyhre commented 2 years ago

Hi!

It seems as if controller input is currently broken on Linux. No matter what settings I try I can't get my Xbox 360 controller to work on Linux although it works fine with the same emulator release on Windows and with the same games and settings.

This is consistent for all games I've tried. But I can remap the input to the keyboard using the command line option -GAMEPORT0 KEY so the games are at least playable.

Mouse input is also very laggy compared to the Windows release but I guess that's an unrelated issue.

Many thanks in advance!

akaelover commented 1 year ago

I confirm that it does not work on Linux, I have tried several controllers and none of them work.

anonyme-x22 commented 10 months ago

Hi, You can't remap via the emulator, virtual key as direct joystick game port don't work, in fact the emulator don't recognize any joystick tried with a simple turbograpfx pad. But you can use a third party tool to remap the joystick to the emulator standard layout (which is unfortunately unknown!) in gamepad to keyboard mode. After research the standard layout for P1 with marty controller seems to be: Up, Down, Left, Right, B1 z, B2 x, Select s, Run a

leonstyhre commented 10 months ago

Thanks, but this is quite problematic when for example launching the emulator via a frontend, the solution should really be to implement proper joystick/controller support into the emulator.

captainys commented 9 months ago

Sorry for taking this long. I think I fixed the game pad issue. If you can build from the source, please try the latest source. Looks like I injected this error a while ago. I installed Ubuntu 18 natively on my old Think Pad and confirmed game pad is working again.

leonstyhre commented 9 months ago

Thanks for fixing this issue, I can confirm that it now works on Linux. When will you make the next release so that everyone can have this issue resolved?

Btw, any plans to add a possibility to exit the emulator via a configurable controller button combination? That would be very nice for a device like the Steam Deck. Thanks!

anonyme-x22 commented 9 months ago

That's a good news, can't wait for general availability. Actually i was using antimicrox which loaded a mapped key to the controller (turbo grafx), a mess and potentially multiple key at the same time issue, but it works. that's work with a frontend because antimicrox can detect when the main wondows is launched. However of course that direct support is much better