all repos — mgba @ a0a3ac191aa4e016fae1cb40672833f83b58a9a5

mGBA Game Boy Advance Emulator

Qt: Recalibrate axes in more places
Jeffrey Pfau jeffrey@endrift.com
Sat, 18 Apr 2015 01:10:50 -0700
commit

a0a3ac191aa4e016fae1cb40672833f83b58a9a5

parent

6750e7775e1c5d6cf191f05219bfb57f5fff19fe

M src/platform/qt/GBAKeyEditor.cppsrc/platform/qt/GBAKeyEditor.cpp

@@ -62,7 +62,6 @@ connect(m_profileSelect, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), [this] (int i) {

m_controller->setGamepad(m_type, i); m_profile = m_profileSelect->currentText(); m_controller->loadProfile(m_type, m_profile); - m_controller->recalibrateAxes(); refresh(); }); }
M src/platform/qt/GameController.cppsrc/platform/qt/GameController.cpp

@@ -273,6 +273,10 @@ if (!m_patch.isNull()) {

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();
M src/platform/qt/InputController.cppsrc/platform/qt/InputController.cpp

@@ -94,6 +94,9 @@ }

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) {
M src/platform/qt/Window.cppsrc/platform/qt/Window.cpp

@@ -298,6 +298,9 @@ openView(settingsWindow);

} void Window::openShortcutWindow() { +#ifdef BUILD_SDL + m_inputController.recalibrateAxes(); +#endif ShortcutView* shortcutView = new ShortcutView(); shortcutView->setController(m_shortcutController); openView(shortcutView);