flycast icon indicating copy to clipboard operation
flycast copied to clipboard

Touchscreen Lightgun support for RetroArch Android & IOS

Open Jonathan7299 opened this issue 3 years ago • 6 comments

Can you guys add touchscreen lightgun support for the Flycast core on RetroArch Android and IOS?

Jonathan7299 avatar Apr 25 '22 17:04 Jonathan7299

This is something that must be done in RetroArch. The Flycast core already supports lightguns.

flyinghead avatar Apr 25 '22 17:04 flyinghead

I was talking about the Touchscreen Lightgun that the MAME core has (where wherever you touch on the screen is where it will fire). If it already has an option that does that, can you please tell me how to do it?

Jonathan7299 avatar Apr 25 '22 18:04 Jonathan7299

Right, it looks like this is possible but needs some support in the core itself: https://www.libretro.com/index.php/retroarch-in-development-touchscreen-lightgun-for-iosandroid-iphone-xs-max-shown/

flyinghead avatar Apr 25 '22 18:04 flyinghead

Thanks 👍

Jonathan7299 avatar Apr 25 '22 18:04 Jonathan7299

Let's keep the original issue open.

flyinghead avatar Apr 25 '22 18:04 flyinghead

Hi,

I believe this can be accomplished using the RETRO_DEVICE_POINTER type, which can be set as a separate input device from the RETRO_DEVICE_LIGHTGUN type and has its own coordinate system (RETRO_DEVICE_ID_POINTER_X and RETRO_DEVICE_ID_POINTER_Y, though I think these behave the same as the lightgun coordinates) and

  • RETRO_DEVICE_ID_POINTER_PRESSED (I think typically used to emulate the trigger)
  • RETRO_DEVICE_ID_POINTER_COUNT, which should count the number of simultaneous touches on a screen that allows multi-touch inputs and allow you to pass that number to an emulator input. That way, you could have one finger activate the trigger, two fingers reload, etc.

I know a little bit about the Libretro input code and can help troubleshoot some issues if needed, but I probably wouldn't be the best person to add this feature from scratch. 😆

StormedBubbles avatar Apr 27 '22 03:04 StormedBubbles

Right, it looks like this is possible but needs some support in the core itself: https://www.libretro.com/index.php/retroarch-in-development-touchscreen-lightgun-for-iosandroid-iphone-xs-max-shown/

This is soooooo coooool!! I I dream of this to play the house of dead2 of DC in Flycast ios,will it be possible?

kireily avatar Feb 07 '23 14:02 kireily

Should be available in the next core update. Choose "Pointer" as input device. One touch to shoot, two or more touches to reload.

flyinghead avatar Mar 25 '23 10:03 flyinghead

so is it support for psvita port? after all, it also have touchscreen

pinospin avatar Jun 03 '23 16:06 pinospin