diff options
author | Garrett Brown <themagnificentmrb@gmail.com> | 2023-02-23 02:58:05 -0800 |
---|---|---|
committer | Garrett Brown <themagnificentmrb@gmail.com> | 2023-03-02 18:08:56 -0800 |
commit | 5cfb714ed499252adde1ebb9ca32ac93d1d364fd (patch) | |
tree | 3ab03f2b075cb66b4a3fd96ee5107b5419156d59 | |
parent | 66e1dab2a4f72f123d54956ed222a2a99c9bce48 (diff) |
Peripherals: Remove dependency on ServiceBroker.h
-rw-r--r-- | xbmc/peripherals/devices/PeripheralJoystick.cpp | 5 | ||||
-rw-r--r-- | xbmc/peripherals/devices/PeripheralKeyboard.cpp | 5 | ||||
-rw-r--r-- | xbmc/peripherals/devices/PeripheralMouse.cpp | 5 |
3 files changed, 6 insertions, 9 deletions
diff --git a/xbmc/peripherals/devices/PeripheralJoystick.cpp b/xbmc/peripherals/devices/PeripheralJoystick.cpp index 0f5cfce98f..3ebd5658a7 100644 --- a/xbmc/peripherals/devices/PeripheralJoystick.cpp +++ b/xbmc/peripherals/devices/PeripheralJoystick.cpp @@ -8,11 +8,11 @@ #include "PeripheralJoystick.h" -#include "ServiceBroker.h" #include "application/Application.h" #include "games/GameServices.h" #include "games/controllers/Controller.h" #include "games/controllers/ControllerIDs.h" +#include "games/controllers/ControllerManager.h" #include "input/InputManager.h" #include "input/joysticks/DeadzoneFilter.h" #include "input/joysticks/JoystickMonitor.h" @@ -205,8 +205,7 @@ GAME::ControllerPtr CPeripheralJoystick::ControllerProfile() const { //! @todo Allow the user to change which controller profile represents their // controller. For now, just use the default. - GAME::CGameServices& gameServices = CServiceBroker::GetGameServices(); - return gameServices.GetDefaultController(); + return m_manager.GetControllerProfiles().GetDefaultController(); } bool CPeripheralJoystick::OnButtonMotion(unsigned int buttonIndex, bool bPressed) diff --git a/xbmc/peripherals/devices/PeripheralKeyboard.cpp b/xbmc/peripherals/devices/PeripheralKeyboard.cpp index 283d9650f3..61e0355230 100644 --- a/xbmc/peripherals/devices/PeripheralKeyboard.cpp +++ b/xbmc/peripherals/devices/PeripheralKeyboard.cpp @@ -8,9 +8,9 @@ #include "PeripheralKeyboard.h" -#include "ServiceBroker.h" #include "games/GameServices.h" #include "games/controllers/Controller.h" +#include "games/controllers/ControllerManager.h" #include "input/InputManager.h" #include "peripherals/Peripherals.h" @@ -81,8 +81,7 @@ void CPeripheralKeyboard::UnregisterKeyboardDriverHandler( GAME::ControllerPtr CPeripheralKeyboard::ControllerProfile() const { - GAME::CGameServices& gameServices = CServiceBroker::GetGameServices(); - return gameServices.GetDefaultKeyboard(); + return m_manager.GetControllerProfiles().GetDefaultKeyboard(); } bool CPeripheralKeyboard::OnKeyPress(const CKey& key) diff --git a/xbmc/peripherals/devices/PeripheralMouse.cpp b/xbmc/peripherals/devices/PeripheralMouse.cpp index 1c4f49d1e9..9809616ca7 100644 --- a/xbmc/peripherals/devices/PeripheralMouse.cpp +++ b/xbmc/peripherals/devices/PeripheralMouse.cpp @@ -8,9 +8,9 @@ #include "PeripheralMouse.h" -#include "ServiceBroker.h" #include "games/GameServices.h" #include "games/controllers/Controller.h" +#include "games/controllers/ControllerManager.h" #include "input/InputManager.h" #include "peripherals/Peripherals.h" @@ -76,8 +76,7 @@ void CPeripheralMouse::UnregisterMouseDriverHandler(MOUSE::IMouseDriverHandler* GAME::ControllerPtr CPeripheralMouse::ControllerProfile() const { - GAME::CGameServices& gameServices = CServiceBroker::GetGameServices(); - return gameServices.GetDefaultMouse(); + return m_manager.GetControllerProfiles().GetDefaultMouse(); } bool CPeripheralMouse::OnPosition(int x, int y) |