flyinghead / flycast

Flycast is a multiplatform Sega Dreamcast, Naomi, Naomi 2 and Atomiswave emulator
GNU General Public License v2.0
1.43k stars 173 forks source link

Are two players supported? How to use keyboard for both? #68

Closed curtistn73 closed 3 years ago

curtistn73 commented 4 years ago

Please Note: This form is the minimum required information for submitting bugs.
Removing this form may lead to your issue being closed until it is completed.

Platform / OS / Hardware: x64 / Linux / Corei3 CPU + GeForce GTX750Ti

Hardware: Basic PC

Are two players supported? How can I map both player1 and 2 to use the keyboard?

I've search via Google and can't find anything.

flyinghead commented 4 years ago

The main limitation here is that X11 doesn't specify which keyboard a key press comes from. Having two keyboards is quite common (a laptop with an external keyboard for example) but applications normally don't care which keyboard is being used.

A solution would be to directly open the keyboard devices but the keyboard is a protected device that a regular user cannot directly access, for obvious security reasons (think typing a password...)

So I'm afraid there is no simple solution for implementing this.

curtistn73 commented 4 years ago

I was thinking about just one keyboard, as there are plenty of keys on it. Ie. a setup similar to MAME whereas player 1 start is key '5', player 2 start is key '6', player 2 up is key 'r' and so on.

flyinghead commented 4 years ago

I totally misundertood your request. And this is much easier to implement.

GamingMackie commented 4 years ago

Hi,

this would be a really great enhancement that would allow to easily use flycast in a cabinet which we unfortunately have to map both players input to a single (virtual) keyboard.

Looking forward for this if it ever happen. Thanks!

flyinghead commented 3 years ago

Next build (b0f8d947) allows binding a single controller buttons and axes to multiple players. It also works for keyboards.

Set the controller port to the new value "All" then control each player bindings in the Mapping dialog.

Unknow0059 commented 4 months ago

Set the controller port to the new value "All" then control each player bindings in the Mapping dialog.

Thanks. Backtracking from game-specific Fightcade issues to here was difficult.

Keywords for SEO: fightcade mvsc2, cvs2, 2p, 2-player, two-player, local play, offline play, lan, one device, naomi, sega