InputCommon: Use nested namespace specifiers where applicable

This commit is contained in:
Lioncash 2019-06-17 16:39:24 -04:00
parent 8e030a4a45
commit ec60027f56
38 changed files with 78 additions and 195 deletions

View File

@ -11,14 +11,11 @@ class QString;
class OutputReference; class OutputReference;
class QPushButton; class QPushButton;
namespace ciface namespace ciface::Core
{
namespace Core
{ {
class DeviceContainer; class DeviceContainer;
class DeviceQualifier; class DeviceQualifier;
} // namespace Core } // namespace ciface::Core
} // namespace ciface
namespace MappingCommon namespace MappingCommon
{ {

View File

@ -25,13 +25,10 @@ class ControlGroup;
class EmulatedController; class EmulatedController;
} // namespace ControllerEmu } // namespace ControllerEmu
namespace ciface namespace ciface::Core
{
namespace Core
{ {
class Device; class Device;
} } // namespace ciface::Core
} // namespace ciface
constexpr int INDICATOR_UPDATE_FREQ = 30; constexpr int INDICATOR_UPDATE_FREQ = 30;

View File

@ -13,12 +13,10 @@
#include "Common/StringUtil.h" #include "Common/StringUtil.h"
#include "InputCommon/ControlReference/ExpressionParser.h" #include "InputCommon/ControlReference/ExpressionParser.h"
namespace ciface::ExpressionParser
{
using namespace ciface::Core; using namespace ciface::Core;
namespace ciface
{
namespace ExpressionParser
{
enum TokenType enum TokenType
{ {
TOK_DISCARD, TOK_DISCARD,
@ -557,5 +555,4 @@ std::pair<ParseStatus, std::unique_ptr<Expression>> ParseExpression(const std::s
std::move(complex_result.expr)); std::move(complex_result.expr));
return std::make_pair(complex_result.status, std::move(combined_expr)); return std::make_pair(complex_result.status, std::move(combined_expr));
} }
} // namespace ExpressionParser } // namespace ciface::ExpressionParser
} // namespace ciface

View File

@ -9,9 +9,7 @@
#include <utility> #include <utility>
#include "InputCommon/ControllerInterface/Device.h" #include "InputCommon/ControllerInterface/Device.h"
namespace ciface namespace ciface::ExpressionParser
{
namespace ExpressionParser
{ {
class ControlQualifier class ControlQualifier
{ {
@ -66,5 +64,4 @@ enum class ParseStatus
}; };
std::pair<ParseStatus, std::unique_ptr<Expression>> ParseExpression(const std::string& expr); std::pair<ParseStatus, std::unique_ptr<Expression>> ParseExpression(const std::string& expr);
} // namespace ExpressionParser } // namespace ciface::ExpressionParser
} // namespace ciface

View File

@ -8,9 +8,7 @@
#include <thread> #include <thread>
#include "InputCommon/ControllerInterface/ControllerInterface.h" #include "InputCommon/ControllerInterface/ControllerInterface.h"
namespace ciface namespace ciface::Android
{
namespace Android
{ {
void PopulateDevices() void PopulateDevices()
{ {
@ -240,5 +238,4 @@ void Touchscreen::Motor::Rumble(int padID, double state)
JNIEnv* env = IDCache::GetEnvForThread(); JNIEnv* env = IDCache::GetEnvForThread();
env->CallStaticVoidMethod(IDCache::GetNativeLibraryClass(), IDCache::GetDoRumble(), padID, state); env->CallStaticVoidMethod(IDCache::GetNativeLibraryClass(), IDCache::GetDoRumble(), padID, state);
} }
} // namespace Android } // namespace ciface::Android
} // namespace ciface

View File

@ -7,11 +7,10 @@
#include "InputCommon/ControllerInterface/ControllerInterface.h" #include "InputCommon/ControllerInterface/ControllerInterface.h"
#include "jni/ButtonManager.h" #include "jni/ButtonManager.h"
namespace ciface namespace ciface::Android
{
namespace Android
{ {
void PopulateDevices(); void PopulateDevices();
class Touchscreen : public Core::Device class Touchscreen : public Core::Device
{ {
private: private:
@ -65,5 +64,4 @@ public:
private: private:
const int _padID; const int _padID;
}; };
} // namespace Android } // namespace ciface::Android
} // namespace ciface

View File

@ -14,9 +14,7 @@
#pragma comment(lib, "Dinput8.lib") #pragma comment(lib, "Dinput8.lib")
#pragma comment(lib, "dxguid.lib") #pragma comment(lib, "dxguid.lib")
namespace ciface namespace ciface::DInput
{
namespace DInput
{ {
BOOL CALLBACK DIEnumDeviceObjectsCallback(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef) BOOL CALLBACK DIEnumDeviceObjectsCallback(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef)
{ {
@ -69,5 +67,4 @@ void PopulateDevices(HWND hwnd)
idi8->Release(); idi8->Release();
} }
} // namespace DInput } // namespace ciface::DInput
} // namespace ciface

View File

@ -12,9 +12,7 @@
#include "InputCommon/ControllerInterface/DInput/DInput8.h" #include "InputCommon/ControllerInterface/DInput/DInput8.h"
namespace ciface namespace ciface::DInput
{
namespace DInput
{ {
// BOOL CALLBACK DIEnumEffectsCallback(LPCDIEFFECTINFO pdei, LPVOID pvRef); // BOOL CALLBACK DIEnumEffectsCallback(LPCDIEFFECTINFO pdei, LPVOID pvRef);
BOOL CALLBACK DIEnumDeviceObjectsCallback(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef); BOOL CALLBACK DIEnumDeviceObjectsCallback(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef);
@ -22,5 +20,4 @@ BOOL CALLBACK DIEnumDevicesCallback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef);
std::string GetDeviceName(const LPDIRECTINPUTDEVICE8 device); std::string GetDeviceName(const LPDIRECTINPUTDEVICE8 device);
void PopulateDevices(HWND hwnd); void PopulateDevices(HWND hwnd);
} // namespace DInput } // namespace ciface::DInput
} // namespace ciface

View File

@ -14,9 +14,7 @@
#include "InputCommon/ControllerInterface/DInput/DInputJoystick.h" #include "InputCommon/ControllerInterface/DInput/DInputJoystick.h"
#include "InputCommon/ControllerInterface/DInput/XInputFilter.h" #include "InputCommon/ControllerInterface/DInput/XInputFilter.h"
namespace ciface namespace ciface::DInput
{
namespace DInput
{ {
constexpr DWORD DATA_BUFFER_SIZE = 32; constexpr DWORD DATA_BUFFER_SIZE = 32;
@ -315,5 +313,4 @@ ControlState Joystick::Hat::GetState() const
return (abs((int)(m_hat / 4500 - m_direction * 2 + 8) % 8 - 4) > 2); return (abs((int)(m_hat / 4500 - m_direction * 2 + 8) % 8 - 4) > 2);
} }
} // namespace DInput } // namespace ciface::DInput
} // namespace ciface

View File

@ -7,9 +7,7 @@
#include "InputCommon/ControllerInterface/Device.h" #include "InputCommon/ControllerInterface/Device.h"
#include "InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h" #include "InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h"
namespace ciface namespace ciface::DInput
{
namespace DInput
{ {
void InitJoystick(IDirectInput8* const idi8, HWND hwnd); void InitJoystick(IDirectInput8* const idi8, HWND hwnd);
@ -77,5 +75,4 @@ private:
bool m_buffered; bool m_buffered;
}; };
} // namespace DInput } // namespace ciface::DInput
} // namespace ciface

View File

@ -17,9 +17,7 @@
// otherwise it is just some crazy value // otherwise it is just some crazy value
#define DROP_INPUT_TIME 250 #define DROP_INPUT_TIME 250
namespace ciface namespace ciface::DInput
{
namespace DInput
{ {
static const struct static const struct
{ {
@ -227,5 +225,4 @@ ControlState KeyboardMouse::Cursor::GetState() const
{ {
return m_axis / (m_positive ? 1.0 : -1.0); return m_axis / (m_positive ? 1.0 : -1.0);
} }
} // namespace DInput } // namespace ciface::DInput
} // namespace ciface

View File

@ -9,9 +9,7 @@
#include "InputCommon/ControllerInterface/DInput/DInput8.h" #include "InputCommon/ControllerInterface/DInput/DInput8.h"
#include "InputCommon/ControllerInterface/Device.h" #include "InputCommon/ControllerInterface/Device.h"
namespace ciface namespace ciface::DInput
{
namespace DInput
{ {
void InitKeyboardMouse(IDirectInput8* const idi8, HWND hwnd); void InitKeyboardMouse(IDirectInput8* const idi8, HWND hwnd);
@ -103,5 +101,4 @@ private:
DWORD m_last_update; DWORD m_last_update;
State m_state_in; State m_state_in;
}; };
} // namespace DInput } // namespace ciface::DInput
} // namespace ciface

View File

@ -9,9 +9,7 @@
#include <Windows.h> #include <Windows.h>
#include <SetupAPI.h> #include <SetupAPI.h>
namespace ciface namespace ciface::DInput
{
namespace DInput
{ {
// Code for enumerating hardware devices that use the XINPUT device driver. // Code for enumerating hardware devices that use the XINPUT device driver.
// The MSDN recommended code suffers from massive performance problems when using language packs, // The MSDN recommended code suffers from massive performance problems when using language packs,
@ -76,5 +74,4 @@ std::unordered_set<DWORD> GetXInputGUIDS()
SetupDiDestroyDeviceInfoList(setup_enum); SetupDiDestroyDeviceInfoList(setup_enum);
return guids; return guids;
} }
} // namespace DInput } // namespace ciface::DInput
} // namespace ciface

View File

@ -7,10 +7,7 @@
#include <Windows.h> #include <Windows.h>
#include <unordered_set> #include <unordered_set>
namespace ciface namespace ciface::DInput
{
namespace DInput
{ {
std::unordered_set<DWORD> GetXInputGUIDS(); std::unordered_set<DWORD> GetXInputGUIDS();
} } // namespace ciface::DInput
} // namespace ciface

View File

@ -14,9 +14,7 @@
#include "Common/StringUtil.h" #include "Common/StringUtil.h"
#include "Common/Thread.h" #include "Common/Thread.h"
namespace ciface namespace ciface::Core
{
namespace Core
{ {
// Compared to an input's current state (ideally 1.0) minus abs(initial_state) (ideally 0.0). // Compared to an input's current state (ideally 1.0) minus abs(initial_state) (ideally 0.0).
constexpr ControlState INPUT_DETECT_THRESHOLD = 0.55; constexpr ControlState INPUT_DETECT_THRESHOLD = 0.55;
@ -326,6 +324,4 @@ DeviceContainer::DetectInput(u32 wait_ms, const std::vector<std::string>& device
// No input was detected. :'( // No input was detected. :'(
return {}; return {};
} }
} // namespace ciface::Core
} // namespace Core
} // namespace ciface

View File

@ -9,9 +9,7 @@
#include "Common/Thread.h" #include "Common/Thread.h"
namespace ciface namespace ciface::ForceFeedback
{
namespace ForceFeedback
{ {
// Template instantiation: // Template instantiation:
template class ForceFeedbackDevice::TypedForce<DICONSTANTFORCE>; template class ForceFeedbackDevice::TypedForce<DICONSTANTFORCE>;
@ -257,6 +255,4 @@ void ForceFeedbackDevice::Force::Release()
m_effect->Unload(); m_effect->Unload();
m_effect->Release(); m_effect->Release();
} }
} // namespace ciface::ForceFeedback
} // namespace ForceFeedback
} // namespace ciface

View File

@ -19,9 +19,7 @@
#include "InputCommon/ControllerInterface/ForceFeedback/OSX/DirectInputAdapter.h" #include "InputCommon/ControllerInterface/ForceFeedback/OSX/DirectInputAdapter.h"
#endif #endif
namespace ciface namespace ciface::ForceFeedback
{
namespace ForceFeedback
{ {
class ForceFeedbackDevice : public Core::Device class ForceFeedbackDevice : public Core::Device
{ {
@ -83,6 +81,4 @@ private:
Common::Event m_update_event; Common::Event m_update_event;
Common::Flag m_run_thread; Common::Flag m_run_thread;
}; };
} // namespace ciface::ForceFeedback
} // namespace ForceFeedback
} // namespace ciface

View File

@ -20,9 +20,7 @@ typedef LONG* LPLONG; // Missing type for ForceFeedback.h
#include "Common/CommonTypes.h" // for LONG #include "Common/CommonTypes.h" // for LONG
#include "DirectInputConstants.h" // Not stricty necessary #include "DirectInputConstants.h" // Not stricty necessary
namespace ciface namespace ciface::ForceFeedback
{
namespace ForceFeedback
{ {
// Prototypes // Prototypes
class IUnknownImpl; class IUnknownImpl;
@ -196,5 +194,4 @@ public:
return FFDeviceSetForceFeedbackProperty(m_device, property, &value); return FFDeviceSetForceFeedbackProperty(m_device, property, &value);
} }
}; };
} // namespace ForceFeedback } // namespace ciface::ForceFeedback
} // namespace ciface

View File

@ -4,14 +4,11 @@
#pragma once #pragma once
namespace ciface namespace ciface::OSX
{
namespace OSX
{ {
void Init(void* window); void Init(void* window);
void PopulateDevices(void* window); void PopulateDevices(void* window);
void DeInit(); void DeInit();
void DeviceElementDebugPrint(const void*, void*); void DeviceElementDebugPrint(const void*, void*);
} // namespace OSX } // namespace ciface::OSX
} // namespace ciface

View File

@ -17,9 +17,7 @@
#include "InputCommon/ControllerInterface/OSX/OSXJoystick.h" #include "InputCommon/ControllerInterface/OSX/OSXJoystick.h"
#include "InputCommon/ControllerInterface/OSX/RunLoopStopper.h" #include "InputCommon/ControllerInterface/OSX/RunLoopStopper.h"
namespace ciface namespace ciface::OSX
{
namespace OSX
{ {
constexpr CFTimeInterval FOREVER = 1e20; constexpr CFTimeInterval FOREVER = 1e20;
static std::thread s_hotplug_thread; static std::thread s_hotplug_thread;
@ -227,5 +225,4 @@ void DeInit()
IOHIDManagerClose(HIDManager, kIOHIDOptionsTypeNone); IOHIDManagerClose(HIDManager, kIOHIDOptionsTypeNone);
CFRelease(HIDManager); CFRelease(HIDManager);
} }
} } // namespace ciface::OSX
}

View File

@ -11,9 +11,7 @@
#include "InputCommon/ControllerInterface/Device.h" #include "InputCommon/ControllerInterface/Device.h"
#include "InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h" #include "InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h"
namespace ciface namespace ciface::OSX
{
namespace OSX
{ {
class Joystick : public ForceFeedback::ForceFeedbackDevice class Joystick : public ForceFeedback::ForceFeedbackDevice
{ {
@ -90,5 +88,4 @@ private:
ForceFeedback::FFDeviceAdapterReference m_ff_device; ForceFeedback::FFDeviceAdapterReference m_ff_device;
}; };
} // namespace OSX } // namespace ciface::OSX
} // namespace ciface

View File

@ -13,9 +13,7 @@
#include "Common/Logging/Log.h" #include "Common/Logging/Log.h"
#include "Common/StringUtil.h" #include "Common/StringUtil.h"
namespace ciface namespace ciface::OSX
{
namespace OSX
{ {
void Joystick::AddElements(CFArrayRef elements, std::set<IOHIDElementCookie>& cookies) void Joystick::AddElements(CFArrayRef elements, std::set<IOHIDElementCookie>& cookies)
{ {
@ -341,5 +339,4 @@ bool Joystick::IsSameDevice(const IOHIDDeviceRef other_device) const
{ {
return m_device == other_device; return m_device == other_device;
} }
} } // namespace ciface::OSX
}

View File

@ -6,9 +6,7 @@
#include <Foundation/Foundation.h> #include <Foundation/Foundation.h>
namespace ciface namespace ciface::OSX
{
namespace OSX
{ {
class RunLoopStopper class RunLoopStopper
{ {
@ -40,6 +38,4 @@ public:
CFRunLoopRemoveSource(runloop, m_source, mode); CFRunLoopRemoveSource(runloop, m_source, mode);
} }
}; };
} // namespace ciface::OSX
} // namespace OSX
} // namespace ciface

View File

@ -20,9 +20,7 @@
#include "InputCommon/ControllerInterface/ControllerInterface.h" #include "InputCommon/ControllerInterface/ControllerInterface.h"
#include "InputCommon/ControllerInterface/Pipes/Pipes.h" #include "InputCommon/ControllerInterface/Pipes/Pipes.h"
namespace ciface namespace ciface::Pipes
{
namespace Pipes
{ {
static const std::array<std::string, 12> s_button_tokens{ static const std::array<std::string, 12> s_button_tokens{
{"A", "B", "X", "Y", "Z", "START", "L", "R", "D_UP", "D_DOWN", "D_LEFT", "D_RIGHT"}}; {"A", "B", "X", "Y", "Z", "START", "L", "R", "D_UP", "D_DOWN", "D_LEFT", "D_RIGHT"}};
@ -161,5 +159,4 @@ void PipeDevice::ParseCommand(const std::string& command)
} }
} }
} }
} // namespace Pipes } // namespace ciface::Pipes
} // namespace ciface

View File

@ -8,9 +8,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
namespace ciface namespace ciface::Pipes
{
namespace Pipes
{ {
// To create a piped controller input, create a named pipe in the // To create a piped controller input, create a named pipe in the
// Pipes directory and write commands out to it. Commands are separated // Pipes directory and write commands out to it. Commands are separated
@ -58,5 +56,4 @@ private:
std::map<std::string, PipeInput*> m_buttons; std::map<std::string, PipeInput*> m_buttons;
std::map<std::string, PipeInput*> m_axes; std::map<std::string, PipeInput*> m_axes;
}; };
} // namespace Pipes } // namespace ciface::Pipes
} // namespace ciface

View File

@ -4,11 +4,8 @@
#pragma once #pragma once
namespace ciface namespace ciface::Quartz
{
namespace Quartz
{ {
void PopulateDevices(void* window); void PopulateDevices(void* window);
void DeInit(); void DeInit();
} // namespace Quartz } // namespace ciface::Quartz
} // namespace ciface

View File

@ -6,9 +6,7 @@
#include "InputCommon/ControllerInterface/ControllerInterface.h" #include "InputCommon/ControllerInterface/ControllerInterface.h"
#include "InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.h" #include "InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.h"
namespace ciface namespace ciface::Quartz
{
namespace Quartz
{ {
void PopulateDevices(void* window) void PopulateDevices(void* window)
{ {
@ -21,5 +19,4 @@ void PopulateDevices(void* window)
void DeInit() void DeInit()
{ {
} }
} // namespace Quartz } // namespace ciface::Quartz
} // namespace ciface

View File

@ -8,9 +8,7 @@
#include "InputCommon/ControllerInterface/Device.h" #include "InputCommon/ControllerInterface/Device.h"
namespace ciface namespace ciface::Quartz
{
namespace Quartz
{ {
std::string KeycodeToName(const CGKeyCode keycode); std::string KeycodeToName(const CGKeyCode keycode);
@ -73,5 +71,4 @@ private:
uint32_t m_windowid; uint32_t m_windowid;
}; };
} // namespace Quartz } // namespace ciface::Quartz
} // namespace ciface

View File

@ -9,9 +9,7 @@
#include <Carbon/Carbon.h> #include <Carbon/Carbon.h>
#include <Cocoa/Cocoa.h> #include <Cocoa/Cocoa.h>
namespace ciface namespace ciface::Quartz
{
namespace Quartz
{ {
std::string KeycodeToName(const CGKeyCode keycode) std::string KeycodeToName(const CGKeyCode keycode)
{ {
@ -223,5 +221,4 @@ std::string KeyboardAndMouse::Button::GetName() const
return "Right Click"; return "Right Click";
return std::string("Click ") + char('0' + m_button); return std::string("Click ") + char('0' + m_button);
} }
} // namespace Quartz } // namespace ciface::Quartz
} // namespace ciface

View File

@ -19,9 +19,7 @@
#pragma comment(lib, "SDL2.lib") #pragma comment(lib, "SDL2.lib")
#endif #endif
namespace ciface namespace ciface::SDL
{
namespace SDL
{ {
static std::string GetJoystickName(int index) static std::string GetJoystickName(int index)
{ {
@ -491,5 +489,4 @@ ControlState Joystick::Hat::GetState() const
{ {
return (SDL_JoystickGetHat(m_js, m_index) & (1 << m_direction)) > 0; return (SDL_JoystickGetHat(m_js, m_index) & (1 << m_direction)) > 0;
} }
} // namespace SDL } // namespace ciface::SDL
} // namespace ciface

View File

@ -16,9 +16,7 @@
#include "InputCommon/ControllerInterface/Device.h" #include "InputCommon/ControllerInterface/Device.h"
namespace ciface namespace ciface::SDL
{
namespace SDL
{ {
void Init(); void Init();
void DeInit(); void DeInit();
@ -158,5 +156,4 @@ private:
SDL_Haptic* m_haptic; SDL_Haptic* m_haptic;
#endif #endif
}; };
} // namespace SDL } // namespace ciface::SDL
} // namespace ciface

View File

@ -4,12 +4,9 @@
#pragma once #pragma once
namespace ciface namespace ciface::Win32
{
namespace Win32
{ {
void Init(void* hwnd); void Init(void* hwnd);
void PopulateDevices(void* hwnd); void PopulateDevices(void* hwnd);
void DeInit(); void DeInit();
} // namespace Win32 } // namespace ciface::Win32
} // namespace ciface

View File

@ -8,9 +8,7 @@
#define XINPUT_GAMEPAD_GUIDE 0x0400 #define XINPUT_GAMEPAD_GUIDE 0x0400
#endif #endif
namespace ciface namespace ciface::XInput
{
namespace XInput
{ {
static const struct static const struct
{ {
@ -243,5 +241,4 @@ void Device::Motor::SetState(ControlState state)
m_motor = (WORD)(state * m_range); m_motor = (WORD)(state * m_range);
m_parent->UpdateMotors(); m_parent->UpdateMotors();
} }
} // namespace XInput } // namespace ciface::XInput
} // namespace ciface

View File

@ -18,9 +18,7 @@
#error You are building this module against the wrong version of DirectX. You probably need to remove DXSDK_DIR from your include path and/or _WIN32_WINNT is wrong. #error You are building this module against the wrong version of DirectX. You probably need to remove DXSDK_DIR from your include path and/or _WIN32_WINNT is wrong.
#endif #endif
namespace ciface namespace ciface::XInput
{
namespace XInput
{ {
void Init(); void Init();
void PopulateDevices(); void PopulateDevices();
@ -105,5 +103,4 @@ private:
const BYTE m_subtype; const BYTE m_subtype;
const u8 m_index; const u8 m_index;
}; };
} // namespace XInput } // namespace ciface::XInput
} // namespace ciface

View File

@ -46,9 +46,7 @@
// more responsive. This might be useful as a user-customizable option. // more responsive. This might be useful as a user-customizable option.
#define MOUSE_AXIS_SMOOTHING 1.5f #define MOUSE_AXIS_SMOOTHING 1.5f
namespace ciface namespace ciface::XInput2
{
namespace XInput2
{ {
// This function will add zero or more KeyboardMouse objects to devices. // This function will add zero or more KeyboardMouse objects to devices.
void PopulateDevices(void* const hwnd) void PopulateDevices(void* const hwnd)
@ -369,5 +367,4 @@ ControlState KeyboardMouse::Axis::GetState() const
{ {
return std::max(0.0f, *m_axis / (m_positive ? MOUSE_AXIS_SENSITIVITY : -MOUSE_AXIS_SENSITIVITY)); return std::max(0.0f, *m_axis / (m_positive ? MOUSE_AXIS_SENSITIVITY : -MOUSE_AXIS_SENSITIVITY));
} }
} // namespace XInput2 } // namespace ciface::XInput2
} // namespace ciface

View File

@ -14,9 +14,7 @@ extern "C" {
#include "InputCommon/ControllerInterface/ControllerInterface.h" #include "InputCommon/ControllerInterface/ControllerInterface.h"
namespace ciface namespace ciface::XInput2
{
namespace XInput2
{ {
void PopulateDevices(void* const hwnd); void PopulateDevices(void* const hwnd);
@ -113,5 +111,4 @@ private:
const int pointer_deviceid, keyboard_deviceid; const int pointer_deviceid, keyboard_deviceid;
std::string name; std::string name;
}; };
} // namespace XInput2 } // namespace ciface::XInput2
} // namespace ciface

View File

@ -23,9 +23,7 @@
#include "InputCommon/ControllerInterface/ControllerInterface.h" #include "InputCommon/ControllerInterface/ControllerInterface.h"
#include "InputCommon/ControllerInterface/evdev/evdev.h" #include "InputCommon/ControllerInterface/evdev/evdev.h"
namespace ciface namespace ciface::evdev
{
namespace evdev
{ {
static std::thread s_hotplug_thread; static std::thread s_hotplug_thread;
static Common::Flag s_hotplug_thread_running; static Common::Flag s_hotplug_thread_running;
@ -499,5 +497,4 @@ evdevDevice::Effect::~Effect()
m_effect.type = DISABLED_EFFECT_TYPE; m_effect.type = DISABLED_EFFECT_TYPE;
UpdateEffect(); UpdateEffect();
} }
} // namespace evdev } // namespace ciface::evdev
} // namespace ciface

View File

@ -10,9 +10,7 @@
#include "InputCommon/ControllerInterface/ControllerInterface.h" #include "InputCommon/ControllerInterface/ControllerInterface.h"
namespace ciface namespace ciface::evdev
{
namespace evdev
{ {
void Init(); void Init();
void PopulateDevices(); void PopulateDevices();
@ -120,5 +118,4 @@ private:
std::string m_name; std::string m_name;
bool m_interesting = false; bool m_interesting = false;
}; };
} // namespace evdev } // namespace ciface::evdev
} // namespace ciface