Made version mismatch screen more descriptive
This commit is contained in:
parent
342a048e0e
commit
7bf2ebd7e8
|
@ -146,7 +146,9 @@ static void connect_menu_draw_strings(void) {
|
|||
if (*sConnectionJoinError) {
|
||||
f32 red = (f32)fabs(sin(gGlobalTimer / 20.0f));
|
||||
gDPSetEnvColor(gDisplayListHead++, 222, 222 * red, 222 * red, gMenuStringAlpha);
|
||||
print_generic_ascii_string(30, 130, sConnectionJoinError);
|
||||
f32 messageX = (SCREEN_WIDTH - get_generic_ascii_string_width(sConnectionJoinError)) / 2.0;
|
||||
f32 messageY = (SCREEN_HEIGHT + get_generic_ascii_string_height(sConnectionJoinError)) / 2.0;
|
||||
print_generic_ascii_string(messageX, messageY, sConnectionJoinError);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -106,7 +106,16 @@ void network_receive_join(struct Packet* p) {
|
|||
LOG_INFO("server has version: %s", version);
|
||||
if (memcmp(version, remoteVersion, MAX_VERSION_LENGTH) != 0) {
|
||||
LOG_ERROR("version mismatch");
|
||||
custom_menu_connection_error("Your versions don't match, both should rebuild!");
|
||||
|
||||
// todo: hack: remove me in the future
|
||||
// needed because the old style only had 8 characters for the version
|
||||
if (strcmp("beta", remoteVersion) != 0) {
|
||||
remoteVersion[8] = '\0';
|
||||
}
|
||||
|
||||
char mismatchMessage[128] = { 0 };
|
||||
snprintf(mismatchMessage, 128, "Version mismatch.\n\nYour version - %s\nTheir version - %s\n\nSomeone is out of date!\n", version, remoteVersion);
|
||||
custom_menu_connection_error(mismatchMessage);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue