diff options
| author | Lioncash <mathew1800@gmail.com> | 2019-11-22 15:55:11 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2019-11-22 15:56:29 -0500 |
| commit | 67097b45742b08faf9b3440f70e2871b5aecd95e (patch) | |
| tree | 2f183467dd5b9988c87bd8237541bcd9ee3f1c98 /Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp | |
| parent | 4488719a761243bf6de95b6608d6ef6a780b7bd0 (diff) | |
InputCommon/DualShockUDPClient: Relocate settings to top of source file
This is a small namespace, so we can move it to the top of the file to
get it out of the way of everything else.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp b/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp index b98e9d42bd..7af3bc17ae 100644 --- a/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp +++ b/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp @@ -24,6 +24,19 @@ namespace ciface::DualShockUDPClient { +namespace Settings +{ +constexpr char DEFAULT_SERVER_ADDRESS[] = "127.0.0.1"; +constexpr u16 DEFAULT_SERVER_PORT = 26760; + +const Config::ConfigInfo<bool> SERVER_ENABLED{ + {Config::System::DualShockUDPClient, "Server", "Enabled"}, false}; +const Config::ConfigInfo<std::string> SERVER_ADDRESS{ + {Config::System::DualShockUDPClient, "Server", "IPAddress"}, DEFAULT_SERVER_ADDRESS}; +const Config::ConfigInfo<int> SERVER_PORT{{Config::System::DualShockUDPClient, "Server", "Port"}, + DEFAULT_SERVER_PORT}; +} // namespace Settings + class Device : public Core::Device { private: @@ -110,22 +123,10 @@ private: }; using MathUtil::GRAVITY_ACCELERATION; -static constexpr char DEFAULT_SERVER_ADDRESS[] = "127.0.0.1"; -static constexpr u16 DEFAULT_SERVER_PORT = 26760; -static constexpr auto SERVER_REREGISTER_INTERVAL = std::chrono::seconds{1}; -static constexpr auto SERVER_LISTPORTS_INTERVAL = std::chrono::seconds{1}; -static constexpr int TOUCH_X_AXIS_MAX = 1000; -static constexpr int TOUCH_Y_AXIS_MAX = 500; - -namespace Settings -{ -const Config::ConfigInfo<bool> SERVER_ENABLED{ - {Config::System::DualShockUDPClient, "Server", "Enabled"}, false}; -const Config::ConfigInfo<std::string> SERVER_ADDRESS{ - {Config::System::DualShockUDPClient, "Server", "IPAddress"}, DEFAULT_SERVER_ADDRESS}; -const Config::ConfigInfo<int> SERVER_PORT{{Config::System::DualShockUDPClient, "Server", "Port"}, - DEFAULT_SERVER_PORT}; -} // namespace Settings +constexpr auto SERVER_REREGISTER_INTERVAL = std::chrono::seconds{1}; +constexpr auto SERVER_LISTPORTS_INTERVAL = std::chrono::seconds{1}; +constexpr int TOUCH_X_AXIS_MAX = 1000; +constexpr int TOUCH_Y_AXIS_MAX = 500; static bool s_server_enabled; static std::string s_server_address; |
