Skip to content

Commit

Permalink
fix possible issue with HX-DOS build
Browse files Browse the repository at this point in the history
  • Loading branch information
Wengier committed Feb 1, 2021
1 parent 7e5fd8c commit f520d9f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
0.83.10
- The Windows key(s) in Windows and the Command key(s)
in macOS will now be displayed as the "Windows" and
"Command" keys instead of the "super" and "meta"
"Command" keys instead of the "super" and the "meta"
keys in SDL1 builds just like SDL2 builds. (Wengier)
- Cursor blinking rate for TrueType font (TTF) output
can now be customized with the ttf.blinkc option.
Expand Down
9 changes: 8 additions & 1 deletion src/dos/dos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1890,8 +1890,15 @@ static Bitu DOS_21Handler(void) {
break;
case 0x5e: /* Network and printer functions */
if (reg_al == 0 && !control->SecureMode() && enable_network_redirector) { // Get machine name
#if defined(WIN32)
DWORD size = DOSNAMEBUF;
GetComputerName(name1, &size);
if (size)
#else
int result = gethostname(name1, DOSNAMEBUF);
if (!result) {
if (!result)
#endif
{
strcat(name1, " "); // Simply add 15 spaces
if (!strcmp(RunningProgram, "4DOS") || (reg_ip == 0xeb31 && (reg_sp == 0xc25e || reg_sp == 0xc26e))) { // 4DOS expects it to be 0 terminated (not documented)
name1[16] = 0;
Expand Down

0 comments on commit f520d9f

Please sign in to comment.