From 3acd1726b9aa58d06fcc8435d9e07a736b7f82b7 Mon Sep 17 00:00:00 2001 From: Filippo Tarpini Date: Thu, 31 Dec 2020 12:50:22 +0200 Subject: [PATCH] Core: Fix variable naming conventions [committer note: squashed two commits] --- Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp | 10 +++++----- Source/Core/Core/State.cpp | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp b/Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp index 9e4edf2b54..487f31eeeb 100644 --- a/Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp +++ b/Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp @@ -39,7 +39,7 @@ static void TryToConnectBalanceBoard(std::unique_ptr); static bool TryToConnectWiimoteToSlot(std::unique_ptr&, unsigned int); static void HandleWiimoteDisconnect(int index); -static bool g_real_wiimotes_initialized = false; +static bool s_real_wiimotes_initialized = false; // This is used to store connected Wiimotes' IDs, so we don't connect // more than once to the same device. @@ -807,7 +807,7 @@ void LoadSettings() // config dialog calls this when some settings change void Initialize(::Wiimote::InitializeMode init_mode) { - if (!g_real_wiimotes_initialized) + if (!s_real_wiimotes_initialized) { s_wiimote_scanner.StartThread(); } @@ -829,12 +829,12 @@ void Initialize(::Wiimote::InitializeMode init_mode) } } - if (g_real_wiimotes_initialized) + if (s_real_wiimotes_initialized) return; NOTICE_LOG_FMT(WIIMOTE, "WiimoteReal::Initialize"); - g_real_wiimotes_initialized = true; + s_real_wiimotes_initialized = true; } // called on emulation shutdown @@ -848,7 +848,7 @@ void Stop() // called when the Dolphin app exits void Shutdown() { - g_real_wiimotes_initialized = false; + s_real_wiimotes_initialized = false; s_wiimote_scanner.StopThread(); NOTICE_LOG_FMT(WIIMOTE, "WiimoteReal::Shutdown"); diff --git a/Source/Core/Core/State.cpp b/Source/Core/Core/State.cpp index cd494d1a94..8326ae8815 100644 --- a/Source/Core/Core/State.cpp +++ b/Source/Core/Core/State.cpp @@ -99,11 +99,11 @@ enum STATE_LOAD = 2, }; -static bool g_use_compression = true; +static bool s_use_compression = true; void EnableCompression(bool compression) { - g_use_compression = compression; + s_use_compression = compression; } // Returns true if state version matches current Dolphin state version, false otherwise. @@ -358,7 +358,7 @@ static void CompressAndDumpState(CompressAndDumpState_args save_args) // Setting up the header StateHeader header{}; SConfig::GetInstance().GetGameID().copy(header.gameID, std::size(header.gameID)); - header.size = g_use_compression ? (u32)buffer_size : 0; + header.size = s_use_compression ? (u32)buffer_size : 0; header.time = Common::Timer::GetDoubleTime(); f.WriteArray(&header, 1);