Generate absolute mouse coords when imgui tools are active

This commit is contained in:
Aleksey Medvedev 2024-01-22 23:43:29 +07:00
parent ab663a769f
commit ee73078db1

View file

@ -1216,7 +1216,7 @@ sysEvent_t Sys_GetEvent()
case SDL_MOUSEMOTION:
// DG: return event with absolute mouse-coordinates when in menu
// to fix cursor problems in windowed mode
if( game && game->Shell_IsActive() )
if( game && ( game->Shell_IsActive() || ImGuiTools::ReleaseMouseForTools() ) )
{
res.evType = SE_MOUSE_ABSOLUTE;
res.evValue = ev.motion.x;