Defer mDoMemCd_ThdInit if necessary, removing restart requirement

Thanks, Melon
This commit is contained in:
Irastris
2026-05-05 16:56:41 -04:00
parent 93a236a9d2
commit 3cd160e1b2
2 changed files with 14 additions and 3 deletions
+6 -3
View File
@@ -14,6 +14,8 @@
#include <SDL3/SDL_dialog.h>
#include <aurora/lib/window.hpp>
#include "m_Do/m_Do_MemCard.h"
namespace dusk::ui {
const Rml::String kDocumentSource = R"RML(
@@ -145,9 +147,6 @@ bool is_restart_pending() noexcept {
if (getSettings().game.language.getValue() != state.initialLanguage) {
return true;
}
if (getSettings().backend.cardFileType.getValue() != state.initialCardFileType) {
return true;
}
return false;
}
@@ -187,6 +186,10 @@ Prelaunch::Prelaunch() : Document(kDocumentSource), mRoot(mDocument->GetElementB
}
}
if (g_mDoMemCd_control.mCardCommand == mDoMemCd_Ctrl_c::Command_e::COMM_NONE_e) {
mDoMemCd_ThdInit();
}
IsGameLaunched = true;
if (!getSettings().backend.wasPresetChosen) {
push_document(std::make_unique<dusk::ui::PresetWindow>());
+8
View File
@@ -31,6 +31,7 @@
#if TARGET_PC
#include <assert.h>
#include "dusk/ui/ui.hpp"
#endif
#if !PLATFORM_GCN
@@ -1009,7 +1010,14 @@ int mDoMch_Create() {
JKRAram::setSZSBufferSize(0x2000);
mDoDvdThd::create(OSGetThreadPriority(OSGetCurrentThread()) - 2);
mDoDvdErr_ThdInit();
#if TARGET_PC
if (!dusk::ui::is_prelaunch_open()) {
mDoMemCd_ThdInit();
}
#else
mDoMemCd_ThdInit();
#endif
return 1;
}