[Kernel] Prevent real XAM from initialization while loading dashboard

This commit is contained in:
Gliniak
2025-08-08 22:05:15 +02:00
parent 04adfffa35
commit 06456c20fc
2 changed files with 8 additions and 1 deletions

View File

@@ -838,7 +838,7 @@ void KernelState::OnThreadExecute(XThread* thread) {
if (user_module->is_dll_module() && user_module->entry_point()) {
uint64_t args[] = {
user_module->handle(),
user_module->is_attached_
user_module->is_attached()
? static_cast<uint64_t>(2) // DLL_THREAD_ATTACH - Used to call
// DLL for each thread created.
: static_cast<uint64_t>(1), // DLL_PROCESS_ATTACH - Used only

View File

@@ -66,6 +66,13 @@ class UserModule : public XModule {
bool is_executable() const { return processor_module_->is_executable(); }
bool is_dll_module() const { return is_dll_module_; }
bool is_attached() const {
// Special case for skipping real XAM initialization as it will fail.
if (name_ == "xam") {
return true;
}
return is_attached_;
}
uint32_t entry_point() const { return entry_point_; }
uint32_t stack_size() const { return stack_size_; }