RimWorld

RimWorld

37 ratings
Mouse Drag Lag Fix (Linux)
7
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.4, 1.5, 1.6
File Size
Posted
Updated
467.240 KB
7 Jun, 2023 @ 10:22am
7 Aug @ 9:14am
6 Change Notes ( view )

Subscribe to download
Mouse Drag Lag Fix (Linux)

Description
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.
33 Comments
Rightimar 15 Jul @ 2:16pm 
my fps savior
Lefty Flip 15 Jul @ 12:55pm 
Works for me on 1.6
Damglador 13 Jul @ 8:22pm 
Oh man, this mod is a bless. Thank you!
Saiphe 12 Jul @ 4:15pm 
Btw if you run the game native - you need this mod, if you use proton GE you dont need this mod.
Chibi Shinku 12 Jul @ 5:56am 
Thank you so, so much for this. The world map lagged so bad for me until I used this. Thank you!
Aleios 11 Jul @ 6:33pm 
I can't believe this is still necessary. Unity engine really is a piece of heaving garbage.
Agustinso 15 Jun @ 12:54pm 
For anyone wondering, this seems to be working in 1.6. At least on my end
Almantuxas  [author] 3 May @ 10:39am 
@Jaydak hmm, that sounds like I should try and find a way to affect every UI element with only a single patch, since people did mention scroll bars aren't affected, but that'll probably happen once I start playing RimWorld again and become annoyed.
Jaydak 3 May @ 12:12am 
This mod works wonderfully to alleviate most cases of the mouse drag issue! What a lifesaver, thank you!

Just want to share that the mouse drag issue persists on windows created by mods (Dubs Mint Minimap & Moody are two examples).
Stein 2 Apr @ 2:03pm 
Many thanks, thought I had a broken mod somewhere that was causing the issue.