From 844ed61aa4effdd84155a593d12aeb0df9197b13 Mon Sep 17 00:00:00 2001 From: arthomnix Date: Tue, 19 Jul 2022 17:14:46 +0100 Subject: [PATCH] NOISSUE Yeet the version check --- launcher/ui/dialogs/CreateShortcutDialog.cpp | 25 +------------------- launcher/ui/dialogs/CreateShortcutDialog.h | 6 ----- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/launcher/ui/dialogs/CreateShortcutDialog.cpp b/launcher/ui/dialogs/CreateShortcutDialog.cpp index f6711397..dbce5f18 100644 --- a/launcher/ui/dialogs/CreateShortcutDialog.cpp +++ b/launcher/ui/dialogs/CreateShortcutDialog.cpp @@ -41,30 +41,7 @@ CreateShortcutDialog::CreateShortcutDialog(QWidget *parent, InstancePtr instance ui->profileComboBox->setCurrentText(accounts->defaultAccount()->profileName()); } - // check if instance is affected by a bug causing it to crash when trying to join a server on launch - // TODO: implement this check in meta - if (m_instance->typeName() == "Minecraft") - { - try - { - MinecraftInstancePtr minecraftInstance = qobject_pointer_cast(m_instance); - minecraftInstance->getPackProfile()->reload(Net::Mode::Online); - QDateTime versionDate = minecraftInstance->getPackProfile()->getComponent("net.minecraft")->getReleaseDateTime(); - bool enableJoinServer = (versionDate < MC_145102_START) - || (versionDate >= MC_145102_END && versionDate < MC_228828_START) - || (versionDate >= MC_228828_END); - ui->joinServerCheckBox->setEnabled(enableJoinServer); - ui->joinServer->setEnabled(enableJoinServer); - } - catch (const Exception &e) - { - QMessageBox::critical(this, tr("Error"), e.cause()); - } - catch (...) - { - QMessageBox::critical(this, tr("Error"), tr("Failed to load pack profile to check version!")); - } - } + // TODO: check if version is affected by crashing when joining servers on launch, ideally in meta // Macs don't have any concept of a desktop shortcut, so force-enable the option to generate a shell script instead #if defined(Q_OS_UNIX) && !defined(Q_OS_LINUX) diff --git a/launcher/ui/dialogs/CreateShortcutDialog.h b/launcher/ui/dialogs/CreateShortcutDialog.h index d27e94cd..a2497dd6 100644 --- a/launcher/ui/dialogs/CreateShortcutDialog.h +++ b/launcher/ui/dialogs/CreateShortcutDialog.h @@ -16,12 +16,6 @@ #include #endif -// Dates when the game was affected by bugs that crashed the game when using the option to join a server on startup -const QDateTime MC_145102_START = timeFromS3Time("2019-02-20T14:56:58+00:00"); -const QDateTime MC_145102_END = timeFromS3Time("2020-05-14T08:16:26+00:00"); -const QDateTime MC_228828_START = timeFromS3Time("2021-03-10T15:24:38+00:00"); -const QDateTime MC_228828_END = timeFromS3Time("2021-06-18T12:24:40+00:00"); - namespace Ui { class CreateShortcutDialog;