-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
Make startup verbosity configurable #477
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the change, and it has a very high "user-visible improvement to lines of code" ratio ;)
I left some design-oriented comments to various parts of the implementation.
During testing I found two small problems:
- "Silent" does not work so well - in smaller games it causes super fast flash of black screen (e.g. in "PAKU PAKU 1.6", in others the delay is uncomfortably longer (Wolfenstein 3D when games starts with default 3000 cycles). Also, despite suppression of output, some text still slips in: empty lines injected by who-knows-what part of dosbox implementation, text printed by DOS4/GW, DOS32/A, or the game itself…
- Running
dosbox path/to/dir
(which triggers mounting directory as C) should trigger instant launch as well.
About (1) - I think we could leave this option in as it is, without redesing and improve it in future iterations / PRs.
About (2) - this should be a rather easy fix, I think?
b8ea24b
to
6d1fd36
Compare
Changes are in.
I like this step-wise approach; looking forward to more refinement!
It was just a couple lines, and working very nicely. Great suggestion @dreamer! With this directory addition, With this mental "startup weight" lifted, staging feels like a general tool for Linux and CLI users, and I now see myself using DOS CLI tools or MOD / MP3 players naturally into my daily workflow. This dovetails very nicely with LFN support! |
6d1fd36
to
ac0b3e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice :) And I'm glad you mentioned a new feature in README.
I left some additional comments, but at this point it's only polishing the code.
I performed some tests and in all cases I tried, the feature behaved according to user expectations :)
[dosbox] startup_verbosity = high # medium, low, quiet, auto Also adds a GetStartupVerbosity() getter to the control class, so we can query this from various places. This commit is dormant though - no code uses it.
Verbosity::Quiet suppresses stdout prior launching an executable.
ac0b3e4
to
35b66dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great feature; I will merge it in momentarily :)
@@ -444,6 445,18 @@ void DOSBOX_Init(void) { | |||
secprop->AddInitFunction(&TIMER_Init);//done | |||
secprop->AddInitFunction(&CMOS_Init);//done | |||
|
|||
const char *verbosity_choices[] = {"high", "medium", "low", | |||
"quiet", "auto", 0}; | |||
Pstring = secprop->Add_string("startup_verbosity", only_at_start, "high"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: Pstring
-> pstring
(but it's minor I will merge it in anyway).
And it's in; thanks @kcgen :) |
I have proposition for one extra mode. |
@gumispl |
@dreamer It skips DosBox Splash entirely - I want to show it and then hide following screens. |
Maybe we call it:
|
@gumispl , PR inbound for this: #912
Feel free to give it a go (or build using the Much thanks! |
This is a rework of the prior instant launch PR, which was somewhat narrow in its focus.
This PR transforms that into the general concept of Startup Verbosity.
Graphically, this corresponds to:
'high' startup verbosity is default
This guarantees the existing verbose behavior is retained for new users, while allowing experienced users to dial back the verbosity.
'auto' startup verbosity is available
auto is equivalent to "high" if dosbox was not passed an executable, and "low" if it was.
What is pre-executable stdout?
This is non-executable stdout constructed by dosbox prior to launching an executable or batch-file.
For example, when you give dosbox an executable to launch, ie:
dosbox duke1/dn1.exe
, it still generates the following stdout, which requires setting a graphical text mode window:If verbosity is set to quiet, then this output is suppressed prior to the first executable.
How are batch files handled with 'silent' startup verbosity?
Any output generated in a batch file will be shown.
As described above, dosbox's stdout is suppressed prior to the first executable statement, after which stdout is re-enabled. Batch files are executable, so it's up to the batch file if it generates output (or not).
To make batch execution really quiet, ensure the first line in the batch file is:
@echo off
, which instructs DOS not to print each line in the file.Inside the batch file, you can similarly hide a program's text output by redirecting its output, for example:
noisy\game.exe > NUL
.dosbox.conf