Skip to content
Permalink
Browse files

- moced I_DetectOS call into D_DoomMain

This requires the console and was the reason for this strange setup.
  • Loading branch information...
coelckers committed Sep 30, 2019
1 parent a1a73ef commit ff40bcd1783433e093b656e5e29642b28de3896c
Showing with 7 additions and 3 deletions.
  1. +1 −0 src/d_main.cpp
  2. +1 −2 src/posix/cocoa/i_main.mm
  3. +5 −0 src/posix/sdl/i_main.cpp
  4. +0 −1 src/win32/i_main.cpp
@@ -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");
@@ -90,7 +90,7 @@ - (NSOperatingSystemVersion)operatingSystemVersion;

#endif // before 10.10

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

I_DetectOS();
D_DoomMain();
}

@@ -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();

@@ -979,7 +979,6 @@ void DoMain (HINSTANCE hInstance)
CoInitialize (NULL);
atexit (UnCOM);

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

0 comments on commit ff40bcd

Please sign in to comment.
You can’t perform that action at this time.