Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMake startup verbosity configurable #477
Conversation
|
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:
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? |
|
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! |
|
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.
|
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"); | |||
This comment has been minimized.
This comment has been minimized.
|
And it's in; thanks @kcgen :) |
kcgen commentedJul 2, 2020
•
edited
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