Skip to content

Commit

Permalink
- moced I_DetectOS call into D_DoomMain
Browse files Browse the repository at this point in the history
This requires the console and was the reason for this strange setup.
  • Loading branch information
coelckers committed Sep 30, 2019
1 parent a1a73ef commit ff40bcd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/d_main.cpp
Expand Up @@ -2286,6 +2286,7 @@ void D_DoomMain (void)
const char *batchout = Args->CheckValue("-errorlog");

C_InitConsole(80*8, 25*8, false);
I_DetectOS();

// +logfile gets checked too late to catch the full startup log in the logfile so do some extra check for it here.
FString logfile = Args->TakeValue("+logfile");
Expand Down
3 changes: 1 addition & 2 deletions src/posix/cocoa/i_main.mm
Expand Up @@ -90,7 +90,7 @@ - (NSOperatingSystemVersion)operatingSystemVersion;

#endif // before 10.10

static void I_DetectOS()
void I_DetectOS()
{
NSOperatingSystemVersion version = {};
NSProcessInfo* const processInfo = [NSProcessInfo processInfo];
Expand Down Expand Up @@ -172,7 +172,6 @@ handler and exit() is called to exit, either
progdir = [[exePath stringByDeletingLastPathComponent] UTF8String];
progdir += "/";

I_DetectOS();
D_DoomMain();
}

Expand Down
5 changes: 5 additions & 0 deletions src/posix/sdl/i_main.cpp
Expand Up @@ -149,6 +149,11 @@ static int DoomSpecificInfo (char *buffer, char *end)
return p;
}

void I_DetectOS()
{
// The POSIX version never implemented this.
}

void I_StartupJoysticks();
void I_ShutdownJoysticks();

Expand Down
1 change: 0 additions & 1 deletion src/win32/i_main.cpp
Expand Up @@ -979,7 +979,6 @@ void DoMain (HINSTANCE hInstance)
CoInitialize (NULL);
atexit (UnCOM);

I_DetectOS ();
D_DoomMain ();
}
catch (class CNoRunExit &)
Expand Down

0 comments on commit ff40bcd

Please sign in to comment.