Skip to content

Commit f632ed4

Browse files
Merge pull request joncampbell123#2516 from Wengier/master
Add menu option to restart DOSBox-X with selected config file
2 parents 639be70 + 0268a88 commit f632ed4

16 files changed

+182
-83
lines changed

CHANGELOG

+11-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@
77
4DOS, BIN, DEBUG, DOS, SYSTEM, TEXTUTIL. Most files
88
that previously appeared on the root directory of
99
Z drive are now categorized into directories, with
10-
addition of some files/programs. (Wengier)
10+
addition of some files/programs, such as additional
11+
4DOS files, text utilties in TEXTUTIL directory and
12+
TITLE command to change window title. (Wengier)
13+
- The return value of AL in Int21/AX=0Eh is no longer
14+
fixed. The game Jurassic Park may run after moving
15+
Z drive to a different letter (e.g. E:). (Wengier)
16+
- Added "Restart DOSBox-X with config file..." menu
17+
option to start DOSBox-X with the specified config
18+
file automatically from the menu. (Wengier)
1119
- Added "Refresh rate..." menu option (under "Video")
1220
to set the video refresh rate. (Wengier)
1321
- Added "Enable A20 gate" menu option (under "DOS")
@@ -25,6 +33,8 @@
2533
- Added menu options "Generate NMI interrupt" & "Hook
2634
INT 2Fh calls" ("Help" => "Debugging options") for
2735
more debugging options. (Wengier)
36+
- Fixed issues related to screen dimensions in TTF
37+
output in CGA/EGA modes since 0.83.12. (Wengier)
2838
- Integrated SVN commits (Allofich)
2939
- r4443: Improve detection of Paradise SVGA in some
3040
installers with additional signature.

contrib/linux/com.dosbox_x.DOSBox-X.metainfo.xml.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<category>Emulation</category>
1111
</categories>
1212
<releases>
13-
<release version="@PACKAGE_VERSION@" date="2021-5-7"/>
13+
<release version="@PACKAGE_VERSION@" date="2021-5-9"/>
1414
</releases>
1515
<screenshots>
1616
<screenshot type="default">

contrib/windows/installer/dosbox-x.reference.setup.conf

+2-1
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,8 @@ freesizecap = cap
536536
#DOSBOX-X-ADV:# This can be used to help diagnose whether or not the DOS game is page flipping properly according to vertical retrace if the display on-screen is flickering.
537537
#DOSBOX-X-ADV:# vertical retrace poll debug line: VGA debugging switch. If set, an inverse green dotted line will be drawn on the exact scanline that the CRTC status port (0x3DA) was read.
538538
#DOSBOX-X-ADV:# This can be used to help diagnose whether the DOS game is propertly waiting for vertical retrace.
539-
#DOSBOX-X-ADV:# cgasnow: When machine=cga, determines whether or not to emulate CGA snow in 80x25 text mode
539+
#DOSBOX-X-ADV:# cgasnow: When machine=cga, determines whether or not to emulate CGA snow in 80x25 text mode.
540+
#DOSBOX-X-ADV:# This parameter is also changeable from the builtin CGASNOW command in CGA mode.
540541
#DOSBOX-X-ADV:# vga 3da undefined bits: VGA status port 3BA/3DAh only defines bits 0 and 3. This setting allows you to assign a bit pattern to the undefined bits.
541542
#DOSBOX-X-ADV:# The purpose of this hack is to deal with demos that read and handle port 3DAh in ways that might crash if all are zero.
542543
#DOSBOX-X-ADV:# rom bios 8x8 CGA font: If set, or mainline DOSBox compatible BIOS mapping, a legacy 8x8 CGA font (first 128 characters) is stored at 0xF000:0xFA6E. DOS programs that do not use INT 10h to locate fonts might require that font to be located there.

dosbox-x.reference.full.conf

+2-1
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,8 @@ enable pci bus = true
536536
# This can be used to help diagnose whether or not the DOS game is page flipping properly according to vertical retrace if the display on-screen is flickering.
537537
# vertical retrace poll debug line: VGA debugging switch. If set, an inverse green dotted line will be drawn on the exact scanline that the CRTC status port (0x3DA) was read.
538538
# This can be used to help diagnose whether the DOS game is propertly waiting for vertical retrace.
539-
# cgasnow: When machine=cga, determines whether or not to emulate CGA snow in 80x25 text mode
539+
# cgasnow: When machine=cga, determines whether or not to emulate CGA snow in 80x25 text mode.
540+
# This parameter is also changeable from the builtin CGASNOW command in CGA mode.
540541
# vga 3da undefined bits: VGA status port 3BA/3DAh only defines bits 0 and 3. This setting allows you to assign a bit pattern to the undefined bits.
541542
# The purpose of this hack is to deal with demos that read and handle port 3DAh in ways that might crash if all are zero.
542543
# rom bios 8x8 CGA font: If set, or mainline DOSBox compatible BIOS mapping, a legacy 8x8 CGA font (first 128 characters) is stored at 0xF000:0xFA6E. DOS programs that do not use INT 10h to locate fonts might require that font to be located there.

include/build_timestamp.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/*auto-generated*/
2-
#define UPDATED_STR "May 7, 2021 4:03:25am"
3-
#define GIT_COMMIT_HASH "b13972f"
2+
#define UPDATED_STR "May 9, 2021 1:26:40am"
3+
#define GIT_COMMIT_HASH "b778192"
44
#define COPYRIGHT_END_YEAR "2021"

src/dos/dos.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,11 @@ static Bitu DOS_21Handler(void) {
10081008
break;
10091009
case 0x0e: /* Select Default Drive */
10101010
DOS_SetDefaultDrive(reg_dl);
1011-
reg_al=DOS_DRIVES;
1011+
{
1012+
int drive=maxdrive>=1&&maxdrive<=26?maxdrive:1;
1013+
for (uint16_t i=drive;i<DOS_DRIVES;i++) if (Drives[i]) drive=i+1;
1014+
reg_al=drive;
1015+
}
10121016
break;
10131017
case 0x0f: /* Open File using FCB */
10141018
if(DOS_FCBOpen(SegValue(ds),reg_dx)){

src/dos/dos_programs.cpp

+37-3
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ bool qmount = false;
9090
bool nowarn = false;
9191
extern bool mountfro[26], mountiro[26];
9292

93-
void DOS_EnableDriveMenu(char drv);
93+
void DOS_EnableDriveMenu(char drv), GFX_SetTitle(int32_t cycles, int frameskip, Bits timing, bool paused);
9494
void runBoot(const char *str), runMount(const char *str), runImgmount(const char *str), runRescan(const char *str);
9595

9696
#if defined(OS2)
@@ -177,7 +177,7 @@ void DetachFromBios(imageDisk* image) {
177177
}
178178
}
179179

180-
extern std::string hidefiles;
180+
extern std::string hidefiles, dosbox_title;
181181
extern int swapInDisksSpecificDrive;
182182
extern bool dos_kernel_disabled, clearline;
183183
void MSCDEX_SetCDInterface(int intNr, int forceCD);
@@ -5860,7 +5860,7 @@ void MODE::Run(void) {
58605860
else if (strcasecmp(temp_line.c_str(),"con")==0 || strcasecmp(temp_line.c_str(),"con:")==0) {
58615861
if (IS_PC98_ARCH) return;
58625862
int LINES = 25, COLS = 80;
5863-
LINES=real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS)+1;
5863+
LINES=(IS_EGAVGA_ARCH?real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS):24)+1;
58645864
COLS=real_readw(BIOSMEM_SEG,BIOSMEM_NB_COLS);
58655865
if (cmd->GetCount()<2) {
58665866
WriteOut("Status for device CON:\n----------------------\nColumns=%d\nLines=%d\n\nCode page operation not supported on this device\n", COLS, LINES);
@@ -6456,6 +6456,39 @@ static void TREE_ProgramStart(Program * * make) {
64566456
*make=new TREE;
64576457
}
64586458

6459+
class TITLE : public Program {
6460+
public:
6461+
void Run(void);
6462+
private:
6463+
void PrintUsage() {
6464+
constexpr const char *msg =
6465+
"Sets the window title for the DOSBox-X window.\n\n"
6466+
"TITLE [string]\n\n"
6467+
" string Specifies the title for the DOSBox-X window.\n";
6468+
WriteOut(msg);
6469+
}
6470+
};
6471+
6472+
void TITLE::Run()
6473+
{
6474+
// Hack To allow long commandlines
6475+
ChangeToLongCmd();
6476+
6477+
// Usage
6478+
if (cmd->FindExist("-?", false) || cmd->FindExist("/?", false)) {
6479+
PrintUsage();
6480+
return;
6481+
}
6482+
char *args=(char *)cmd->GetRawCmdline().c_str();
6483+
dosbox_title=trim(args);
6484+
SetVal("dosbox", "title", dosbox_title);
6485+
GFX_SetTitle(-1,-1,-1,false);
6486+
}
6487+
6488+
static void TITLE_ProgramStart(Program * * make) {
6489+
*make=new TITLE;
6490+
}
6491+
64596492
class COLOR : public Program {
64606493
public:
64616494
void Run(void);
@@ -7665,6 +7698,7 @@ void DOS_SetupPrograms(void) {
76657698
}
76667699

76677700
PROGRAMS_MakeFile("COLOR.COM",COLOR_ProgramStart,"/BIN/");
7701+
PROGRAMS_MakeFile("TITLE.COM",TITLE_ProgramStart,"/BIN/");
76687702
PROGRAMS_MakeFile("LS.COM",LS_ProgramStart,"/BIN/");
76697703
PROGRAMS_MakeFile("ADDKEY.COM",ADDKEY_ProgramStart,"/BIN/");
76707704
PROGRAMS_MakeFile("CFGTOOL.COM",CFGTOOL_ProgramStart,"/SYSTEM/");

src/dosbox.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1815,7 +1815,8 @@ void DOSBOX_SetupConfigSections(void) {
18151815
"This can be used to help diagnose whether the DOS game is propertly waiting for vertical retrace.");
18161816

18171817
Pbool = secprop->Add_bool("cgasnow",Property::Changeable::WhenIdle,true);
1818-
Pbool->Set_help("When machine=cga, determines whether or not to emulate CGA snow in 80x25 text mode");
1818+
Pbool->Set_help("When machine=cga, determines whether or not to emulate CGA snow in 80x25 text mode.\n"
1819+
"This parameter is also changeable from the builtin CGASNOW command in CGA mode.");
18191820

18201821
/* Default changed to 0x04 for "Blues Brothers" at Allofich's request [https://github.com/joncampbell123/dosbox-x/issues/1273] */
18211822
Phex = secprop->Add_hex("vga 3da undefined bits",Property::Changeable::WhenIdle,0x04);

src/gui/menu.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ static const char *def_menu_main[] =
135135
#endif
136136
#if !defined(C_EMSCRIPTEN)//FIXME: Shutdown causes problems with Emscripten
137137
"--",
138-
#endif
139-
#if !defined(C_EMSCRIPTEN)//FIXME: Shutdown causes problems with Emscripten
138+
"restartconf",
140139
"mapper_shutdown",
141140
#endif
142141
NULL

src/gui/sdl_gui.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ void RebootConfig(std::string filename, bool confirm=false) {
127127
#if defined(WIN32)
128128
ShellExecute(NULL, "open", exepath.c_str(), para.c_str(), NULL, SW_NORMAL);
129129
#else
130-
system((exepath+" "+para).c_str());
130+
system((exepath+" "+para+ " &").c_str());
131131
#endif
132132
throw(0);
133133
}

src/gui/sdlmain.cpp

+66-42
Original file line numberDiff line numberDiff line change
@@ -3440,18 +3440,6 @@ bool setColors(const char *colorArray, int n) {
34403440
return true;
34413441
}
34423442

3443-
bool readTTFStyle(unsigned long size, void* font, FILE * fh) {
3444-
size = ftell(fh);
3445-
if(size != -1L) {
3446-
font = malloc((size_t)size);
3447-
if(font && !fseek(fh, 0, SEEK_SET) && fread(font, 1, (size_t)size, fh) == (size_t)size) {
3448-
fclose(fh);
3449-
return true;
3450-
}
3451-
}
3452-
return false;
3453-
}
3454-
34553443
std::string failName="";
34563444
bool readTTF(const char *fName, bool bold, bool ital) {
34573445
FILE * ttf_fh = NULL;
@@ -3535,28 +3523,17 @@ bool readTTF(const char *fName, bool bold, bool ital) {
35353523
ttf_fh = fopen(ttfPath, "rb");
35363524
}
35373525
}
3538-
if(ttf_fh) {
3539-
if(!fseek(ttf_fh, 0, SEEK_END))
3540-
{
3541-
if(bold && ital) {
3542-
if(readTTFStyle(ttfSizebi, ttfFontbi, ttf_fh))
3543-
return true;
3544-
}
3545-
else if(bold && !ital) {
3546-
if(readTTFStyle(ttfSizeb, ttfFontb, ttf_fh))
3547-
return true;
3548-
}
3549-
else if(!bold && ital) {
3550-
if(readTTFStyle(ttfSizei, ttfFonti, ttf_fh))
3551-
return true;
3552-
}
3553-
else {
3554-
if(readTTFStyle(ttfSize, ttfFont, ttf_fh))
3555-
return true;
3556-
}
3557-
}
3558-
fclose(ttf_fh);
3559-
}
3526+
if (ttf_fh) {
3527+
if (!fseek(ttf_fh, 0, SEEK_END))
3528+
if (((bold&&ital?ttfSizebi:(bold&&!ital?ttfSizeb:(!bold&&ital?ttfSizei:ttfSize))) = ftell(ttf_fh)) != -1L)
3529+
if ((bold&&ital?ttfFontbi:(bold&&!ital?ttfFontb:(!bold&&ital?ttfFonti:ttfFont))) = malloc((size_t)(bold&&ital?ttfSizebi:(bold&&!ital?ttfSizeb:(!bold&&ital?ttfSizei:ttfSize)))))
3530+
if (!fseek(ttf_fh, 0, SEEK_SET))
3531+
if (fread((bold&&ital?ttfFontbi:(bold&&!ital?ttfFontb:(!bold&&ital?ttfFonti:ttfFont))), 1, (size_t)(bold&&ital?ttfSizebi:(bold&&!ital?ttfSizeb:(!bold&&ital?ttfSizei:ttfSize))), ttf_fh) == (size_t)(bold&&ital?ttfSizebi:(bold&&!ital?ttfSizeb:(!bold&&ital?ttfSizei:ttfSize)))) {
3532+
fclose(ttf_fh);
3533+
return true;
3534+
}
3535+
fclose(ttf_fh);
3536+
}
35603537
if (!failName.size()||failName.compare(fName)) {
35613538
failName=std::string(fName);
35623539
std::string message="Could not load font file: "+std::string(fName)+(strlen(fName)<5||strcasecmp(fName+strlen(fName)-4, ".ttf")?".ttf":"");
@@ -3694,6 +3671,7 @@ void OUTPUT_TTF_Select(int fsize=-1) {
36943671

36953672
ttf.lins = render_section->Get_int("ttf.lins");
36963673
ttf.cols = render_section->Get_int("ttf.cols");
3674+
if (fsize&&!IS_PC98_ARCH&&!IS_EGAVGA_ARCH) ttf.lins = 25;
36973675
if ((!CurMode||CurMode->type!=M_TEXT)&&!IS_PC98_ARCH) {
36983676
if (ttf.cols<1) ttf.cols=80;
36993677
if (ttf.lins<1) ttf.lins=25;
@@ -3706,7 +3684,7 @@ void OUTPUT_TTF_Select(int fsize=-1) {
37063684
r=real_readb(0x60,0x113) & 0x01 ? 25 : 20;
37073685
} else {
37083686
c=real_readw(BIOSMEM_SEG,BIOSMEM_NB_COLS);
3709-
r=(uint16_t)real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS)+1;
3687+
r=(uint16_t)(IS_EGAVGA_ARCH?real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS):24)+1;
37103688
}
37113689
if (ttf.lins<1||ttf.cols<1) {
37123690
if (ttf.cols<1)
@@ -3732,7 +3710,7 @@ void OUTPUT_TTF_Select(int fsize=-1) {
37323710
}
37333711
if (!IS_PC98_ARCH) {
37343712
real_writeb(BIOSMEM_SEG,BIOSMEM_NB_COLS,ttf.cols);
3735-
real_writeb(BIOSMEM_SEG,BIOSMEM_NB_ROWS,ttf.lins-1);
3713+
if (IS_EGAVGA_ARCH) real_writeb(BIOSMEM_SEG,BIOSMEM_NB_ROWS,ttf.lins-1);
37363714
}
37373715
}
37383716
firstset=false;
@@ -3743,7 +3721,7 @@ void OUTPUT_TTF_Select(int fsize=-1) {
37433721
r=real_readb(0x60,0x113) & 0x01 ? 25 : 20;
37443722
} else {
37453723
c=real_readw(BIOSMEM_SEG,BIOSMEM_NB_COLS);
3746-
r=(uint16_t)real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS)+1;
3724+
r=(uint16_t)(IS_EGAVGA_ARCH?real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS):24)+1;
37473725
}
37483726
ttf.cols=c;
37493727
ttf.lins=r;
@@ -5352,7 +5330,7 @@ static void GUI_StartUp() {
53525330

53535331
#if !defined(C_EMSCRIPTEN)//FIXME: Shutdown causes problems with Emscripten
53545332
MAPPER_AddHandler(KillSwitch,MK_f9,MMOD1,"shutdown","Quit from DOSBox-X", &item); /* KEEP: Most DOSBox-X users may have muscle memory for this */
5355-
item->set_text("Quit");
5333+
item->set_text("Quit from DOSBox-X");
53565334
#endif
53575335

53585336
MAPPER_AddHandler(CaptureMouse,MK_f10,MMOD1,"capmouse","Capture mouse", &item); /* KEEP: Most DOSBox-X users may have muscle memory for this */
@@ -6263,7 +6241,7 @@ void ClipKeySelect(int sym) {
62636241
if (sym==SDLK_LEFT && (selmark?selecol:selscol)>0) (selmark?selecol:selscol)--;
62646242
else if (sym==SDLK_RIGHT && (selmark?selecol:selscol)<(IS_PC98_ARCH?80:real_readw(BIOSMEM_SEG,BIOSMEM_NB_COLS))-1) (selmark?selecol:selscol)++;
62656243
else if (sym==SDLK_UP && (selmark?selerow:selsrow)>0) (selmark?selerow:selsrow)--;
6266-
else if (sym==SDLK_DOWN && (selmark?selerow:selsrow)<(IS_PC98_ARCH?(real_readb(0x60,0x113)&0x01?25:20)-1:real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS))) (selmark?selerow:selsrow)++;
6244+
else if (sym==SDLK_DOWN && (selmark?selerow:selsrow)<(IS_PC98_ARCH?(real_readb(0x60,0x113)&0x01?25:20)-1:(IS_EGAVGA_ARCH?real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS):24))) (selmark?selerow:selsrow)++;
62676245
Mouse_Select(selscol, selsrow, selmark?selecol:selscol, selmark?selerow:selsrow, -1, -1, true);
62686246
}
62696247
}
@@ -10328,6 +10306,42 @@ void Load_mapper_file() {
1032810306
#endif
1032910307
}
1033010308

10309+
void Restart_config_file() {
10310+
Section_prop* section = static_cast<Section_prop*>(control->GetSection("sdl"));
10311+
assert(section != NULL);
10312+
10313+
#if !defined(HX_DOS)
10314+
char CurrentDir[512];
10315+
char * Temp_CurrentDir = CurrentDir;
10316+
getcwd(Temp_CurrentDir, 512);
10317+
std::string cwd = std::string(Temp_CurrentDir)+CROSS_FILESPLIT;
10318+
const char *lFilterPatterns[] = {"*.conf","*.CONF"};
10319+
const char *lFilterDescription = "DOSBox-X config files (*.map)";
10320+
char const * lTheOpenFileName = tinyfd_openFileDialog("Select config file",cwd.c_str(),2,lFilterPatterns,lFilterDescription,0);
10321+
10322+
if (lTheOpenFileName) {
10323+
/* Windows will fill lpstrFile with the FULL PATH.
10324+
The full path should be given to the pixelshader setting unless it's just
10325+
the same base path it was given: <cwd>\shaders in which case just cut it
10326+
down to the filename. */
10327+
const char* name = lTheOpenFileName;
10328+
std::string tmp = "";
10329+
10330+
/* filenames in Windows are case insensitive so do the comparison the same */
10331+
if (!strncasecmp(name, cwd.c_str(), cwd.size())) {
10332+
name += cwd.size();
10333+
while (*name == CROSS_FILESPLIT) name++;
10334+
}
10335+
10336+
if (*name) {
10337+
void RebootConfig(std::string filename, bool confirm=false);
10338+
RebootConfig(name, true);
10339+
}
10340+
}
10341+
chdir( Temp_CurrentDir );
10342+
#endif
10343+
}
10344+
1033110345
bool vid_pc98_graphics_menu_callback(DOSBoxMenu * const menu,DOSBoxMenu::item * const menuitem) {
1033210346
(void)menu;//UNUSED
1033310347
(void)menuitem;//UNUSED
@@ -10542,7 +10556,7 @@ bool clear_menu_callback(DOSBoxMenu * const menu,DOSBoxMenu::item * const menuit
1054210556
if (CurMode->mode>7&&CurMode->mode!=0x0019&&CurMode->mode!=0x0043&&CurMode->mode!=0x0054&&CurMode->mode!=0x0055&&CurMode->mode!=0x0064)
1054310557
return true;
1054410558
if (CurMode->type==M_TEXT || dos_kernel_disabled) {
10545-
const auto rows = real_readb(BIOSMEM_SEG, BIOSMEM_NB_ROWS);
10559+
const auto rows = (IS_EGAVGA_ARCH?real_readb(BIOSMEM_SEG, BIOSMEM_NB_ROWS):24);
1054610560
const auto cols = real_readw(BIOSMEM_SEG, BIOSMEM_NB_COLS);
1054710561
INT10_ScrollWindow(0, 0, rows, static_cast<uint8_t>(cols), -rows, 0x7, 0xff);
1054810562
INT10_SetCursorPos(0, 0, 0);
@@ -10569,8 +10583,10 @@ bool intensity_menu_callback(DOSBoxMenu * const menu,DOSBoxMenu::item * const me
1056910583
(void)menu;//UNUSED
1057010584
const char *mname = menuitem->get_name().c_str();
1057110585
uint16_t oldax=reg_ax, oldbx=reg_bx;
10572-
if (IS_PC98_ARCH||(CurMode->mode>7&&CurMode->mode!=0x0019&&CurMode->mode!=0x0043&&CurMode->mode!=0x0054&&CurMode->mode!=0x0055&&CurMode->mode!=0x0064))
10586+
if (IS_PC98_ARCH||machine==MCH_CGA||(CurMode->mode>7&&CurMode->mode!=0x0019&&CurMode->mode!=0x0043&&CurMode->mode!=0x0054&&CurMode->mode!=0x0055&&CurMode->mode!=0x0064)) {
10587+
systemmessagebox("Warning", "High intensity is not supported for the current video mode.", "ok","warning", 1);
1057310588
return true;
10589+
}
1057410590
if (!strcmp(mname, "text_background"))
1057510591
reg_bl = 0;
1057610592
else
@@ -10646,7 +10662,7 @@ void ttf_setlines(int cols, int lins) {
1064610662
firstset=true;
1064710663
ttf_reset();
1064810664
real_writeb(BIOSMEM_SEG,BIOSMEM_NB_COLS,ttf.cols);
10649-
real_writeb(BIOSMEM_SEG,BIOSMEM_NB_ROWS,ttf.lins-1);
10665+
if (IS_EGAVGA_ARCH) real_writeb(BIOSMEM_SEG,BIOSMEM_NB_ROWS,ttf.lins-1);
1065010666
vga.draw.address_add = ttf.cols * 2;
1065110667
}
1065210668
#endif
@@ -11373,6 +11389,13 @@ bool showdetails_menu_callback(DOSBoxMenu * const xmenu, DOSBoxMenu::item * cons
1137311389
return true;
1137411390
}
1137511391

11392+
bool restartconf_menu_callback(DOSBoxMenu * const xmenu, DOSBoxMenu::item * const menuitem) {
11393+
(void)xmenu;//UNUSED
11394+
(void)menuitem;//UNUSED
11395+
Restart_config_file();
11396+
return true;
11397+
}
11398+
1137611399
bool alwaysontop_menu_callback(DOSBoxMenu * const menu, DOSBoxMenu::item * const menuitem) {
1137711400
(void)menu;//UNUSED
1137811401
(void)menuitem;//UNUSED
@@ -13527,6 +13550,7 @@ int main(int argc, char* argv[]) SDL_MAIN_NOEXCEPT {
1352713550
/* more */
1352813551
std::string doubleBufString = std::string("desktop.doublebuf");
1352913552
mainMenu.alloc_item(DOSBoxMenu::item_type_id,"showdetails").set_text("Show FPS and RT speed in title bar").set_callback_function(showdetails_menu_callback).check(!menu.hidecycles && menu.showrt);
13553+
mainMenu.alloc_item(DOSBoxMenu::item_type_id,"restartconf").set_text("Restart DOSBox-X with config file...").set_callback_function(restartconf_menu_callback);
1353013554
mainMenu.alloc_item(DOSBoxMenu::item_type_id,"auto_lock_mouse").set_text("Autolock mouse").set_callback_function(autolock_mouse_menu_callback).check(sdl.mouse.autoenable);
1353113555
#if defined (WIN32) || defined(MACOSX) || defined(C_SDL2)
1353213556
mainMenu.alloc_item(DOSBoxMenu::item_type_id,"clipboard_right").set_text("Via right mouse button").set_callback_function(right_mouse_clipboard_menu_callback).check(mbutton==3);

0 commit comments

Comments
 (0)