Skip to content

Commit

Permalink
added code to help debug issue #6: made Win32 app show stdout and std…
Browse files Browse the repository at this point in the history
…err, if and when it is run from a command prompt window
  • Loading branch information
DavidLudwig committed Aug 15, 2017
1 parent b9c9687 commit 6abc599
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions BasiliskII/src/Windows/main_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,13 @@ int main(int argc, char **argv)
char str[256];
bool cd_boot = false;

// Make sure stdout and stderr gets displayed, if and when the app is run
// via a command prompt window.
if (AttachConsole(ATTACH_PARENT_PROCESS)) {
freopen("CONOUT$", "w", stdout);
freopen("CONOUT$", "w", stderr);
}

// Initialize variables
RAMBaseHost = NULL;
ROMBaseHost = NULL;
Expand Down

0 comments on commit 6abc599

Please sign in to comment.