Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sigterm is not well supported by MAME 2003-Plus #1623

Closed
schmurtzm opened this issue Sep 18, 2023 · 7 comments
Closed

Sigterm is not well supported by MAME 2003-Plus #1623

schmurtzm opened this issue Sep 18, 2023 · 7 comments

Comments

@schmurtzm
Copy link

schmurtzm commented Sep 18, 2023

Problem :
In many cases when running mame2003-plus, SIGTERM commands sent to Retroarch doesn't work properly : Retroarch is not exited. This is a different behavior from all the other cores which allow a proper exit.

It could be nice that mame2003-plus supports properly sigterm command too.
This is really useful to support this because on many devices as it allows to close Retroarch and to triggers an auto save state.

For example on the Miyoo Mini (little handheld linux device), pressing the "menu" button triggers an exit of Retroarch to the OS main menu. As the sigterm doesn't work, the only way to exit Retroarch when running Mame 2003 is to exit Retroarch from the menu instead just pressing the button provided for this purpose. This exit method works with all cores except with MAME 2003-Plus.

To reproduce :
Start Retroarch with mame2003-plus with 1942, send a pkill retroarch command. Normally Retroarch should exit and make a save state (if the "Auto Save State" option is enabled).

Example of result with After Burner :

/ # pkill retroarch
/ # SDL_PrivateQuit          -> nothing happens, the game still runnning after that.

Other observations :

sigterm doesn't work with:

  • 1942,1943
  • After Burner
  • arknoid2
  • shinobi
  • superman
  • xmen

But it works with:

  • Act-Fancer: Cybernetick Hyper Weapon
  • aerofgt
  • batman
  • Elevator Action Returns
  • tmnt

So it seems that the behavior of sigterm is different depending the game (different behaviors from different game drivers ?)

@mahoneyt944
Copy link
Collaborator

I typically use hotkeys for these functions.
settings->input->hotkeys
Screenshot_20230918-163151

@schmurtzm
Copy link
Author

schmurtzm commented Sep 21, 2023

Hi, thank you for the quick answer !

It can't be a solution for us (Onion OS) because our "menu" button is our hotkey and also the way to quit RA (on handhelds we can't sacrifice a button to only one exit function) . And we have some special features (triggered by an external application named "keymon") like pressing a long time the menu button will quit RA and got to rom list and pressing a short time will quit RA and display an UI with the list of last save states made.

However it's interesting to see that by using hotkey feature RA is able to quit properly any Mame2003+ game.

It make me think that may be it's more the Retroarch SIGTERM implementation which is not good and should copy the behavior of this "quit" hotkey.
Is there a way to trigger this hotkey exit function externally from Retroarch ?

@mahoneyt944
Copy link
Collaborator

Not that I know of, You should move this issue to the retroarch GitHub page. They maybe able to assist you further.

@mahoneyt944
Copy link
Collaborator

Seems like this should resolve the issue once merged. Safe to close this now?
OnionUI/Onion#1620

@schmurtzm
Copy link
Author

Hi not really, the real problem is still here and doesn't apply only to Onion.
The sigterm implementation of this core is still not working, what we have done in Onion is a workaround: we use RA network commands to quit Retroarch instead of using a sigterm. Which means that it solve the situation for Onion but the problem is still here for everyone who use a sigterm to close RetroArch (which is a normal way to do that).

So as sigterm should be implemented in this core and should work like any other core, this issue should stay opened.

@mahoneyt944
Copy link
Collaborator

mahoneyt944 commented Aug 8, 2024

My understanding is that a sigterm would be handled by the frontend, are there other cores that have integrated a solution for this on the core side? I don't know that a core has access to an RA event.

@mahoneyt944
Copy link
Collaborator

Should be fixed with this libretro/RetroArch#16854

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants