Middle mouse button click rotation of buildings doesn't work always after B19

Started by Lobstercraft, February 21, 2020, 07:34:36 AM

Previous topic - Next topic

Lobstercraft

(Linux Ubuntu) Middle mouse button click rotation of buildings doesn't work always in newer versions. I can click on something in the menu with the middle mouse button and it's always registered but not the rotation of buildings. I tested it on beta18 and 19 branch again and it's working there always. My mouse is a Logitech M110 Silent if that has any relevance.
And I found out others have that problem too:
https://steamcommunity.com/app/294100/discussions/0/1736595227844756802/

That one is on Windows
https://ludeon.com/forums/index.php?topic=42297.msg416261#msg416261

Ark

This happens to me, too. Didn't even know that middle mouse button is supposed to rotate, it can take 20+ clicks, or it might rotate on the first click.
RimWorld 1.1.2552 rev603 drm-free version on Linux Mint 19.3 Xfce. Tried with a Logitech G300s mouse and a generic HP mouse.

Edit: Still exists in 1.1.2560 rev1172.

Ark

I think I figured it out, the bench rotates on mouseUp if the time between mouseDown and mouseUp is under 150 ms. Bumping that figure up to 200 ms should do the trick.
The mousewheel tends to be a bit slower to click, also I'm right handed, but tend to mouse with left hand, usually giving timing in 160-180 ms range.
Included baby's first awk program used to print timing, requires ts from moreutils. Turn "Log input" on from debug menu. Millisecond timing is a ballpark figure, of course.
RimWorld 1.1.2562 rev561 Linux drm-free version.

#!/bin/bash
GAMEFILE="RimWorldLinux"
LC_ALL=C ./${GAMEFILE} -logfile mousetime.log -savedatafolder=Saves -quicktest -force-opengl&
tail -Fn0 --pid=`pgrep -f "./${GAMEFILE} -logfile mousetime.log -savedatafolder=Saves -quicktest -force-opengl"` mousetime.log |ts "%.s"|awk '/Frame|type/ {
if ($2=="Frame") {oldframe=newframe;newframe=strtonum($3)}
if ($2=="type=mouseDown") timer=$1
if ($2=="type=mouseUp") print $1*1000-timer*1000 "ms " newframe-oldframe " frames\n"
}'