BlitterStudio / amiberry

Optimized Amiga emulator for Linux/macOS
https://amiberry.com
GNU General Public License v3.0
643 stars 86 forks source link

Suggestion : toggle status led with the controller #161

Closed Voljega closed 6 years ago

Voljega commented 6 years ago

Hello, for ADF games the status led is a very good indicator or wether your game is still alive or not.

For now, we must enter the GUI to display it or hide it.

If they're is enough place on the controller in the next version (I mean with mouse mapped also on the controller and all) it could be good to toggle on/off the status led with a controller button, L2 maybe, like it is done in Hatari ? Would it be possible to have a dedicated parameter for that ?

HoraceAndTheSpider commented 6 years ago

In theory the “input event” which is triggered by the controller could have led status added to it, allowing it as a custom option.

The problem is, non-amiga events (so unlike joystick controls etc) for the emulator don not have a “trigger” limitation that works.

I.e if you hold down the button, it repeatedly fires the event on/off and you don’t know if you will “land” on the right setting. This is the same problem that has occurred trying to add functions like “mouse speed” to the input events list.

There is a possible solution, where perhaps we can trigger “on screen” set of emulator controls (akin to an on screen keyboard) which I would explore in the future, and this option could be added to that. But it’s some time away I’m afraid.

Since the GuI is now controllable from the controller, it is not much of a stretch however to change this setting that way anymore?

Voljega commented 6 years ago

Oh yeah forgot that about the menu !

But you'll still have to go to the right menu item and then go to the led status checkbox and click on it and go back to the game. And do at least some of the same operations to hide it again

I saw more the functionnality as a quick glance to see if the game is still working/loading or the emulator stuck, if a specific flopoy is read, that king of thing. I'm not sure I understand exactly what you explained but this wouldn't be "holding down the button and the leds show, release it and they hide" it would be "press the button once and the leds show, press it a second time and they hide" Exactly like the button for showing GUI (and maybe hidingbit in the new version ?)

Many ADFs take a very long time to load and you're never so sure the emulator is not stuck as many of them crashes too. I display the led status by default for ADF but some users doesn't like it, which I can understand too

HoraceAndTheSpider commented 6 years ago

I know you would only be pressing it once (it needs to be a toggle event) , but sadly even the shortest button press can send the input trigger signal multiple times!!

This means it can switch it off/on even more in a short tap. There are ways that UAE stops this for Amiga events, but they don’t seem to work for “new” emulator event.

Voljega commented 6 years ago

OK I see, tricky modification then.

ghost commented 6 years ago

Also, you cannot navigate the GUI with some joypads unfortunately (the popular iBuffalo SNES pad) and when changing the quickstart model (which needs to be done with a mouse) it turns off the drive lights #155 .

HoraceAndTheSpider commented 6 years ago

The only ones that won’t work with the controllers are those that use Axis inputs instead of hats or buttons.

This I will fix when we properly migrate to SDL2, which will also allow input from multiple devices in the gui (currently only the “first” controller)

The changing of QuickStart model I investigated yesterday. It is nothing to do with the controller input ... you get the same problem when using the keyboard cursor keys.

This is to do with the navigation.cpp code and the handling of drop-downs and other GUI elements. I will be looking into it to see why certain gui elements differ from others , but as I say, it’s not specifically controller related.

ghost commented 6 years ago

I didn't know that it also happens when using the keyboard as I don't use the keyboard for the GUI. I was only indicating that it can't be navigated with a joypad. Thanks for the info. I'm sure it will be fixed in time.

midwan commented 6 years ago

This should be already fixed in SDL2 (regarding the key input). The dropdowns not getting handled correctly was fixed several commits ago also.

Closing it for now, but we can re-open it if we find something here that is not resolved.