mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2026-09-28 22:03:13 -05:00
Add simple "safe mode" which disable all non-basearoma plugins
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "patcher/hooks_patcher_static.h"
|
||||
#include "plugin/PluginDataFactory.h"
|
||||
#include "utils/WUPSBackendSettings.h"
|
||||
#include "utils/input/VPADInput.h"
|
||||
#include "utils/logger.h"
|
||||
#include "utils/utils.h"
|
||||
#include "version.h"
|
||||
@@ -42,6 +43,22 @@ WUMS_INITIALIZE() {
|
||||
}
|
||||
}
|
||||
|
||||
VPadInput vpadInput;
|
||||
vpadInput.update(1280, 720);
|
||||
auto buttomComboSafeMode = Input::eButtons::BUTTON_L | Input::eButtons::BUTTON_UP | Input::eButtons::BUTTON_MINUS;
|
||||
if ((vpadInput.data.buttons_h & (buttomComboSafeMode)) == buttomComboSafeMode) {
|
||||
auto tobeIgnoredFilePath = getNonBaseAromaPluginFilenames(getPluginPath());
|
||||
WUPSBackendSettings::LoadSettings();
|
||||
std::set<std::string> inactivePlugins = WUPSBackendSettings::GetInactivePluginFilenames();
|
||||
|
||||
inactivePlugins.insert(tobeIgnoredFilePath.begin(), tobeIgnoredFilePath.end());
|
||||
for (const auto &d : inactivePlugins) {
|
||||
DEBUG_FUNCTION_LINE_INFO("%s should be ignores", d.c_str());
|
||||
}
|
||||
WUPSBackendSettings::SetInactivePluginFilenames(inactivePlugins);
|
||||
WUPSBackendSettings::SaveSettings();
|
||||
}
|
||||
|
||||
deinitLogging();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user