Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Can MAME respond to Windows quit command?  (Read 1916 times)

0 Members and 1 Guest are viewing this topic.

rhd

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • Last login:December 22, 2002, 09:42:53 am
  • Nothing is idiot proof
    • rhd
Can MAME respond to Windows quit command?
« 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

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 14, 2025, 12:38:01 am
  • The Bears Still Suck!
Re:Can MAME respond to Windows quit command?
« Reply #1 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.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:July 13, 2025, 11:38:27 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Can MAME respond to Windows quit command?
« Reply #2 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??  

rhd

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • Last login:December 22, 2002, 09:42:53 am
  • Nothing is idiot proof
    • rhd
Re:Can MAME respond to Windows quit command?
« Reply #3 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

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 14, 2025, 12:38:01 am
  • The Bears Still Suck!
Re:Can MAME respond to Windows quit command?
« Reply #4 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?

rhd

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • Last login:December 22, 2002, 09:42:53 am
  • Nothing is idiot proof
    • rhd
Re:Can MAME respond to Windows quit command?
« Reply #5 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

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 14, 2025, 12:38:01 am
  • The Bears Still Suck!
Re:Can MAME respond to Windows quit command?
« Reply #6 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.

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re:Can MAME respond to Windows quit command?
« Reply #7 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.
Robin
Knowledge is Power