-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
Auto-exit when using instant-launch #1269
Conversation
This avoid triggering an early-exit.
This makes it easier to read the if/else actions when they're not hidden behind the condition.
Fixes a newly-flagged Codacity security warning: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126).
6af1da8
to
c14a555
Compare
c14a555
to
5db7cf3
Compare
5db7cf3
to
76acdbf
Compare
76acdbf
to
0f1d510
Compare
Thank you @Burrito78 for this excellent suggestion! |
Copying from Discord so it doesn't get buried: Hi @kcgen! This PR works as expected, very nice! But i found one side-effect: The "cool down" timer is always active, not only when using "instant launch". So when i start Staging and directly enter exit then the above line "Preventing an early exit call..." is also triggered and i have to exit a second time. Is this expected and wanted behavior? One other possible terrible idea: Maybe skip the whole autoexec section while running using instant launch to prevent mount conflicts in the first place and refer people to better use game specific config files (if needed at all) when using instant launch? |
Anytime dosbox 'instant-exits' is typically a bad thing, so I had settled on it being a general feature ... but it's indeed a changes from baseline behavior. Perhaps there are scripts or wrappers that won't deal well with this. I'll adjust it to only take place when instant-launching. Thanks for the help here @Burrito78 ! |
If
startup_verbosity
isauto
(orlow
orquiet
) and an executable's passed on the command-line, then automatically "exit" when that program finishes up. This is equivalent to manually adding the-exit
command-line flag.This PR also updates the
README
to reflect this logic.This PR also adds a 1.5 second "exit cool down period" as some protection against scenarios where an executable immediately fails and dosbox quits back to the host. In these cases, the the user sees a brief flash - and then everything is gone, which is a bad user experience leaving them with nothing to help them diagnose the issue.
This cool down should catch most of those scenarios. Of course, using a higher verbosity (medium or high) will fully prevent auto-exit, likewise simply launch dosbox without instant-launch will also avoid the auto-exit.