mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-09 20:41:29 -04:00
Defer mDoMemCd_ThdInit if necessary, removing restart requirement
Thanks, Melon
This commit is contained in:
@@ -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>());
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user