mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2024-11-24 13:49:17 +01:00
Add "saving config" screen to the config menu
This commit is contained in:
parent
4225d8ff8f
commit
b372d78b7d
@ -160,6 +160,7 @@ void ConfigUtils::displayMenu() {
|
||||
|
||||
gOnlyAcceptFromThread = OSGetCurrentThread();
|
||||
while (true) {
|
||||
startTime = OSGetTime();
|
||||
if (gConfigMenuShouldClose) {
|
||||
gConfigMenuShouldClose = false;
|
||||
break;
|
||||
@ -212,6 +213,9 @@ void ConfigUtils::displayMenu() {
|
||||
}
|
||||
}
|
||||
|
||||
startTime = OSGetTime();
|
||||
renderBasicScreen("Saving configs...");
|
||||
|
||||
for (const auto &plugin : gLoadedPlugins) {
|
||||
const auto configData = plugin.getConfigData();
|
||||
if (configData) {
|
||||
@ -224,6 +228,12 @@ void ConfigUtils::displayMenu() {
|
||||
}
|
||||
|
||||
WUPSConfigAPIBackend::Intern::CleanAllHandles();
|
||||
|
||||
// we want wait at least 300ms to avoid leaking inputs from the config menu to the application
|
||||
auto diffTime = OSTicksToMilliseconds(OSGetTime() - startTime);
|
||||
if (diffTime < 300) {
|
||||
OSSleepTicks(OSMillisecondsToTicks(300 - diffTime));
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" uint32_t __OSPhysicalToEffectiveUncached(uint32_t);
|
||||
|
Loading…
Reference in New Issue
Block a user