summaryrefslogtreecommitdiffstats
path: root/src/input_common/motion_emu.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/input_common/motion_emu.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/input_common/motion_emu.cpp b/src/input_common/motion_emu.cpp
index 6d96d4019..868251628 100644
--- a/src/input_common/motion_emu.cpp
+++ b/src/input_common/motion_emu.cpp
@@ -39,7 +39,7 @@ public:
void Tilt(int x, int y) {
auto mouse_move = Common::MakeVec(x, y) - mouse_origin;
if (is_tilting) {
- std::lock_guard<std::mutex> guard(tilt_mutex);
+ std::lock_guard guard{tilt_mutex};
if (mouse_move.x == 0 && mouse_move.y == 0) {
tilt_angle = 0;
} else {
@@ -51,13 +51,13 @@ public:
}
void EndTilt() {
- std::lock_guard<std::mutex> guard(tilt_mutex);
+ std::lock_guard guard{tilt_mutex};
tilt_angle = 0;
is_tilting = false;
}
std::tuple<Common::Vec3<float>, Common::Vec3<float>> GetStatus() {
- std::lock_guard<std::mutex> guard(status_mutex);
+ std::lock_guard guard{status_mutex};
return status;
}
@@ -93,7 +93,7 @@ private:
old_q = q;
{
- std::lock_guard<std::mutex> guard(tilt_mutex);
+ std::lock_guard guard{tilt_mutex};
// Find the quaternion describing current 3DS tilting
q = Common::MakeQuaternion(
@@ -115,7 +115,7 @@ private:
// Update the sensor state
{
- std::lock_guard<std::mutex> guard(status_mutex);
+ std::lock_guard guard{status_mutex};
status = std::make_tuple(gravity, angular_rate);
}
}