Author Topic: Game restarts when pressing ESC to exit  (Read 12081 times)

FB911

  • Full Member
  • ***
  • Posts: 30
    • View Profile
Game restarts when pressing ESC to exit
« on: December 28, 2016, 08:53:54 PM »
I'm running the August image of Floob and this is happening in all themes in Attract Mode.

Issue: When i press ESC to exit a game in mame4all (or any other key i programmed to exit a game), either the game restarts (loop) or it jumps to another game (from mame4all) or even from another emulator which also tries starts. It also sometimes offers me the option to exit Attract Mode which seems to indicate i pressed ESC twice.

The issue doesn't happen all the time but is pretty persistent.

I tried disabling the RunCommand Launch Menu to no effect. I tried programming different keys to exit the game. I'm just not sure what to try now...

This issue doesn't happen in EmulationStation.

Any suggestions would be appreciated, thx.


progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Game restarts when pressing ESC to exit
« Reply #1 on: December 28, 2016, 11:37:33 PM »
The version of AM in that image has a bug when a keyboard is attached. To fix the issue you can upgrade AM or disconnect any keyboards or keyboard encoders.

slowsl

  • Full Member
  • ***
  • Posts: 45
    • View Profile
Re: Game restarts when pressing ESC to exit
« Reply #2 on: December 29, 2016, 05:34:24 AM »
c/p from another thread...
Yes, to update attractmode you must recompile but you won't lose any settings or configuation. To fix your issue you only need to follow the 5 command lines under "Download and build Attract-Mode" here https://github.com/mickelson/attract/wiki/Compiling-on-the-Raspberry-Pi-%28Raspbian-Jessie%29. I would recommend you do the entire install using "Method 2: build FFmpeg with mmal support (hardware accelerated video decoding)" though because it will give you mmal hardware decoding which you don't have from Floob's image. This will help a lot if you plan to use videos in attractmode.
I did this and it fixed the issue.

FB911

  • Full Member
  • ***
  • Posts: 30
    • View Profile
Re: Game restarts when pressing ESC to exit
« Reply #3 on: December 29, 2016, 05:55:55 AM »
The version of AM in that image has a bug when a keyboard is attached. To fix the issue you can upgrade AM or disconnect any keyboards or keyboard encoders.

Thx for the quick reply.

I will try this upgrading AM and i will confirm the issue is resolved, cheers!

FB911

  • Full Member
  • ***
  • Posts: 30
    • View Profile
Re: Game restarts when pressing ESC to exit
« Reply #4 on: December 29, 2016, 05:57:07 AM »
c/p from another thread...
Yes, to update attractmode you must recompile but you won't lose any settings or configuation. To fix your issue you only need to follow the 5 command lines under "Download and build Attract-Mode" here https://github.com/mickelson/attract/wiki/Compiling-on-the-Raspberry-Pi-%28Raspbian-Jessie%29. I would recommend you do the entire install using "Method 2: build FFmpeg with mmal support (hardware accelerated video decoding)" though because it will give you mmal hardware decoding which you don't have from Floob's image. This will help a lot if you plan to use videos in attractmode.
I did this and it fixed the issue.

Thx for the instructions. I will will try that shortly  :)

FB911

  • Full Member
  • ***
  • Posts: 30
    • View Profile
Re: Game restarts when pressing ESC to exit
« Reply #5 on: December 30, 2016, 06:05:04 AM »
I upgraded following the provided instructions (i did receive a few errors but i think i got through ok, i'm pretty new to Linux) however, the version is still AM 0.5 August 2016.

Any thoughts?

Thx

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Game restarts when pressing ESC to exit
« Reply #6 on: December 30, 2016, 10:58:40 AM »
I upgraded following the provided instructions (i did receive a few errors but i think i got through ok, i'm pretty new to Linux) however, the version is still AM 0.5 August 2016.

Any thoughts?

Thx

That's just some text that Floob put in his image. Of course it won't magically change. Do you still have the same issue?

Use "attract -v" to see the version.

RandoCalrisian

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Game restarts when pressing ESC to exit
« Reply #7 on: December 30, 2016, 12:10:37 PM »
I'm running attract-mode v2.2.0

I experience this issue but in a slightly different way (I think it's the same...)

I'm running AM on a RetroPie 4.1 install on a raspberry pi 3.  I did not use an image from Floob.
After seeing this post, I re-installed AM, along with method 2 for the ffmpeg.

In emulationstation I setup my controller, and it's using a minipac from Ultimarc (keyboard encoder.)
The minipac is set to default mame inputs, so insert coin/select is 5, and start is 1.
Leaving a game consists of pressing select+start.
In attract mode, I have the "start" button assigned as "accept".

When I exit games I seem to get some kind of ghosted, almost 'cached' button presses.
Since I exit with select+start, I frequently, immediately re-enter games after leaving them, like I just pressed "accept" again.
I also see this happen with other button presses, not limited or specific to any, but I see their action mirrored in AM after leaving a game.

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Game restarts when pressing ESC to exit
« Reply #8 on: December 30, 2016, 03:45:27 PM »
I'm running attract-mode v2.2.0

I experience this issue but in a slightly different way (I think it's the same...)

I'm running AM on a RetroPie 4.1 install on a raspberry pi 3.  I did not use an image from Floob.
After seeing this post, I re-installed AM, along with method 2 for the ffmpeg.

In emulationstation I setup my controller, and it's using a minipac from Ultimarc (keyboard encoder.)
The minipac is set to default mame inputs, so insert coin/select is 5, and start is 1.
Leaving a game consists of pressing select+start.
In attract mode, I have the "start" button assigned as "accept".

When I exit games I seem to get some kind of ghosted, almost 'cached' button presses.
Since I exit with select+start, I frequently, immediately re-enter games after leaving them, like I just pressed "accept" again.
I also see this happen with other button presses, not limited or specific to any, but I see their action mirrored in AM after leaving a game.

In the attractmode controls do you have the same keys setup for different things. In other words are you using the same key press for different functions? You can also try not using  the "start" key to "accept/select" the game. Use a different button.
« Last Edit: December 30, 2016, 03:50:23 PM by progets »

RandoCalrisian

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Game restarts when pressing ESC to exit
« Reply #9 on: December 30, 2016, 08:51:40 PM »
I'm running attract-mode v2.2.0

I experience this issue but in a slightly different way (I think it's the same...)

I'm running AM on a RetroPie 4.1 install on a raspberry pi 3.  I did not use an image from Floob.
After seeing this post, I re-installed AM, along with method 2 for the ffmpeg.

In emulationstation I setup my controller, and it's using a minipac from Ultimarc (keyboard encoder.)
The minipac is set to default mame inputs, so insert coin/select is 5, and start is 1.
Leaving a game consists of pressing select+start.
In attract mode, I have the "start" button assigned as "accept".

When I exit games I seem to get some kind of ghosted, almost 'cached' button presses.
Since I exit with select+start, I frequently, immediately re-enter games after leaving them, like I just pressed "accept" again.
I also see this happen with other button presses, not limited or specific to any, but I see their action mirrored in AM after leaving a game.

In the attractmode controls do you have the same keys setup for different things. In other words are you using the same key press for different functions? You can also try not using  the "start" key to "accept/select" the game. Use a different button.

I've unest "accept" in AM from the button I use in retroarch to exit, and odd "cached" or "ghosted" inputs on exit keep occuring in AM.  To be specific, in retroarch, start+select is "exit", but in AM, 'accept' is no longer bound to "start" at all.  When I exit games in AM, I'm still getting weird behavior like, flipping left or right between displays, or entering the AM config menu (tab) - this as a result of using tab in mame to set dip switch settings, and so forth.  Based on what was stated previously as a bug with keyboards and or keyboard encoders, I'd imagine this bug has not been resolved.

So, as you suggested, I've used a different button, and my problems are still occuring.

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Game restarts when pressing ESC to exit
« Reply #10 on: December 30, 2016, 09:39:57 PM »
By default AttractMode has keyboard keys setup for some of the controls. You said you are using a minipac that is also using keyboard keys. Are you sure that you don't have any keyboard keys duplicated in the AttractMode controls? Do you have the same issue if you run the games from EmulationStation? If you are using the "runcommand" in AttractMode, try turning it off and see if the problem still happens.

RandoCalrisian

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Game restarts when pressing ESC to exit
« Reply #11 on: December 31, 2016, 08:04:02 AM »
By default AttractMode has keyboard keys setup for some of the controls. You said you are using a minipac that is also using keyboard keys. Are you sure that you don't have any keyboard keys duplicated in the AttractMode controls? Do you have the same issue if you run the games from EmulationStation? If you are using the "runcommand" in AttractMode, try turning it off and see if the problem still happens.

Yes, some keys are mirrored.  The only ones that are are movement keys, like up,down, left, right, the accept key is the same in AM as it is start in the emulator.  I've removed specific keys from use on the controller for the client like tab, and esc, but yes, those are the same in the emulator (mame menu, and cancel) as in AM like the config menu and cancel.  I'm not sure why this should matter.  What I'm experiencing is some kind of buggy, latent, cached key inputs as I leave games.  I shouldn't have to set separate keys for every single thing in the front end as I do the emulator.  Shouldn't someone be able to press up and down and go through the list of games, but also be able to press up and down in the game and have it make the character go up and down?

If it were windows, I suppose I could get around this bug by having custom scripts that launch separate WinIPAC configs for use in game, and AM front end use, but what a pain in the ass?

No, I do not experience these latent button presses on exit in ES.  ES functions just as designed with no problems, but it simply doesn't have a vertical/cocktail/portrait orientation without problem.  My client has a cocktail cabinet and I need this functionality.  I've tried rotating the monitor in the /boot/config.txt for RetroPie, but the rotation DESTORYS performance due to how the screen is rendered.

Disabling runcommand has seemed to somewhat mitigate the issue of ghosted keys, but not entirely eliminate it.

FB911

  • Full Member
  • ***
  • Posts: 30
    • View Profile
Re: Game restarts when pressing ESC to exit
« Reply #12 on: December 31, 2016, 10:53:54 PM »
I upgraded following the provided instructions (i did receive a few errors but i think i got through ok, i'm pretty new to Linux) however, the version is still AM 0.5 August 2016.

Any thoughts?

Thx

That's just some text that Floob put in his image. Of course it won't magically change. Do you still have the same issue?

Use "attract -v" to see the version.


AM version 2.2 (all good)

After running a few tests, it seems the problem has been solved. There is now a (few seconds) delay when I start a game in AM but i can live with that.

Thank you all for your help and happy New Year!!!

RandoCalrisian

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Game restarts when pressing ESC to exit
« Reply #13 on: January 01, 2017, 12:38:17 PM »
I'm definitely still getting the ghosted key on game exit issue and my version is 2.2, but I'm a linux noob and perhaps I did something wrong.

I'm going to try a fresh image of retropie 4.1 and install AM from source again.

I'll report back with findings.

raygun

  • Administrator
  • Sr. Member
  • *****
  • Posts: 393
    • View Profile
Re: Game restarts when pressing ESC to exit
« Reply #14 on: January 01, 2017, 02:31:51 PM »
hey there, this issue should be fixed for good now in the latest version of 'sfml-pi'.  So if you are experiencing this please try updating to the latest dev version of sfml-pi and attractmode.

cheers