Merge pull request #9404 from Filoppi/patch-5

Fix typos and code coding conventions
This commit is contained in:
Léo Lam
2021-01-05 15:33:43 +01:00
committed by GitHub
6 changed files with 11 additions and 13 deletions

View File

@ -39,7 +39,7 @@ static void TryToConnectBalanceBoard(std::unique_ptr<Wiimote>);
static bool TryToConnectWiimoteToSlot(std::unique_ptr<Wiimote>&, unsigned int); static bool TryToConnectWiimoteToSlot(std::unique_ptr<Wiimote>&, unsigned int);
static void HandleWiimoteDisconnect(int index); 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 // This is used to store connected Wiimotes' IDs, so we don't connect
// more than once to the same device. // more than once to the same device.
@ -807,7 +807,7 @@ void LoadSettings()
// config dialog calls this when some settings change // config dialog calls this when some settings change
void Initialize(::Wiimote::InitializeMode init_mode) void Initialize(::Wiimote::InitializeMode init_mode)
{ {
if (!g_real_wiimotes_initialized) if (!s_real_wiimotes_initialized)
{ {
s_wiimote_scanner.StartThread(); 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; return;
NOTICE_LOG_FMT(WIIMOTE, "WiimoteReal::Initialize"); NOTICE_LOG_FMT(WIIMOTE, "WiimoteReal::Initialize");
g_real_wiimotes_initialized = true; s_real_wiimotes_initialized = true;
} }
// called on emulation shutdown // called on emulation shutdown
@ -848,7 +848,7 @@ void Stop()
// called when the Dolphin app exits // called when the Dolphin app exits
void Shutdown() void Shutdown()
{ {
g_real_wiimotes_initialized = false; s_real_wiimotes_initialized = false;
s_wiimote_scanner.StopThread(); s_wiimote_scanner.StopThread();
NOTICE_LOG_FMT(WIIMOTE, "WiimoteReal::Shutdown"); NOTICE_LOG_FMT(WIIMOTE, "WiimoteReal::Shutdown");

View File

@ -99,11 +99,11 @@ enum
STATE_LOAD = 2, STATE_LOAD = 2,
}; };
static bool g_use_compression = true; static bool s_use_compression = true;
void EnableCompression(bool compression) void EnableCompression(bool compression)
{ {
g_use_compression = compression; s_use_compression = compression;
} }
// Returns true if state version matches current Dolphin state version, false otherwise. // 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 // Setting up the header
StateHeader header{}; StateHeader header{};
SConfig::GetInstance().GetGameID().copy(header.gameID, std::size(header.gameID)); 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(); header.time = Common::Timer::GetDoubleTime();
f.WriteArray(&header, 1); f.WriteArray(&header, 1);

View File

@ -20,7 +20,6 @@
#include "DolphinQt/Config/Graphics/GraphicsSlider.h" #include "DolphinQt/Config/Graphics/GraphicsSlider.h"
#include "DolphinQt/Config/Graphics/GraphicsWindow.h" #include "DolphinQt/Config/Graphics/GraphicsWindow.h"
#include "DolphinQt/Config/Graphics/PostProcessingConfigWindow.h" #include "DolphinQt/Config/Graphics/PostProcessingConfigWindow.h"
#include "DolphinQt/QtUtils/ModalMessageBox.h"
#include "DolphinQt/Settings.h" #include "DolphinQt/Settings.h"
#include "UICommon/VideoUtils.h" #include "UICommon/VideoUtils.h"

View File

@ -4,7 +4,6 @@
#include "DolphinQt/QtUtils/ElidedButton.h" #include "DolphinQt/QtUtils/ElidedButton.h"
#include <QFontMetrics>
#include <QStyleOptionButton> #include <QStyleOptionButton>
#include <QStylePainter> #include <QStylePainter>

View File

@ -220,7 +220,7 @@ public:
} }
protected: protected:
// TODO: Wiimote attachment has its own member that isn't being used.. // TODO: Wiimote attachment has its own member that isn't being used.
ciface::ExpressionParser::ControlEnvironment::VariableContainer m_expression_vars; ciface::ExpressionParser::ControlEnvironment::VariableContainer m_expression_vars;
void UpdateReferences(ciface::ExpressionParser::ControlEnvironment& env); void UpdateReferences(ciface::ExpressionParser::ControlEnvironment& env);

View File

@ -1194,7 +1194,7 @@ void Renderer::UpdateWidescreenHeuristic()
// with NON-anamorphic orthographic projections. // with NON-anamorphic orthographic projections.
// This can cause incorrect changes to 4:3 when perspective projections are temporarily not // This can cause incorrect changes to 4:3 when perspective projections are temporarily not
// shown. e.g. Animal Crossing's inventory menu. // shown. e.g. Animal Crossing's inventory menu.
// Unless we were in a sitation which was orthographically anamorphic // Unless we were in a situation which was orthographically anamorphic
// we won't consider orthographic data for changes from 16:9 to 4:3. // we won't consider orthographic data for changes from 16:9 to 4:3.
m_is_game_widescreen = false; m_is_game_widescreen = false;
} }
@ -1332,7 +1332,7 @@ void Renderer::Swap(u32 xfb_addr, u32 fb_width, u32 fb_stride, u32 fb_height, u6
Core::Callback_FramePresented(); Core::Callback_FramePresented();
} }
// Handle any config changes, this gets propogated to the backend. // Handle any config changes, this gets propagated to the backend.
CheckForConfigChanges(); CheckForConfigChanges();
g_Config.iSaveTargetId = 0; g_Config.iSaveTargetId = 0;