The NEW Build Your Own Arcade Controls

Main => Software Forum => Topic started by: rhd on March 03, 2003, 10:52:31 am

Title: Can MAME respond to Windows quit command?
Post by: rhd on March 03, 2003, 10:52:31 am
I've got my new cab all set up with a soft power down button. When you press it Windows sends messages to all the live processes so they can shut down gracefully. I'm using MameWah as my FE and it shuts down fine but if a MAME game is running then I get the application not responding dialog. It there a config setting that tells MAME to respond to a quit message from the OS?

Thanks,
Rob
Title: Re:Can MAME respond to Windows quit command?
Post by: SirPoonga on March 03, 2003, 11:49:30 am
Not that I know of.  You could try and have it send teh mame quite command too.
Title: Re:Can MAME respond to Windows quit command?
Post by: Howard_Casto on March 03, 2003, 05:00:50 pm
If your talking about what I think your talking about then the answer is yes.... My wrappers use the "quit" command in most cases to safely end an app.  The problem is you need a "sleep" command, not a quit command.  Unfortunately mame doesn't respond to quit, if that makes any sense.  
Btw it's not an option in minwah and it would be hard to put in any app as windows closes all the "normal" ones when you press the power key.  

An alternate suggestion... why don't you just exit mame before you put your computer in sleep mode??  
Title: Re:Can MAME respond to Windows quit command?
Post by: rhd on March 03, 2003, 05:32:56 pm
I'm probably not describing it very well. But I'm not putting it into sleep mode but when I hit the power button it doesn't power down straight away. First Windows closes all its apps, then Windows shuts down, finally the computer powers down. It behaves just like you chose Shut-Down from the start menu. When I do that with MameWah running it shuts down just fine. But when Mamewah is running Mame then I get a dialog saying the application not responding....it also has a button labeled "End now". I'm guessing that either Mame does not shut down properly in response to a Windows message to quit, or somehow MameWah is intercepting the message and not passing it along to Mame. Tonight I'll try hitting power with just mame running without Mamewah to see if that narrows things down.

Sorry to be so confusing...its been a couple of years since I've done any programming and the Windows messaging model has gotten a little blurry.

Thanks,
Rob
Title: Re:Can MAME respond to Windows quit command?
Post by: SirPoonga on March 03, 2003, 05:39:35 pm
Yep, that's exactly what we though.  Again, why not just shut mame down?

Not runing XP either, huh?
Title: Re:Can MAME respond to Windows quit command?
Post by: rhd on March 03, 2003, 06:19:47 pm
I am running XP.

My problem shutting down mame before turning off the cab is that my son's 12 year old friends. They can't seem to remember to shut down the game before turning off the power. Oh well, maybe I can figure out something using Howard's wrappers. Thanks everybody for the help tho.

Thanks,
Rob
Title: Re:Can MAME respond to Windows quit command?
Post by: SirPoonga on March 03, 2003, 06:36:22 pm
doesn't the end program dialog automatically go away after like 15 seconds?
At least my XP does that.
Title: Re:Can MAME respond to Windows quit command?
Post by: u_rebelscum on March 03, 2003, 09:38:36 pm
I've got my new cab all set up with a soft power down button. When you press it Windows sends messages to all the live processes so they can shut down gracefully. I'm using MameWah as my FE and it shuts down fine but if a MAME game is running then I get the application not responding dialog. It there a config setting that tells MAME to respond to a quit message from the OS?

Thanks,
Rob

Mame is not responding because it uses directX to read the keyboard (instead of normal windows messages), and intentionally does not look for the quit message.

One thing that probably won't work, but try it anyway.  ;)  In mame's "input (general)", map the key combo ALT and F4 to "UI_cancel" (usually ESC); or you could use ctrlr/ini instead of in-game UI.

If that doesn't work, you'll need to either edit mame, or use Howard's FE wrapper and have you computer sleep instead.