Feature Request: Exiting game goes to Scummvm menu

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Blakes7
Posts: 39
Joined: Sun Nov 03, 2019 9:44 am

Feature Request: Exiting game goes to Scummvm menu

Post by Blakes7 »

I would like quiting a game to take me back to the scummvm menu rather than exiting scummvm altogether.

Is it possible to add a tickbox to options for whether or not users want exiting a game to go back to the scummvm menu

I realise ctrl-f5 has a option to go back to the scummvm menu but I dislike having to bring it up all the time and would like the simplicity/convenience to simply exit the game to achieve this.
User avatar
Praetorian
ScummVM Developer
Posts: 797
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: Feature Request: Exiting game goes to Scummvm menu

Post by Praetorian »

Blakes7 wrote: Mon Nov 09, 2020 8:17 am I would like quiting a game to take me back to the scummvm menu rather than exiting scummvm altogether.

Is it possible to add a tickbox to options for whether or not users want exiting a game to go back to the scummvm menu

I realise ctrl-f5 has a option to go back to the scummvm menu but I dislike having to bring it up all the time and would like the simplicity/convenience to simply exit the game to achieve this.
There was a recent short internal discussion on Discord (Oct 30, in one of the team channels) about the quit behaviour from a game engine. It was mostly to clarify how this works currently and why, as well as how it differentiates amongst backend platforms.

Anyway, based on that discussion, I think it's definitely doable to have this as a user configurable option. There seems to be a somewhat similar behaviour on iOS platforms, because the OS does not allow apps to "exit" explicitly -- so the "Quit" action of the game engines is remapped to return to the ScummVM launcher window, but this also removes the Quit button from the ScummVM launcher itself so it should be further tweaked for this specific feature request, as we do want the Quit button there in this case.

Probably best to issue this as an "enhancement" ticket on our bug tracker, if there isn't already one, so that we can track it.
I see there's an old similar one (https://bugs.scummvm.org/ticket/7417) but that was closed as outdated, and that one is probably addressed by the existence of the "Return to Launcher" option in the ScummVM GMM menu.
Blakes7
Posts: 39
Joined: Sun Nov 03, 2019 9:44 am

Re: Feature Request: Exiting game goes to Scummvm menu

Post by Blakes7 »

I have posted an enhancement ticket here:

https://bugs.scummvm.org/ticket/11951#ticket
EstelRandir
Posts: 55
Joined: Thu Mar 16, 2017 6:02 pm

Re: Feature Request: Exiting game goes to Scummvm menu

Post by EstelRandir »

Yes, please add this feature. This is one of my biggest irritations with an otherwise great program. When testing different sound fonts, graphic options, etc for a particular game, having to restart Scummvm 5 or 6 times gets old very fast.
User avatar
Praetorian
ScummVM Developer
Posts: 797
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: Feature Request: Exiting game goes to Scummvm menu

Post by Praetorian »

EstelRandir wrote: Sat Nov 14, 2020 7:58 am Yes, please add this feature. This is one of my biggest irritations with an otherwise great program. When testing different sound fonts, graphic options, etc for a particular game, having to restart Scummvm 5 or 6 times gets old very fast.
The TS (Blakes7) already mentioned this, but you don't actually *have to* restart ScummVM.
You can use the GMM ScummVM menu (usually available via a shortcut like Ctrl+F5, although it may differ by platform and can be adjusted via the key mapper in the recent versions). The GMM has an option to "Return to launcher".

As I said, I do agree that we can implement an global option for the user to choose if the game should exit to launcher or to "desktop" (as requested), but I am noting that there already is a way to return to launcher from the game.
User avatar
rootfather
ScummVM Lead
Posts: 181
Joined: Tue Mar 31, 2015 11:59 am
Location: Germany
Contact:

Re: Feature Request: Exiting game goes to Scummvm menu

Post by rootfather »

I like the idea of an additional option for enabling "Return to Launcher" as a default very much - I'll work on it and hopefully have an implementation very soon. :D

First try: https://github.com/scummvm/scummvm/pull/2621
Blakes7
Posts: 39
Joined: Sun Nov 03, 2019 9:44 am

Re: Feature Request: Exiting game goes to Scummvm menu

Post by Blakes7 »

I've tried this feature out in the latest daily build. Thanks for implementing btw! It seems to work for agi sierra but does not for sci sierra games presently.
User avatar
rootfather
ScummVM Lead
Posts: 181
Joined: Tue Mar 31, 2015 11:59 am
Location: Germany
Contact:

Re: Feature Request: Exiting game goes to Scummvm menu

Post by rootfather »

Blakes7 wrote: Fri Dec 04, 2020 9:25 pm I've tried this feature out in the latest daily build. Thanks for implementing btw! It seems to work for agi sierra but does not for sci sierra games presently.
Can you name an example for a non-working game, so I can test this further? Please also try the very latest snapshots since criezy made some improvements to this feature just yesterday.
Blakes7
Posts: 39
Joined: Sun Nov 03, 2019 9:44 am

Re: Feature Request: Exiting game goes to Scummvm menu

Post by Blakes7 »

rootfather wrote: Sat Dec 05, 2020 10:51 am
Blakes7 wrote: Fri Dec 04, 2020 9:25 pm I've tried this feature out in the latest daily build. Thanks for implementing btw! It seems to work for agi sierra but does not for sci sierra games presently.
Can you name an example for a non-working game, so I can test this further? Please also try the very latest snapshots since criezy made some improvements to this feature just yesterday.
Quest for Glory IV cd/windows
Space Quest III dos

Edit: Forgot to mention I am using Dec 7th snapshot
User avatar
Raziel
ScummVM Porter
Posts: 1522
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet

Re: Feature Request: Exiting game goes to Scummvm menu

Post by Raziel »

I can confirm SQ III.

On quitting with the in-game menu, it goes straight back to the system, skipping (and closing) ScummVM completely.

And one more oddity.
- Press ESC to bring up the in-game menu
- While the menu is up, press CTRL+F5 to bring up RTL
- Now click on Return to launcher
Nothing happens.

You can repeat that as many times as you want.

Only if you close the in-game menu again it will throw you back to the launcher...
User avatar
rootfather
ScummVM Lead
Posts: 181
Joined: Tue Mar 31, 2015 11:59 am
Location: Germany
Contact:

Re: Feature Request: Exiting game goes to Scummvm menu

Post by rootfather »

Yikes, thanks for reporting this. So is it correct to assume that not all engines use the same "exit" code? This could open a huge can of worms. :/
User avatar
Raziel
ScummVM Porter
Posts: 1522
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet

Re: Feature Request: Exiting game goes to Scummvm menu

Post by Raziel »

I don't know nothing about the sci engine, but i'll shoot one in the dark anyway :-)

Due to the in-game menu somehow blocking everything from ScummVM (at least for the time it's open) might there be the slim chance that RTL, respectively QTL (Quit to Launcher - yes, you may use the term ;-) ), is overridden and don't get the chance to kick in?
Even if there is a QTL waiting in queue (which i doubt, since if the in-game menu is blocking everything, then a QTL will never get queued anyway) it will only get performed AFTER the in-game menu made it's move, which, in this case, is to close the game, hence close/quit ScummVM and after ScummVM was shut down, nothing will get performed anymore obviously.
User avatar
Raziel
ScummVM Porter
Posts: 1522
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet

Re: Feature Request: Exiting game goes to Scummvm menu

Post by Raziel »

rootfather wrote: Wed Dec 09, 2020 5:40 pm Yikes, thanks for reporting this. So is it correct to assume that not all engines use the same "exit" code? This could open a huge can of worms. :/
Hmm, something seems off, though.

I just tested a few SCI games and they ALL quit to system

I have "always return to launcher" and "confirm on exit" checked
User avatar
Raziel
ScummVM Porter
Posts: 1522
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet

Re: Feature Request: Exiting game goes to Scummvm menu

Post by Raziel »

Oh...and i don't know if this is related or just my build, but all of the LucasArts games crash with an assertion now, when using ALT+x

Can anyone confirm?
assertion "_str && idx >= 0 && idx <(int)_size" failed: ".common/base-str.h", line 176
and here's part of a crashlog (before my system goes down)

That's Loom (the first two) and Secret of Monkey Island (the second two)
Dump of context at 0xDF7E87C0
Trap type: DSI exception
Machine State (raw): 0x1000000000009030
Machine State (verbose): [Hyper] [ExtInt on] [Super] [IAT on] [DAT on]
Instruction pointer: 0x7EC4EC34
Crashed process: SDL thread SDLTimer (0x4cbca2a0) (0x4E75F690)
DSI verbose error description: Access not found in hash or BAT (page fault)
Access was a load operation
0: 7EC4EC34 4DC71ED0 FF000000 80000000 4E75F690 4E75F690 02A8824C 02A8826C
8: EDB2FD40 000000FF 00000080 02019254 39935955 FF000000 4FFB6DA4 53B35CC0
16: 02B30000 DF7F8610 02B30000 00000000 4FFB6DA0 00000000 0000E0F1 4E75F690
24: 80009000 80001000 4E79D520 4DC71ED8 0000000A 50B571B8 50B04AB8 4E79D518
CR: 59935953 XER: C0000000 CTR: 0201A3B8 LR: 7EC4EC34
DSISR: 40000000 DAR: 4E79D518
HID0: 0x8000000000000000 HID1: 0x000000005CE993B1
HID4: 0x4400240000080180 HID5: 0x0000006600000080

Disassembly of crash site:
7EC4EC24: 7F04C378 mr r4,r24
7E

Dump of context at 0xDFFF43E0
Trap type: DSI exception
Machine State (raw): 0x1000000000003032
Machine State (verbose): [Hyper] [Super] [FPU on] [IAT on] [DAT on] [Recoverable]
Instruction pointer: 0x7FB33D5C
Crashed task: idle.task (0x6FFAB360)
DSI verbose error description: Access not found in hash or BAT (page fault)
Access was a load operation
0: 00007660 0296E790 7F8DDFAF 4CBAB008 00001D98 00000000 6226B000 6FBC774C
8: 4CBAB008 00000000 00001D98 4CBB2668 00000268 FBEFEA6F CFA6DBBE FBFF6DE6
16: 6FBC7688 0296E7F8 6FBC774C 6FBC7744 00000800 00000800 00000001 00000000
24: 00000000 00000268 00000000 00000000 00000000 00000000 00000000 00000000
CR: 33EBB999 XER: C000007F CTR: 7FB33CB8 LR: 7FB32C78
DSISR: 40000000 DAR: 4CBB2666

FP0 : FFF8000082004000 0101010101010101 0101010101010101 0101010101010101
FP4 : 2E01010101010101 0101010101010101 4040000000000000 4040000000000000
FP8 : 0000000000000000 4050400000000000 4050400000000000 4330000080000021
FP12: 4330000080000181 41E0000000000000 0000000000000000 0000000000000000
FP16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FP20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FP24: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FP28: 0000000000000000 0000000000000000 0000000000000000 8000000000000000
FPSCR: 82004000
HID0: 0x8000000000000000 HID1: 0x000000005CE993B1
HID4: 0x4400240000080180 HID5: 0x0000006600000080

Disassembly of crash site:
7FB33D4C: 80B00004 lwz r5,4(r16)
7FB33D50: 409C0114 bge- cr7,0x7FB33E64
7FB33D54: 2

Dump of context at 0xDF7B27C0
Trap type: DSI exception
Machine State (raw): 0x1000000000009030
Machine State (verbose): [Hyper] [ExtInt on] [Super] [IAT on] [DAT on]
Instruction pointer: 0x7EF0BC34
Crashed process: SDL thread SDLTimer (0x4f1e42a0) (0x4EF04690)
DSI verbose error description: Access not found in hash or BAT (page fault)
Access was a load operation
0: 7EF0BC34 4DE39ED0 746F6E20 80000000 4EF04690 4EF04690 02A8824C 02A8826C
8: EDB2FD40 000000FF 00000080 02019254 28824844 45766572 4F408DA4 53AFACC0
16: 02B30000 DF7C3610 02B30000 00000000 4F408DA0 00000000 0000C33A 4EF04690
24: 80009000 80001000 5098C928 4DE39ED8 0000000A 5D66A1B8 5D617AB8 5098C920
CR: 48824842 XER: 40000063 CTR: 0201A3B8 LR: 7EF0BC34
DSISR: 40000000 DAR: 5098C920
HID0: 0x8000000000000000 HID1: 0x000000005CE993B1
HID4: 0x4400240000080180 HID5: 0x0000006600000080

Disassembly of crash site:
7EF0BC24: 7F04C378 mr r4,r24
7EF0BC28: 81230128 lwz r9,296(r3)
7EF0BC2C: 7D2903A6 mtctr r9
7EF0BC30: 4

Dump of context at 0xDFFF43E0
Trap type: DSI exception
Machine State (raw): 0x1000000000003032
Machine State (verbose): [Hyper] [Super] [FPU on] [IAT on] [DAT on] [Recoverable]
Instruction pointer: 0x7FB33D5C
Crashed task: idle.task (0x6FFAB360)
DSI verbose error description: Access not found in hash or BAT (page fault)
Access was a load operation
0: 000069E8 0296E790 7FADDFAF 4F1C5008 00001A7A 00000000 621F5000 6FBC774C
8: 4F1C5008 00000000 00001A7A 4F1CB9F0 00000372 FBEFEA6F CFA6DBBE FBFF6DE6
16: 6FBC7688 0296E7F8 6FBC774C 6FBC7744 00000800 00000800 00000001 00000000
24: 00000000 00000372 00000000 00000000 00000000 00000000 00000000 00000000
CR: 33EBB999 XER: C000007F CTR: 7FB33CB8 LR: 7FB32C78
DSISR: 40000000 DAR: 4F1CB9EE

FP0 : FFF8000082004000 00CFCFCF00CFCFCF FFCFCFCFFFCFCFCF 00CFCFCF00CFCFCF
FP4 : 00CFCFCF00CFCFCF 00CFCFCF00CFCFCF 4062400000000000 405A000000000000
FP8 : 4045000000000000 405A000000000000 40A3EC0000000000 43300000800000A4
FP12: 4330000080000A00 41E0000000000000 0000000000000000 0000000000000000
FP16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FP20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FP24: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FP28: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPSCR: 82004000
HID0: 0x8000000000000000 HID1: 0x000000005CE993B1
HID4: 0x4400240000080180 HID5: 0x0000006600000080

Disassembly of crash site:
7FB33D4C: 80B00004 lwz r5,4(r16)
7FB33D50: 409C0114 bge- cr7,0x7FB33E64
7FB33D54: 2
User avatar
criezy
ScummVM Developer
Posts: 950
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Re: Feature Request: Exiting game goes to Scummvm menu

Post by criezy »

Raziel wrote: Wed Dec 09, 2020 7:45 pm I just tested a few SCI games and they ALL quit to system

I have "always return to launcher" and "confirm on exit" checked
This should be fixed now. You will now get the ScummVM exit confirm, but, it should return to the launcher now.

Raziel wrote: Wed Dec 09, 2020 7:45 pm Oh...and i don't know if this is related or just my build, but all of the LucasArts games crash with an assertion now, when using ALT+x
I tested DOTT, The Dig, and The Secret of Monkey Island and ALT+x works properly for me on all of them.
Post Reply