all repos — mgba @ b6bc8d54e3ba7f8d11c1888003b18bab738c1e89

mGBA Game Boy Advance Emulator

Qt: Disable saving/loading nameless profiles
Vicki Pfau vi@endrift.com
Sat, 06 Mar 2021 20:02:08 -0800
commit

b6bc8d54e3ba7f8d11c1888003b18bab738c1e89

parent

74fd2c3c0bd3779bb5321dee6fa6dca14020b552

1 files changed, 6 insertions(+), 0 deletions(-)

jump to
M src/platform/qt/InputController.cppsrc/platform/qt/InputController.cpp

@@ -178,6 +178,9 @@ #endif

} void InputController::loadProfile(uint32_t type, const QString& profile) { + if (profile.isEmpty()) { + return; + } bool loaded = mInputProfileLoad(&m_inputMap, type, m_config->input(), profile.toUtf8().constData()); recalibrateAxes(); if (!loaded) {

@@ -207,6 +210,9 @@ m_config->write();

} void InputController::saveProfile(uint32_t type, const QString& profile) { + if (profile.isEmpty()) { + return; + } mInputProfileSave(&m_inputMap, type, m_config->input(), profile.toUtf8().constData()); m_config->write(); }