Merge pull request #852 from reeFridge/fix/850-abs-mouse-coords-for-tools

Generate absolute mouse coords when imgui tools are active
This commit is contained in:
Robert Beckebans 2024-02-25 12:05:29 +01:00 committed by GitHub
commit 65069c68e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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;