mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 19:45:23 -04:00
fix last commit, oops
This commit is contained in:
parent
d298f3ff57
commit
aed9ecc651
@ -749,7 +749,6 @@ void Game_Run(Int32 width, Int32 height, STRING_REF String* title, struct Displa
|
|||||||
void AdvLightingBuilder_SetActive(void) { NormalBuilder_SetActive(); }
|
void AdvLightingBuilder_SetActive(void) { NormalBuilder_SetActive(); }
|
||||||
#if CC_BUILD_NIX
|
#if CC_BUILD_NIX
|
||||||
void Waitable_WaitFor(void* handle, UInt32 milliseconds) { }
|
void Waitable_WaitFor(void* handle, UInt32 milliseconds) { }
|
||||||
STRING_PURE String Platform_GetCommandLineArgs(void) { return String_MakeNull(); }
|
|
||||||
|
|
||||||
void Audio_Init(AudioHandle* handle, Int32 buffers) { }
|
void Audio_Init(AudioHandle* handle, Int32 buffers) { }
|
||||||
void Audio_Free(AudioHandle handle) { }
|
void Audio_Free(AudioHandle handle) { }
|
||||||
|
@ -1394,7 +1394,7 @@ Int32 Platform_GetCommandLineArgs(int argc, char** argv, STRING_TRANSIENT String
|
|||||||
Int32 i, count = min(argc, PROGRAM_MAX_CMDARGS);
|
Int32 i, count = min(argc, PROGRAM_MAX_CMDARGS);
|
||||||
|
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
args[i] = String_FromReadonly(argv[i]);
|
args[i] = String_FromReadonly(argv[i + 1]);
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
@ -69,10 +69,11 @@ int main(int argc, char** argv) {
|
|||||||
// String rawArgs = String_FromConst("UnknownShadow200 fff 127.0.0.1 25565");
|
// String rawArgs = String_FromConst("UnknownShadow200 fff 127.0.0.1 25565");
|
||||||
// argsCount = 4; String_UNSAFE_Split(&rawArgs, ' ', args, &argsCount);
|
// argsCount = 4; String_UNSAFE_Split(&rawArgs, ' ', args, &argsCount);
|
||||||
|
|
||||||
if (argsCount == 1) {
|
if (argsCount == 0) {
|
||||||
String name = args[0];
|
String name = String_FromConst("Singleplayer");
|
||||||
if (!name.length) name = String_FromReadonly("Singleplayer");
|
|
||||||
String_Copy(&Game_Username, &name);
|
String_Copy(&Game_Username, &name);
|
||||||
|
} else if (argsCount == 1) {
|
||||||
|
String_Copy(&Game_Username, &args[0]);
|
||||||
} else if (argsCount < 4) {
|
} else if (argsCount < 4) {
|
||||||
ErrorHandler_ShowDialog("Failed to start", "ClassiCube.exe is only the raw client.\n\n" \
|
ErrorHandler_ShowDialog("Failed to start", "ClassiCube.exe is only the raw client.\n\n" \
|
||||||
"Use the launcher instead, or provide command line arguments");
|
"Use the launcher instead, or provide command line arguments");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user