mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-10-14 02:17:36 +08:00
Debugger: When initializing the debugger in Windows, resize the terminal to a smaller maximum. Windows 10 (or pdcurses?) likes to pick a default that cannot fit on the screen without the user having to manually move it to the top.. which the DWM then auto maximizes.
This commit is contained in:
@@ -542,6 +542,21 @@ void DBGUI_StartUp(void) {
|
||||
LOG(LOG_MISC,LOG_DEBUG)("DEBUG GUI startup");
|
||||
/* Start the main window */
|
||||
dbg.win_main=initscr();
|
||||
|
||||
#ifdef WIN32
|
||||
/* Tell Windows 10 we DONT want a thin tall console window that fills the screen top to bottom.
|
||||
It's a nuisance especially when the user attempts to move the windwo up to the top to see
|
||||
the status, only for Windows to auto-maximize. 30 lines is enough, thanks. */
|
||||
{
|
||||
if (dbg.win_main) {
|
||||
int win_main_maxy, win_main_maxx; getmaxyx(dbg.win_main, win_main_maxy, win_main_maxx);
|
||||
if (win_main_maxx > 100) win_main_maxy = 100;
|
||||
if (win_main_maxy > 40) win_main_maxy = 40;
|
||||
resize_term(win_main_maxy, win_main_maxx);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
cbreak(); /* take input chars one at a time, no wait for \n */
|
||||
noecho(); /* don't echo input */
|
||||
scrollok(stdscr,false);
|
||||
|
Reference in New Issue
Block a user