Mouse Drag Lag Fix (Linux)
Version 1.4 - Updated to RimWorld 1.6 Current problem reports: - Breaks camera controls, dragging anyhow but up on Windows; - Breaks Achtung! drag functionality. Fixes lag from mouse dragging (hold + move) mostly reported by Linux RimWorld players (do not use this mod for Windows
Version 1.4 - Updated to RimWorld 1.6
Current problem reports:
- Breaks camera controls, dragging anyhow but up on Windows;
- Breaks Achtung! drag functionality.
Fixes lag from mouse dragging (hold + move) mostly reported by Linux RimWorld players (do not use this mod for Windows, assume it breaks something). Bug and incompatibility reports are extremely appreciated.
The issue is that Unity calls RimWorld's GUI to update whenever the mouse (or touchpad) reports a new position while dragging, thus mouses that report their movement more often thus cause more events, more redraws and thus more lag. This fix is to patch RimWorld's Root GUI to update only from one of the mouse drag event for every mouse-down or redraw event.
This is a band-aid fix and the issue cannot be fully fixed on RimWorld's side as Unity offers no control over the event system, and my attempts to jerry-rig control break the base Unity GUI because of its assumptions about the event system.