From 860ee81b545c9c708951a05445a6f874fd8db3d4 Mon Sep 17 00:00:00 2001 From: Windsurf7 Date: Fri, 30 Jan 2026 16:07:30 +0300 Subject: [PATCH] Made atomic_t Made atomic_t --- rpcs3/Input/mouse_gyro_state.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/rpcs3/Input/mouse_gyro_state.h b/rpcs3/Input/mouse_gyro_state.h index 21b52d5b9c..bd8537da34 100644 --- a/rpcs3/Input/mouse_gyro_state.h +++ b/rpcs3/Input/mouse_gyro_state.h @@ -1,6 +1,7 @@ #pragma once #include "util/types.hpp" +#include "util/atomic.hpp" #include "Emu/Io/pad_types.h" class QEvent; @@ -10,11 +11,11 @@ class QWindow; class mouse_gyro_state { private: - bool active = false; // Whether right mouse button is currently held (gyro active) - bool reset = false; // One-shot reset request on right mouse button release - s32 gyro_x = DEFAULT_MOTION_X; // Accumulated from mouse X position relative to center - s32 gyro_y = DEFAULT_MOTION_Y; // Accumulated from mouse wheel delta - s32 gyro_z = DEFAULT_MOTION_Z; // Accumulated from mouse Y position relative to center + atomic_t active = false; // Whether right mouse button is currently held (gyro active) + atomic_t reset = false; // One-shot reset request on right mouse button release + atomic_t gyro_x = DEFAULT_MOTION_X; // Accumulated from mouse X position relative to center + atomic_t gyro_y = DEFAULT_MOTION_Y; // Accumulated from mouse wheel delta + atomic_t gyro_z = DEFAULT_MOTION_Z; // Accumulated from mouse Y position relative to center public: void clear();