mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
(WinRaw) Fix mouse position when using input overlay with mouse cursor (#14659)
This commit is contained in:
parent
9bc7bebf51
commit
ce1e59615a
@ -413,9 +413,20 @@ static void winraw_update_mouse_state(winraw_input_t *wr,
|
|||||||
if (menu_state_get_ptr()->flags & MENU_ST_FLAG_ALIVE)
|
if (menu_state_get_ptr()->flags & MENU_ST_FLAG_ALIVE)
|
||||||
getcursorpos = true;
|
getcursorpos = true;
|
||||||
#endif
|
#endif
|
||||||
|
/* Input overlay with mouse cursor must also use GetCursorPos() */
|
||||||
|
if (!getcursorpos)
|
||||||
|
{
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
|
if ( settings->bools.input_overlay_enable
|
||||||
|
&& settings->bools.input_overlay_show_mouse_cursor)
|
||||||
|
getcursorpos = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (getcursorpos)
|
if (getcursorpos)
|
||||||
{
|
{
|
||||||
|
InterlockedExchangeAdd(&mouse->dlt_x, state->lLastX);
|
||||||
|
InterlockedExchangeAdd(&mouse->dlt_y, state->lLastY);
|
||||||
|
|
||||||
if (!GetCursorPos(&crs_pos))
|
if (!GetCursorPos(&crs_pos))
|
||||||
RARCH_DBG("[WinRaw]: GetCursorPos failed with error %lu.\n", GetLastError());
|
RARCH_DBG("[WinRaw]: GetCursorPos failed with error %lu.\n", GetLastError());
|
||||||
else if (!ScreenToClient((HWND)video_driver_window_get(), &crs_pos))
|
else if (!ScreenToClient((HWND)video_driver_window_get(), &crs_pos))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user