Static class member name style fix

This commit is contained in:
GEEKiDoS 2022-04-30 02:02:27 +08:00
parent c2c62cd72e
commit 2d79f10b37
2 changed files with 16 additions and 16 deletions

View File

@ -2,9 +2,9 @@
namespace Components namespace Components
{ {
Dvar::Var RawMouse::useRawInput; Dvar::Var RawMouse::M_RawInput;
int RawMouse::mouseRawX = 0; int RawMouse::MouseRawX = 0;
int RawMouse::mouseRawY = 0; int RawMouse::MouseRawY = 0;
void RawMouse::IN_ClampMouseMove() void RawMouse::IN_ClampMouseMove()
{ {
@ -60,13 +60,13 @@ namespace Components
// Is there's really absolute mouse on earth? // Is there's really absolute mouse on earth?
if (raw->data.mouse.usFlags & MOUSE_MOVE_ABSOLUTE) if (raw->data.mouse.usFlags & MOUSE_MOVE_ABSOLUTE)
{ {
mouseRawX = raw->data.mouse.lLastX; MouseRawX = raw->data.mouse.lLastX;
mouseRawY = raw->data.mouse.lLastY; MouseRawY = raw->data.mouse.lLastY;
} }
else else
{ {
mouseRawX += raw->data.mouse.lLastX; MouseRawX += raw->data.mouse.lLastX;
mouseRawY += raw->data.mouse.lLastY; MouseRawY += raw->data.mouse.lLastY;
} }
} }
@ -84,11 +84,11 @@ namespace Components
static auto oldX = 0, oldY = 0; static auto oldX = 0, oldY = 0;
auto dx = mouseRawX - oldX; auto dx = MouseRawX - oldX;
auto dy = mouseRawY - oldY; auto dy = MouseRawY - oldY;
oldX = mouseRawX; oldX = MouseRawX;
oldY = mouseRawY; oldY = MouseRawY;
// Don't use raw input for menu? // Don't use raw input for menu?
// Because it needs to call the ScreenToClient // Because it needs to call the ScreenToClient
@ -110,7 +110,7 @@ namespace Components
{ {
static auto init = false; static auto init = false;
if (Game::g_wv->hWnd && !init && RawMouse::useRawInput.get<bool>()) if (Game::g_wv->hWnd && !init && RawMouse::M_RawInput.get<bool>())
{ {
#ifdef DEBUG #ifdef DEBUG
Logger::Print("Raw Mouse Init.\n"); Logger::Print("Raw Mouse Init.\n");
@ -136,7 +136,7 @@ namespace Components
void RawMouse::IN_MouseMove() void RawMouse::IN_MouseMove()
{ {
if (RawMouse::useRawInput.get<bool>()) if (RawMouse::M_RawInput.get<bool>())
{ {
IN_RawMouseMove(); IN_RawMouseMove();
} }
@ -157,7 +157,7 @@ namespace Components
Dvar::OnInit([]() Dvar::OnInit([]()
{ {
RawMouse::useRawInput = Dvar::Register<bool>("m_rawinput", true, Game::dvar_flag::DVAR_ARCHIVE, "Use raw mouse input, use in_restart to take effect if not enabled."); RawMouse::M_RawInput = Dvar::Register<bool>("m_rawinput", true, Game::dvar_flag::DVAR_ARCHIVE, "Use raw mouse input, use in_restart to take effect if not enabled.");
}); });
Window::OnWndMessage(WM_INPUT, RawMouse::OnRawInput); Window::OnWndMessage(WM_INPUT, RawMouse::OnRawInput);

View File

@ -7,8 +7,8 @@ namespace Components
public: public:
RawMouse(); RawMouse();
private: private:
static Dvar::Var useRawInput; static Dvar::Var M_RawInput;
static int mouseRawX, mouseRawY; static int MouseRawX, MouseRawY;
static void IN_ClampMouseMove(); static void IN_ClampMouseMove();
static BOOL OnRawInput(LPARAM lParam, WPARAM); static BOOL OnRawInput(LPARAM lParam, WPARAM);