Qt: Recalibrate axes in more places
Jeffrey Pfau jeffrey@endrift.com
Sat, 18 Apr 2015 01:10:50 -0700
4 files changed,
10 insertions(+),
1 deletions(-)
M
src/platform/qt/GBAKeyEditor.cpp
→
src/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.cpp
→
src/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.cpp
→
src/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.cpp
→
src/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);