- moced I_DetectOS call into D_DoomMain

This requires the console and was the reason for this strange setup.
This commit is contained in:
Christoph Oelckers 2019-10-01 01:02:49 +02:00
parent a1a73ef2b3
commit ff40bcd178
4 changed files with 7 additions and 3 deletions

View file

@ -2286,6 +2286,7 @@ void D_DoomMain (void)
const char *batchout = Args->CheckValue("-errorlog"); const char *batchout = Args->CheckValue("-errorlog");
C_InitConsole(80*8, 25*8, false); 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. // +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"); FString logfile = Args->TakeValue("+logfile");

View file

@ -90,7 +90,7 @@ struct NSOperatingSystemVersion
#endif // before 10.10 #endif // before 10.10
static void I_DetectOS() void I_DetectOS()
{ {
NSOperatingSystemVersion version = {}; NSOperatingSystemVersion version = {};
NSProcessInfo* const processInfo = [NSProcessInfo processInfo]; NSProcessInfo* const processInfo = [NSProcessInfo processInfo];
@ -172,7 +172,6 @@ void OriginalMainTry(int argc, char** argv)
progdir = [[exePath stringByDeletingLastPathComponent] UTF8String]; progdir = [[exePath stringByDeletingLastPathComponent] UTF8String];
progdir += "/"; progdir += "/";
I_DetectOS();
D_DoomMain(); D_DoomMain();
} }

View file

@ -149,6 +149,11 @@ static int DoomSpecificInfo (char *buffer, char *end)
return p; return p;
} }
void I_DetectOS()
{
// The POSIX version never implemented this.
}
void I_StartupJoysticks(); void I_StartupJoysticks();
void I_ShutdownJoysticks(); void I_ShutdownJoysticks();

View file

@ -979,7 +979,6 @@ void DoMain (HINSTANCE hInstance)
CoInitialize (NULL); CoInitialize (NULL);
atexit (UnCOM); atexit (UnCOM);
I_DetectOS ();
D_DoomMain (); D_DoomMain ();
} }
catch (class CNoRunExit &) catch (class CNoRunExit &)