diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index 9aadc6381f3fb..7c32f3c164f79 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -735,8 +735,7 @@ bool CApplication::Create() // Create the Mouse, Keyboard, Remote, and Joystick devices // Initialize after loading settings to get joystick deadzone setting - g_Mouse.Initialize(); - g_Mouse.SetEnabled(CSettings::Get().GetBool("input.enablemouse")); + CInputManager::Get().InitializeInputs(); @@ -2097,7 +2096,7 @@ bool CApplication::OnAction(const CAction &action) } if (action.IsMouse()) - g_Mouse.SetActive(true); + CInputManager::Get().SetMouseActive(true); if (action.GetID() == ACTION_CREATE_EPISODE_BOOKMARK) diff --git a/xbmc/SystemGlobals.cpp b/xbmc/SystemGlobals.cpp index f51e075522b2b..12fb06696e27d 100644 --- a/xbmc/SystemGlobals.cpp +++ b/xbmc/SystemGlobals.cpp @@ -56,7 +56,6 @@ CGUITextureManager g_TextureManager; CGUILargeTextureManager g_largeTextureManager; - CMouseStat g_Mouse; CGUIPassword g_passwordManager; CGUIInfoManager g_infoManager; diff --git a/xbmc/guilib/GUIControl.cpp b/xbmc/guilib/GUIControl.cpp index 164669bb120a2..edd7ee76b6d0e 100644 --- a/xbmc/guilib/GUIControl.cpp +++ b/xbmc/guilib/GUIControl.cpp @@ -26,6 +26,7 @@ #include "GUIWindowManager.h" #include "GUIControlProfiler.h" #include "input/MouseStat.h" +#include "input/InputManager.h" #include "Key.h" using namespace std; @@ -547,8 +548,8 @@ EVENT_RESULT CGUIControl::SendMouseEvent(const CPoint &point, const CMouseEvent // override this function to implement custom mouse behaviour bool CGUIControl::OnMouseOver(const CPoint &point) { - if (g_Mouse.GetState() != MOUSE_STATE_DRAG) - g_Mouse.SetState(MOUSE_STATE_FOCUS); + if (CInputManager::Get().GetMouseState() != MOUSE_STATE_DRAG) + CInputManager::Get().SetMouseState(MOUSE_STATE_FOCUS); if (!CanFocus()) return false; if (!HasFocus()) { diff --git a/xbmc/guilib/GraphicContext.cpp b/xbmc/guilib/GraphicContext.cpp index ca38fdcc4e1e1..58406f7c9d270 100644 --- a/xbmc/guilib/GraphicContext.cpp +++ b/xbmc/guilib/GraphicContext.cpp @@ -30,7 +30,7 @@ #include "cores/VideoRenderers/RenderManager.h" #include "windowing/WindowingFactory.h" #include "TextureManager.h" -#include "input/MouseStat.h" +#include "input/InputManager.h" #include "GUIWindowManager.h" #include "utils/JobManager.h" #include "video/VideoReferenceClock.h" @@ -489,7 +489,7 @@ void CGraphicContext::SetVideoResolutionInternal(RESOLUTION res, bool forceUpdat // update anyone that relies on sizing information g_renderManager.Recover(); - g_Mouse.SetResolution(info_org.iWidth, info_org.iHeight, 1, 1); + CInputManager::Get().SetMouseResolution(info_org.iWidth, info_org.iHeight, 1, 1); g_windowManager.SendMessage(GUI_MSG_NOTIFY_ALL, 0, 0, GUI_MSG_WINDOW_RESIZE); Unlock(); diff --git a/xbmc/input/InputManager.cpp b/xbmc/input/InputManager.cpp index a0e73e9df4ae6..5e2ebc915cab0 100644 --- a/xbmc/input/InputManager.cpp +++ b/xbmc/input/InputManager.cpp @@ -56,12 +56,12 @@ #include "input/SDLJoystick.h" #endif #include "ButtonTranslator.h" -#include "input/MouseStat.h" #include "peripherals/Peripherals.h" #include "XBMC_vkeys.h" #include "utils/log.h" #include "utils/StringUtils.h" #include "Util.h" +#include "settings/Settings.h" #ifdef HAS_PERFORMANCE_SAMPLE #include "utils/PerformanceSample.h" @@ -89,6 +89,9 @@ void CInputManager::InitializeInputs() #endif m_Keyboard.Initialize(); + + m_Mouse.Initialize(); + m_Mouse.SetEnabled(CSettings::Get().GetBool("input.enablemouse")); } void CInputManager::ReInitializeJoystick() @@ -140,7 +143,7 @@ bool CInputManager::ProcessGamepad(int windowId) if (CButtonTranslator::GetInstance().TranslateJoystickString(windowId, joyName, keymapId, JACTIVE_BUTTON, actionID, actionName, fullrange)) { CAction action(actionID, 1.0f, 0.0f, actionName); - g_Mouse.SetActive(false); + m_Mouse.SetActive(false); return ExecuteInputAction(action); } } @@ -165,7 +168,7 @@ bool CInputManager::ProcessGamepad(int windowId) float amount = m_Joystick.GetAmount(joyName, joyId); CAction action(actionID, fullrange ? (amount + 1.0f) / 2.0f : fabs(amount), 0.0f, actionName); - g_Mouse.SetActive(false); + m_Mouse.SetActive(false); return ExecuteInputAction(action); } } @@ -192,7 +195,7 @@ bool CInputManager::ProcessGamepad(int windowId) if (keymapId && CButtonTranslator::GetInstance().TranslateJoystickString(windowId, joyName, keymapId, JACTIVE_HAT, actionID, actionName, fullrange)) { CAction action(actionID, 1.0f, 0.0f, actionName); - g_Mouse.SetActive(false); + m_Mouse.SetActive(false); return ExecuteInputAction(action); } } @@ -225,11 +228,11 @@ bool CInputManager::ProcessMouse(int windowId) { MEASURE_FUNCTION; - if (!g_Mouse.IsActive() || !g_application.IsAppFocused()) + if (!m_Mouse.IsActive() || !g_application.IsAppFocused()) return false; // Get the mouse command ID - uint32_t mousekey = g_Mouse.GetKey(); + uint32_t mousekey = m_Mouse.GetKey(); if (mousekey == KEY_MOUSE_NOOP) return true; @@ -246,7 +249,7 @@ bool CInputManager::ProcessMouse(int windowId) // Deactivate mouse if non-mouse action if (!mouseaction.IsMouse()) - g_Mouse.SetActive(false); + m_Mouse.SetActive(false); // Consume ACTION_NOOP. // Some views or dialogs gets closed after any ACTION and @@ -274,11 +277,11 @@ bool CInputManager::ProcessMouse(int windowId) // This is a mouse action so we need to record the mouse position return g_application.OnAction(CAction(mouseaction.GetID(), - g_Mouse.GetHold(MOUSE_LEFT_BUTTON), - (float)g_Mouse.GetX(), - (float)g_Mouse.GetY(), - (float)g_Mouse.GetDX(), - (float)g_Mouse.GetDY(), + m_Mouse.GetHold(MOUSE_LEFT_BUTTON), + (float)m_Mouse.GetX(), + (float)m_Mouse.GetY(), + (float)m_Mouse.GetDX(), + (float)m_Mouse.GetDY(), mouseaction.GetName())); } @@ -372,7 +375,7 @@ bool CInputManager::ProcessEventServer(int windowId, float frameTime) { CPoint pos; - if (es->GetMousePos(pos.x, pos.y) && g_Mouse.IsEnabled()) + if (es->GetMousePos(pos.x, pos.y) && m_Mouse.IsEnabled()) { XBMC_Event newEvent; newEvent.type = XBMC_MOUSEMOTION; @@ -399,7 +402,7 @@ bool CInputManager::ProcessJoystickEvent(int windowId, const std::string& joysti if (g_application.WakeUpScreenSaverAndDPMS()) return true; - g_Mouse.SetActive(false); + m_Mouse.SetActive(false); int actionID; std::string actionName; @@ -428,7 +431,7 @@ bool CInputManager::OnEvent(XBMC_Event& newEvent) case XBMC_MOUSEBUTTONDOWN: case XBMC_MOUSEBUTTONUP: case XBMC_MOUSEMOTION: - g_Mouse.HandleEvent(newEvent); + m_Mouse.HandleEvent(newEvent); ProcessMouse(g_windowManager.GetActiveWindowID()); break; case XBMC_TOUCH: @@ -477,7 +480,7 @@ bool CInputManager::OnKey(const CKey& key) { // Turn the mouse off, as we've just got a keypress from controller or remote - g_Mouse.SetActive(false); + m_Mouse.SetActive(false); // get the current active window int iWin = g_windowManager.GetActiveWindowID(); @@ -662,3 +665,38 @@ bool CInputManager::ExecuteInputAction(const CAction &action) } return bResult; } + +void CInputManager::SetMouseActive(bool active /* = true */) +{ + m_Mouse.SetActive(active); +} + +void CInputManager::SetMouseEnabled(bool mouseEnabled /* = true */) +{ + m_Mouse.SetEnabled(mouseEnabled); +} + +bool CInputManager::IsMouseActive() +{ + return m_Mouse.IsActive(); +} + +MOUSE_STATE CInputManager::GetMouseState() +{ + return m_Mouse.GetState(); +} + +MousePosition CInputManager::GetMousePosition() +{ + return m_Mouse.GetPosition(); +} + +void CInputManager::SetMouseResolution(int maxX, int maxY, float speedX, float speedY) +{ + m_Mouse.SetResolution(maxX, maxY, speedX, speedY); +} + +void CInputManager::SetMouseState(MOUSE_STATE mouseState) +{ + m_Mouse.SetState(mouseState); +} diff --git a/xbmc/input/InputManager.h b/xbmc/input/InputManager.h index 3d0967c82d3a5..d86fbf9ababfd 100644 --- a/xbmc/input/InputManager.h +++ b/xbmc/input/InputManager.h @@ -30,6 +30,7 @@ #include "windowing/XBMC_events.h" #include "guilib/Key.h" #include "input/KeyboardStat.h" +#include "input/MouseStat.h" class CInputManager { @@ -114,6 +115,55 @@ class CInputManager */ bool OnEvent(XBMC_Event& newEvent); + /*! \brief Control if the mouse is actively used or not + * + * \param[in] active sets mouse active or inactive + */ + void SetMouseActive(bool active = true); + + /*! \brief Control if we should use a mouse or not + * + * \param[in] mouseEnabled sets mouse enabled or disabled + */ + void SetMouseEnabled(bool mouseEnabled = true); + + /*! \brief Set the current state of the mouse such as click, drag operation + * + * \param[in] mouseState which state the mouse should be set to + * \sa MOUSE_STATE + */ + void SetMouseState(MOUSE_STATE mouseState); + + /*! \brief Check if the mouse is currently active + * + * \return true if active, false otherwise + */ + bool IsMouseActive(); + + /*! \brief Get the current state of the mouse, such as click or drag operation + * + * \return the current state of the mouse as a value from MOUSE_STATE + * \sa MOUSE_STATE + */ + MOUSE_STATE GetMouseState(); + + /*! \brief Get the current mouse positions x and y coordinates + * + * \return a struct containing the x and y coordinates + * \sa MousePosition + */ + MousePosition GetMousePosition(); + + /*! \brief Set the current screen resolution and pointer speed + * + * \param[in] maxX screen width + * \param[in] maxY screen height + * \param[in] speedX mouse speed in x dimension + * \param[in] speedY mouse speed in y dimension + * \return + */ + void SetMouseResolution(int maxX, int maxY, float speedX, float speedY); + private: /*! \brief Process keyboard event and translate into an action @@ -143,6 +193,7 @@ class CInputManager bool ExecuteInputAction(const CAction &action); CKeyboardStat m_Keyboard; + CMouseStat m_Mouse; #ifdef HAS_EVENT_SERVER std::map > m_lastAxisMap; diff --git a/xbmc/input/MouseStat.h b/xbmc/input/MouseStat.h index 1838cd359ea65..8fd76ab8013ac 100644 --- a/xbmc/input/MouseStat.h +++ b/xbmc/input/MouseStat.h @@ -44,7 +44,13 @@ #define MOUSE_MAX_BUTTON 5 -enum MOUSE_STATE { MOUSE_STATE_NORMAL = 1, MOUSE_STATE_FOCUS, MOUSE_STATE_DRAG, MOUSE_STATE_CLICK }; +enum MOUSE_STATE +{ + MOUSE_STATE_NORMAL = 1, /*! < Normal state */ + MOUSE_STATE_FOCUS, /*! < Control below the mouse is currently in focus */ + MOUSE_STATE_DRAG, /*! < A drag operation is being performed */ + MOUSE_STATE_CLICK /*! < A mousebutton is being clicked */ +}; enum MOUSE_BUTTON { MOUSE_LEFT_BUTTON = 0, MOUSE_RIGHT_BUTTON, MOUSE_MIDDLE_BUTTON, MOUSE_EXTRA_BUTTON1, MOUSE_EXTRA_BUTTON2 }; // this holds everything we know about the current state of the mouse @@ -59,6 +65,12 @@ struct MouseState bool active; // true if the mouse is active }; +struct MousePosition +{ + int x; + int y; +}; + class CAction; class CMouseStat : public ISettingCallback @@ -86,6 +98,7 @@ class CMouseStat : public ISettingCallback inline int GetY(void) const { return m_mouseState.y; } inline int GetDX(void) const { return m_mouseState.dx; } inline int GetDY(void) const { return m_mouseState.dy; } + MousePosition GetPosition() { return MousePosition{ m_mouseState.x, m_mouseState.y }; } private: /*! \brief Holds information regarding a particular mouse button state @@ -175,8 +188,6 @@ class CMouseStat : public ISettingCallback uint32_t m_Key; }; -extern CMouseStat g_Mouse; - #endif diff --git a/xbmc/music/dialogs/GUIDialogMusicOSD.cpp b/xbmc/music/dialogs/GUIDialogMusicOSD.cpp index 922651230a7a8..0bade7f62a5b5 100644 --- a/xbmc/music/dialogs/GUIDialogMusicOSD.cpp +++ b/xbmc/music/dialogs/GUIDialogMusicOSD.cpp @@ -21,7 +21,7 @@ #include "GUIDialogMusicOSD.h" #include "guilib/GUIWindowManager.h" #include "guilib/Key.h" -#include "input/MouseStat.h" +#include "input/InputManager.h" #include "GUIUserMessages.h" #include "settings/Settings.h" #include "addons/GUIWindowAddonBrowser.h" @@ -88,8 +88,9 @@ void CGUIDialogMusicOSD::FrameMove() if (m_autoClosing) { // check for movement of mouse or a submenu open - if (g_Mouse.IsActive() || g_windowManager.IsWindowActive(WINDOW_DIALOG_VIS_SETTINGS) - || g_windowManager.IsWindowActive(WINDOW_DIALOG_VIS_PRESET_LIST)) + if (CInputManager::Get().IsMouseActive() || + g_windowManager.IsWindowActive(WINDOW_DIALOG_VIS_SETTINGS) || + g_windowManager.IsWindowActive(WINDOW_DIALOG_VIS_PRESET_LIST)) // extend show time by original value SetAutoClose(m_showDuration); } diff --git a/xbmc/music/dialogs/GUIDialogMusicOverlay.cpp b/xbmc/music/dialogs/GUIDialogMusicOverlay.cpp index 0c90dd28493e4..7511cd4038432 100644 --- a/xbmc/music/dialogs/GUIDialogMusicOverlay.cpp +++ b/xbmc/music/dialogs/GUIDialogMusicOverlay.cpp @@ -22,6 +22,7 @@ #include "guilib/GUIWindowManager.h" #include "guilib/Key.h" #include "input/MouseStat.h" +#include "input/InputManager.h" #define CONTROL_LOGO_PIC 1 @@ -58,7 +59,7 @@ EVENT_RESULT CGUIDialogMusicOverlay::OnMouseEvent(const CPoint &point, const CMo if (pControl && pControl->HitTest(point)) { // send highlight message - g_Mouse.SetState(MOUSE_STATE_FOCUS); + CInputManager::Get().SetMouseState(MOUSE_STATE_FOCUS); if (event.m_id == ACTION_MOUSE_LEFT_CLICK) { // send mouse message CGUIMessage message(GUI_MSG_FULLSCREEN, CONTROL_LOGO_PIC, GetID()); diff --git a/xbmc/profiles/ProfilesManager.cpp b/xbmc/profiles/ProfilesManager.cpp index e9b229514b70b..5098fb6987c9f 100644 --- a/xbmc/profiles/ProfilesManager.cpp +++ b/xbmc/profiles/ProfilesManager.cpp @@ -35,7 +35,7 @@ #include "guilib/GUIWindowManager.h" #include "guilib/LocalizeStrings.h" #include "input/ButtonTranslator.h" -#include "input/MouseStat.h" +#include "input/InputManager.h" #include "settings/Settings.h" #if !defined(TARGET_WINDOWS) && defined(HAS_DVD_DRIVE) #include "storage/DetectDVDType.h" @@ -262,7 +262,7 @@ bool CProfilesManager::LoadProfile(size_t index) CDatabaseManager::Get().Initialize(); - g_Mouse.SetEnabled(CSettings::Get().GetBool("input.enablemouse")); + CInputManager::Get().SetMouseEnabled(CSettings::Get().GetBool("input.enablemouse")); g_infoManager.ResetCache(); g_infoManager.ResetLibraryBools(); diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp index 6cbdfb12e03cd..7696a83a822da 100644 --- a/xbmc/settings/Settings.cpp +++ b/xbmc/settings/Settings.cpp @@ -274,7 +274,7 @@ void CSettings::Uninitialize() #if defined(TARGET_WINDOWS) || defined(HAS_SDL_JOYSTICK) m_settingsManager->UnregisterCallback(&CInputManager::Get().m_Joystick); #endif - m_settingsManager->UnregisterCallback(&g_Mouse); + m_settingsManager->UnregisterCallback(&CInputManager::Get().m_Mouse); m_settingsManager->UnregisterCallback(&CNetworkServices::Get()); m_settingsManager->UnregisterCallback(&g_passwordManager); m_settingsManager->UnregisterCallback(&PVR::g_PVRManager); @@ -767,7 +767,7 @@ void CSettings::InitializeISettingCallbacks() settingSet.clear(); settingSet.insert("input.enablemouse"); - m_settingsManager->RegisterCallback(&g_Mouse, settingSet); + m_settingsManager->RegisterCallback(&CInputManager::Get().m_Mouse, settingSet); settingSet.clear(); settingSet.insert("services.webserver"); diff --git a/xbmc/video/dialogs/GUIDialogVideoOSD.cpp b/xbmc/video/dialogs/GUIDialogVideoOSD.cpp index d5a9fc1e0205e..73a1004ed1d36 100644 --- a/xbmc/video/dialogs/GUIDialogVideoOSD.cpp +++ b/xbmc/video/dialogs/GUIDialogVideoOSD.cpp @@ -24,7 +24,7 @@ #include "GUIUserMessages.h" #include "guilib/GUIWindowManager.h" #include "guilib/Key.h" -#include "input/MouseStat.h" +#include "input/InputManager.h" #include "cores/IPlayer.h" #include "pvr/PVRManager.h" @@ -47,7 +47,8 @@ void CGUIDialogVideoOSD::FrameMove() if (m_autoClosing) { // check for movement of mouse or a submenu open - if (g_Mouse.IsActive() || g_windowManager.IsWindowActive(WINDOW_DIALOG_AUDIO_OSD_SETTINGS) + if (CInputManager::Get().IsMouseActive() + || g_windowManager.IsWindowActive(WINDOW_DIALOG_AUDIO_OSD_SETTINGS) || g_windowManager.IsWindowActive(WINDOW_DIALOG_VIDEO_OSD_SETTINGS) || g_windowManager.IsWindowActive(WINDOW_DIALOG_VIDEO_BOOKMARKS) || g_windowManager.IsWindowActive(WINDOW_DIALOG_PVR_OSD_CHANNELS) diff --git a/xbmc/windowing/WinEventsSDL.cpp b/xbmc/windowing/WinEventsSDL.cpp index 44e82f6baedd6..133cf30793e26 100644 --- a/xbmc/windowing/WinEventsSDL.cpp +++ b/xbmc/windowing/WinEventsSDL.cpp @@ -346,7 +346,7 @@ bool CWinEventsSDL::MessagePump() { if (0 == (SDL_GetAppState() & SDL_APPMOUSEFOCUS)) { - g_Mouse.SetActive(false); + CInputManager::Get().SetMouseActive(false); #if defined(TARGET_DARWIN_OSX) // See CApplication::ProcessSlow() for a description as to why we call Cocoa_HideMouse. // this is here to restore the pointer when toggling back to window mode from fullscreen. diff --git a/xbmc/windowing/WinEventsX11.cpp b/xbmc/windowing/WinEventsX11.cpp index 2b75cc98fb206..1230b215a9e8c 100644 --- a/xbmc/windowing/WinEventsX11.cpp +++ b/xbmc/windowing/WinEventsX11.cpp @@ -542,7 +542,7 @@ bool CWinEventsX11Imp::MessagePump() // lose mouse coverage case LeaveNotify: { - g_Mouse.SetActive(false); + CInputManager::Get().SetMouseActive(false); break; } diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp index 347c3ae20e86e..715072451d071 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -46,7 +46,7 @@ #endif #include "../WinEventsX11.h" -#include "input/MouseStat.h" +#include "input/InputManager.h" using namespace std; @@ -993,7 +993,7 @@ bool CWinSystemX11::SetWindow(int width, int height, bool fullscreen, const std: if (!m_mainWindow) { - g_Mouse.SetActive(false); + CInputManager::Get().SetMouseActive(false); } if (m_mainWindow && ((m_bFullScreen != fullscreen) || m_currentOutput.compare(output) != 0 || m_windowDirty)) @@ -1023,7 +1023,7 @@ bool CWinSystemX11::SetWindow(int width, int height, bool fullscreen, const std: } } - g_Mouse.SetActive(false); + CInputManager::Get().SetMouseActive(false); OnLostDevice(); DestroyWindow(); m_windowDirty = true; diff --git a/xbmc/windows/GUIWindowFileManager.cpp b/xbmc/windows/GUIWindowFileManager.cpp index 8421af925b7ea..248e4023888be 100644 --- a/xbmc/windows/GUIWindowFileManager.cpp +++ b/xbmc/windows/GUIWindowFileManager.cpp @@ -48,7 +48,7 @@ #include "settings/AdvancedSettings.h" #include "settings/MediaSourceSettings.h" #include "settings/Settings.h" -#include "input/MouseStat.h" +#include "input/InputManager.h" #include "guilib/LocalizeStrings.h" #include "utils/StringUtils.h" #include "utils/log.h" @@ -293,7 +293,7 @@ bool CGUIWindowFileManager::OnMessage(CGUIMessage& message) if (iAction == ACTION_HIGHLIGHT_ITEM || iAction == ACTION_MOUSE_LEFT_CLICK) { OnMark(list, iItem); - if (!g_Mouse.IsActive()) + if (!CInputManager::Get().IsMouseActive()) { //move to next item CGUIMessage msg(GUI_MSG_ITEM_SELECT, GetID(), iControl, iItem + 1); diff --git a/xbmc/windows/GUIWindowPointer.cpp b/xbmc/windows/GUIWindowPointer.cpp index eb12cf96b1b49..98dc7c4c3b873 100644 --- a/xbmc/windows/GUIWindowPointer.cpp +++ b/xbmc/windows/GUIWindowPointer.cpp @@ -20,6 +20,7 @@ #include "GUIWindowPointer.h" #include "input/MouseStat.h" +#include "input/InputManager.h" #include "windowing/WindowingFactory.h" #include #define ID_POINTER 10 @@ -58,7 +59,7 @@ void CGUIWindowPointer::UpdateVisibility() { if(g_Windowing.HasCursor()) { - if (g_Mouse.IsActive()) + if (CInputManager::Get().IsMouseActive()) Show(); else Close(); @@ -80,13 +81,14 @@ void CGUIWindowPointer::OnWindowLoaded() void CGUIWindowPointer::Process(unsigned int currentTime, CDirtyRegionList &dirtyregions) { - bool active = g_Mouse.IsActive(); + bool active = CInputManager::Get().IsMouseActive(); if (active != m_active) { MarkDirtyRegion(); m_active = active; } - SetPosition((float)g_Mouse.GetX(), (float)g_Mouse.GetY()); - SetPointer(g_Mouse.GetState()); + MousePosition pos = CInputManager::Get().GetMousePosition(); + SetPosition((float)pos.x, (float)pos.y); + SetPointer(CInputManager::Get().GetMouseState()); return CGUIWindow::Process(currentTime, dirtyregions); }