MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / Platform_GetCommandLineArgs

Function Platform_GetCommandLineArgs

src/Platform_Windows.c:1170–1183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1168}
1169
1170int Platform_GetCommandLineArgs(int argc, STRING_REF char** argv, cc_string* args) {
1171 cc_string cmdArgs = String_FromReadonly(GetCommandLineA());
1172 int i;
1173 Platform_NextArg(&cmdArgs); /* skip exe path */
1174 if (gameHasArgs) return GetGameArgs(args);
1175
1176 for (i = 0; i < GAME_MAX_CMDARGS; i++)
1177 {
1178 args[i] = Platform_NextArg(&cmdArgs);
1179
1180 if (!args[i].length) break;
1181 }
1182 return i;
1183}
1184
1185/* Detects if the game is running in Windows directory */
1186/* This happens when ClassiCube is launched directly from shell process */

Callers

nothing calls this directly

Calls 3

String_FromReadonlyFunction · 0.85
GetGameArgsFunction · 0.85
Platform_NextArgFunction · 0.70

Tested by

no test coverage detected