Specify wait length for Exit function

"Darren Thompson" <dthomp23-odAbcf0Mc9JJm/[email protected]>
Newsgroups gmane.comp.games.mame.advancemame.user
Message-ID <[email protected]>
I submitted this as a feature request:

It would be nice to be able to specify an amount of time
(seconds) you must hold down the exit button to
actually exit a game. I realize there is the misc_safequit
but I would prefer not to deal with a confirmation step
to prevent accidental exits.

However, I believe I have come up with a viable solution of my own:

In advmame.rc I have set:

misc_safequit yes

and I have this script:

script_emulation loop{wait(event(ui_cancel));
repeat(100){if(event(ui_cancel)){delay(10);}} if(event(ui_cancel)){
simulate_event(ui_down,100); } simulate_event(ui_select,100);  delay(50); }

and in the source file in glue.c I changed the menu from:

Continue
Exit

to:

Release Button to Continue
Hold Button to Exit

Basically I'm just using safequit but if the cancel key is held down for a
second the script inputs down and select otherwise it just inputs select.
So far it works like a charm.  Just thought I'd share the info in case
anyone else is interested.




-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
___
Unsubscribe at https://lists.sourceforge.net/lists/listinfo/advancemame-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.