summaryrefslogtreecommitdiffstats
path: root/src/citra_qt/bootmanager.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2017-10-10 05:56:20 +0200
committerbunnei <bunneidev@gmail.com>2017-10-10 05:56:20 +0200
commitb1d5db1cf60344b6b081c9d03cb6ccc3264326cd (patch)
treefde377c4ba3c0f92c032e6f5ec8627aae37270ef /src/citra_qt/bootmanager.cpp
parentloader: Various improvements for NSO/NRO loaders. (diff)
parentMerge pull request #2996 from MerryMage/split-travis (diff)
downloadyuzu-b1d5db1cf60344b6b081c9d03cb6ccc3264326cd.tar
yuzu-b1d5db1cf60344b6b081c9d03cb6ccc3264326cd.tar.gz
yuzu-b1d5db1cf60344b6b081c9d03cb6ccc3264326cd.tar.bz2
yuzu-b1d5db1cf60344b6b081c9d03cb6ccc3264326cd.tar.lz
yuzu-b1d5db1cf60344b6b081c9d03cb6ccc3264326cd.tar.xz
yuzu-b1d5db1cf60344b6b081c9d03cb6ccc3264326cd.tar.zst
yuzu-b1d5db1cf60344b6b081c9d03cb6ccc3264326cd.zip
Diffstat (limited to 'src/citra_qt/bootmanager.cpp')
-rw-r--r--src/citra_qt/bootmanager.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp
index 30554890f..7107bfc60 100644
--- a/src/citra_qt/bootmanager.cpp
+++ b/src/citra_qt/bootmanager.cpp
@@ -17,6 +17,7 @@
#include "core/settings.h"
#include "input_common/keyboard.h"
#include "input_common/main.h"
+#include "input_common/motion_emu.h"
#include "network/network.h"
EmuThread::EmuThread(GRenderWindow* render_window)
@@ -201,7 +202,6 @@ qreal GRenderWindow::windowPixelRatio() {
}
void GRenderWindow::closeEvent(QCloseEvent* event) {
- motion_emu = nullptr;
emit Closed();
QWidget::closeEvent(event);
}
@@ -221,7 +221,7 @@ void GRenderWindow::mousePressEvent(QMouseEvent* event) {
this->TouchPressed(static_cast<unsigned>(pos.x() * pixelRatio),
static_cast<unsigned>(pos.y() * pixelRatio));
} else if (event->button() == Qt::RightButton) {
- motion_emu->BeginTilt(pos.x(), pos.y());
+ InputCommon::GetMotionEmu()->BeginTilt(pos.x(), pos.y());
}
}
@@ -230,14 +230,14 @@ void GRenderWindow::mouseMoveEvent(QMouseEvent* event) {
qreal pixelRatio = windowPixelRatio();
this->TouchMoved(std::max(static_cast<unsigned>(pos.x() * pixelRatio), 0u),
std::max(static_cast<unsigned>(pos.y() * pixelRatio), 0u));
- motion_emu->Tilt(pos.x(), pos.y());
+ InputCommon::GetMotionEmu()->Tilt(pos.x(), pos.y());
}
void GRenderWindow::mouseReleaseEvent(QMouseEvent* event) {
if (event->button() == Qt::LeftButton)
this->TouchReleased();
else if (event->button() == Qt::RightButton)
- motion_emu->EndTilt();
+ InputCommon::GetMotionEmu()->EndTilt();
}
void GRenderWindow::focusOutEvent(QFocusEvent* event) {
@@ -290,13 +290,11 @@ void GRenderWindow::OnMinimalClientAreaChangeRequest(
}
void GRenderWindow::OnEmulationStarting(EmuThread* emu_thread) {
- motion_emu = std::make_unique<Motion::MotionEmu>(*this);
this->emu_thread = emu_thread;
child->DisablePainting();
}
void GRenderWindow::OnEmulationStopping() {
- motion_emu = nullptr;
emu_thread = nullptr;
child->EnablePainting();
}