mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2024-11-07 21:45:08 +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();
|
gOnlyAcceptFromThread = OSGetCurrentThread();
|
||||||
while (true) {
|
while (true) {
|
||||||
|
startTime = OSGetTime();
|
||||||
if (gConfigMenuShouldClose) {
|
if (gConfigMenuShouldClose) {
|
||||||
gConfigMenuShouldClose = false;
|
gConfigMenuShouldClose = false;
|
||||||
break;
|
break;
|
||||||
@ -212,6 +213,9 @@ void ConfigUtils::displayMenu() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
startTime = OSGetTime();
|
||||||
|
renderBasicScreen("Saving configs...");
|
||||||
|
|
||||||
for (const auto &plugin : gLoadedPlugins) {
|
for (const auto &plugin : gLoadedPlugins) {
|
||||||
const auto configData = plugin.getConfigData();
|
const auto configData = plugin.getConfigData();
|
||||||
if (configData) {
|
if (configData) {
|
||||||
@ -224,6 +228,12 @@ void ConfigUtils::displayMenu() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
WUPSConfigAPIBackend::Intern::CleanAllHandles();
|
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);
|
extern "C" uint32_t __OSPhysicalToEffectiveUncached(uint32_t);
|
||||||
|
Loading…
Reference in New Issue
Block a user