Android/ButtonManager: Make local file-scope variables internally linked where applicable

Silences a few -Wmissing-variable-declarations warnings.
This commit is contained in:
Lioncash 2019-06-07 20:02:00 -04:00
parent e73a3ba1c6
commit 069497e87d
1 changed files with 9 additions and 4 deletions

View File

@ -14,9 +14,10 @@
namespace ButtonManager namespace ButtonManager
{ {
namespace
{
const std::string touchScreenKey = "Touchscreen"; const std::string touchScreenKey = "Touchscreen";
std::unordered_map<std::string, InputDevice*> m_controllers; const std::vector<std::string> configStrings = {
std::vector<std::string> configStrings = {
// GC // GC
"InputA", "InputA",
"InputB", "InputB",
@ -169,7 +170,8 @@ std::vector<std::string> configStrings = {
// Rumble // Rumble
"Rumble", "Rumble",
}; };
std::vector<ButtonType> configTypes = {
const std::vector<ButtonType> configTypes = {
// GC // GC
BUTTON_A, BUTTON_A,
BUTTON_B, BUTTON_B,
@ -323,7 +325,9 @@ std::vector<ButtonType> configTypes = {
RUMBLE, RUMBLE,
}; };
static void AddBind(const std::string& dev, sBind* bind) std::unordered_map<std::string, InputDevice*> m_controllers;
void AddBind(const std::string& dev, sBind* bind)
{ {
auto it = m_controllers.find(dev); auto it = m_controllers.find(dev);
if (it != m_controllers.end()) if (it != m_controllers.end())
@ -334,6 +338,7 @@ static void AddBind(const std::string& dev, sBind* bind)
m_controllers[dev] = new InputDevice(dev); m_controllers[dev] = new InputDevice(dev);
m_controllers[dev]->AddBind(bind); m_controllers[dev]->AddBind(bind);
} }
} // Anonymous namespace
void Init(const std::string& gameId) void Init(const std::string& gameId)
{ {