mirror of https://github.com/mgba-emu/mgba.git
Qt: Recalibrate axes in more places
This commit is contained in:
parent
6750e7775e
commit
a0a3ac191a
|
@ -62,7 +62,6 @@ GBAKeyEditor::GBAKeyEditor(InputController* controller, int type, const QString&
|
|||
m_controller->setGamepad(m_type, i);
|
||||
m_profile = m_profileSelect->currentText();
|
||||
m_controller->loadProfile(m_type, m_profile);
|
||||
m_controller->recalibrateAxes();
|
||||
refresh();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -273,6 +273,10 @@ void GameController::openGame() {
|
|||
m_threadContext.patch = VFileOpen(m_patch.toLocal8Bit().constData(), O_RDONLY);
|
||||
}
|
||||
|
||||
#ifdef BUILD_SDL
|
||||
m_inputController->recalibrateAxes();
|
||||
#endif
|
||||
|
||||
if (!GBAThreadStart(&m_threadContext)) {
|
||||
m_gameOpen = false;
|
||||
emit gameFailed();
|
||||
|
|
|
@ -94,6 +94,9 @@ void InputController::loadConfiguration(uint32_t type) {
|
|||
|
||||
void InputController::loadProfile(uint32_t type, const QString& profile) {
|
||||
GBAInputProfileLoad(&m_inputMap, type, m_config->input(), profile.toLocal8Bit().constData());
|
||||
#ifdef BUILD_SDL
|
||||
recalibrateAxes();
|
||||
#endif
|
||||
}
|
||||
|
||||
void InputController::saveConfiguration(uint32_t type) {
|
||||
|
|
|
@ -298,6 +298,9 @@ void Window::openSettingsWindow() {
|
|||
}
|
||||
|
||||
void Window::openShortcutWindow() {
|
||||
#ifdef BUILD_SDL
|
||||
m_inputController.recalibrateAxes();
|
||||
#endif
|
||||
ShortcutView* shortcutView = new ShortcutView();
|
||||
shortcutView->setController(m_shortcutController);
|
||||
openView(shortcutView);
|
||||
|
|
Loading…
Reference in New Issue