Qt: Disable saving/loading nameless profiles

This commit is contained in:
Vicki Pfau 2021-03-06 20:02:08 -08:00
parent 74fd2c3c0b
commit b6bc8d54e3
1 changed files with 6 additions and 0 deletions

View File

@ -178,6 +178,9 @@ void InputController::loadConfiguration(uint32_t type) {
}
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 @@ void InputController::saveConfiguration(uint32_t type) {
}
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();
}