Skip to content

Commit

Permalink
Merge pull request #1452 from lioncash/morestatic
Browse files Browse the repository at this point in the history
GCPadEmu/WiimoteEmu: Make some arrays static
  • Loading branch information
skidau committed Nov 2, 2014
2 parents 5d18c66 + 5a321d3 commit b241b6e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions Source/Core/Core/HW/GCPadEmu.cpp
Expand Up @@ -8,7 +8,7 @@
// TODO: Move to header file when VS supports constexpr.
const ControlState GCPad::DEFAULT_PAD_STICK_RADIUS = 1.0;

const u16 button_bitmasks[] =
static const u16 button_bitmasks[] =
{
PAD_BUTTON_A,
PAD_BUTTON_B,
Expand All @@ -19,18 +19,18 @@ const u16 button_bitmasks[] =
0 // MIC HAX
};

const u16 trigger_bitmasks[] =
static const u16 trigger_bitmasks[] =
{
PAD_TRIGGER_L,
PAD_TRIGGER_R,
};

const u16 dpad_bitmasks[] =
static const u16 dpad_bitmasks[] =
{
PAD_BUTTON_UP, PAD_BUTTON_DOWN, PAD_BUTTON_LEFT, PAD_BUTTON_RIGHT
};

const char* const named_buttons[] =
static const char* const named_buttons[] =
{
"A",
"B",
Expand All @@ -41,7 +41,7 @@ const char* const named_buttons[] =
"Mic"
};

const char* const named_triggers[] =
static const char* const named_triggers[] =
{
// i18n: Left
_trans("L"),
Expand Down
8 changes: 4 additions & 4 deletions Source/Core/Core/HW/WiimoteEmu/WiimoteEmu.cpp
Expand Up @@ -171,7 +171,7 @@ void EmulateSwing(AccelData* const accel
(&accel->x)[axis_map[i]] += swing[i] * g_dir[i] * SWING_INTENSITY;
}

const u16 button_bitmasks[] =
static const u16 button_bitmasks[] =
{
Wiimote::BUTTON_A,
Wiimote::BUTTON_B,
Expand All @@ -182,16 +182,16 @@ const u16 button_bitmasks[] =
Wiimote::BUTTON_HOME
};

const u16 dpad_bitmasks[] =
static const u16 dpad_bitmasks[] =
{
Wiimote::PAD_UP, Wiimote::PAD_DOWN, Wiimote::PAD_LEFT, Wiimote::PAD_RIGHT
};
const u16 dpad_sideways_bitmasks[] =
static const u16 dpad_sideways_bitmasks[] =
{
Wiimote::PAD_RIGHT, Wiimote::PAD_LEFT, Wiimote::PAD_UP, Wiimote::PAD_DOWN
};

const char* const named_buttons[] =
static const char* const named_buttons[] =
{
"A", "B", "1", "2", "-", "+", "Home",
};
Expand Down

0 comments on commit b241b6e

Please sign in to comment.