libretro-mirrors / libretro-arb

For proposed improvements to libretro API.
8 stars 2 forks source link

Poll all 16 buttons in a single retro_input_state() #25

Open heuripedes opened 9 years ago

heuripedes commented 9 years ago

It'd be nice if one could pass something like RETRO_JOYPAD_ID_ALL as the id parameter of retro_input_state() so that the frontend would return a bitmask containing the state of the 16 buttons supported by the libretro api.

This can be implemented in v1 without ABI/API breakage, maybe a RETRO_ENV_GET_CAN_* query could be used to detect this feature.

Alcaro commented 9 years ago

I could swear we already had an issue for this? In fact, I could swear it's what made Twinaphex authorize an ABI bump?

Advantages of doing this:

Disadvantages:

I'm not convinced that the advantages outweigh the disadvantages.

I agree that we need to rewrite the input handlers for libretro v2, but I'm not happy with neither the existing method nor your proposal. I want v2 to be an event-driven architecture, so we can get rid of the polling entirely. It's the only way to scale to large numbers of keys (RETRO_DEVICE_KEYBOARD).