càrrega de recursos no bloquejant
This commit is contained in:
@@ -36,7 +36,11 @@ namespace GlobalEvents {
|
||||
// Reasignar siempre: tanto en arranque como en hotplug en caliente.
|
||||
Options::gamepad_manager.assignAndLinkGamepads();
|
||||
Options::gamepad_manager.resyncGamepadsWithPlayers();
|
||||
ServiceMenu::get()->refresh();
|
||||
|
||||
// Durante el preload ServiceMenu aún no existe: solo refresca si está vivo.
|
||||
if (ServiceMenu::get() != nullptr) {
|
||||
ServiceMenu::get()->refresh();
|
||||
}
|
||||
|
||||
if (startup_in_progress || message.empty()) {
|
||||
return;
|
||||
@@ -51,7 +55,11 @@ namespace GlobalEvents {
|
||||
message.replace(pos, std::string(" DISCONNECTED").length(), " " + Lang::getText("[NOTIFICATIONS] DISCONNECTED"));
|
||||
}
|
||||
|
||||
Notifier::get()->show({message});
|
||||
// Notifier también puede no existir todavía si la notificación se
|
||||
// disparase antes de finishBoot(). Protegido por si acaso.
|
||||
if (Notifier::get() != nullptr) {
|
||||
Notifier::get()->show({message});
|
||||
}
|
||||
}
|
||||
|
||||
void markStartupComplete() {
|
||||
@@ -79,7 +87,10 @@ namespace GlobalEvents {
|
||||
break;
|
||||
}
|
||||
|
||||
ServiceMenu::get()->handleEvent(event);
|
||||
// Durante el preload ServiceMenu aún no existe
|
||||
if (ServiceMenu::get() != nullptr) {
|
||||
ServiceMenu::get()->handleEvent(event);
|
||||
}
|
||||
Mouse::handleEvent(event);
|
||||
handleInputEvents(event);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user