Skip to content

Commit

Permalink
Catching up with skip preload changes
Browse files Browse the repository at this point in the history
  • Loading branch information
colincornaby committed Aug 13, 2023
1 parent fd68041 commit 3cfa409
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions Sources/Plasma/Apps/plClient/Mac-Cocoa/main.mm
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@
void PumpMessageQueueProc();

extern bool gDataServerLocal;
extern bool gSkipPreload;
extern bool gPythonLocal;
extern bool gSDLLocal;

bool NeedsResolutionUpdate = false;

Expand Down Expand Up @@ -132,7 +133,8 @@ @interface AppDelegate : NSWindowController <NSApplicationDelegate,
kArgSkipLoginDialog,
kArgServerIni,
kArgLocalData,
kArgSkipPreload,
kArgLocalPython,
kArgLocalSDL,
kArgPlayerId,
kArgStartUpAgeName,
kArgPvdFile,
Expand All @@ -141,15 +143,16 @@ @interface AppDelegate : NSWindowController <NSApplicationDelegate,
};

static const plCmdArgDef s_cmdLineArgs[] = {
{kCmdArgFlagged | kCmdTypeBool, "SkipLoginDialog", kArgSkipLoginDialog},
{kCmdArgFlagged | kCmdTypeString, "ServerIni", kArgServerIni},
{kCmdArgFlagged | kCmdTypeBool, "LocalData", kArgLocalData},
{kCmdArgFlagged | kCmdTypeBool, "SkipPreload", kArgSkipPreload},
{kCmdArgFlagged | kCmdTypeInt, "PlayerId", kArgPlayerId},
{kCmdArgFlagged | kCmdTypeString, "Age", kArgStartUpAgeName},
{kCmdArgFlagged | kCmdTypeString, "PvdFile", kArgPvdFile},
{kCmdArgFlagged | kCmdTypeBool, "SkipIntroMovies", kArgSkipIntroMovies},
{kCmdArgFlagged | kCmdTypeString, "Renderer", kArgRenderer},
{ kCmdArgFlagged | kCmdTypeBool, "SkipLoginDialog", kArgSkipLoginDialog },
{ kCmdArgFlagged | kCmdTypeString, "ServerIni", kArgServerIni },
{ kCmdArgFlagged | kCmdTypeBool, "LocalData", kArgLocalData },
{ kCmdArgFlagged | kCmdTypeBool, "LocalPython", kArgLocalPython },
{ kCmdArgFlagged | kCmdTypeBool, "LocalSDL", kArgLocalSDL },
{ kCmdArgFlagged | kCmdTypeInt, "PlayerId", kArgPlayerId },
{ kCmdArgFlagged | kCmdTypeString, "Age", kArgStartUpAgeName },
{ kCmdArgFlagged | kCmdTypeString, "PvdFile", kArgPvdFile },
{ kCmdArgFlagged | kCmdTypeBool, "SkipIntroMovies", kArgSkipIntroMovies },
{ kCmdArgFlagged | kCmdTypeString, "Renderer", kArgRenderer },
};

plCmdParser cmdParser(s_cmdLineArgs, std::size(s_cmdLineArgs));
Expand Down Expand Up @@ -308,9 +311,12 @@ - (void)applicationDidFinishLaunching:(NSNotification*)notification

if (cmdParser.IsSpecified(kArgLocalData)) {
gDataServerLocal = true;
gSkipPreload = true;
gPythonLocal = true;
}
if (cmdParser.IsSpecified(kArgSkipPreload)) gSkipPreload = true;
if (cmdParser.IsSpecified(kArgLocalPython))
gPythonLocal = true;
if (cmdParser.IsSpecified(kArgLocalSDL))
gSDLLocal = true;

#ifndef PLASMA_EXTERNAL_RELEASE
// if (cmdParser.IsSpecified(kArgSkipLoginDialog))
Expand All @@ -330,7 +336,7 @@ - (void)applicationDidFinishLaunching:(NSNotification*)notification
NetCommConnect();
[[PLSServerStatus sharedStatus] loadServerStatus];

if (gSkipPreload) {
if (gDataServerLocal) {
[self initializeClient];
} else {
[self prepatch];
Expand Down

0 comments on commit 3cfa409

Please sign in to comment.