Codechange: Disable pointer locking by default #9191
Motivation / Problem
This PR changes the default scroll mode so that pointer locking is not used by default, resolving the bad UX for the Emscripten port.
As this is a breaking change and needs further discussion, it's currently a draft.
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.
There are two kinds of "decorated" mouse cursors. The basic are single-sprite cursors, those are most of the construction tools. In the original graphics the construction tool is integrated in the cursor itself:
In OpenGFX the tool appears to be a separate sprite next to the cursor, but it's actually still a single sprite:
When you drag a vehicle in a depot, the vehicle graphics is used for the mouse cursor instead, the cursor is still only a single sprite then.
@nielsmh Hmm... I see what you mean. In that case, I think there will need to be an Emscripten-specific code path added for the cursor rendering, as the only way I know of to change the cursor appearance without having OpenTTD draw it itself is to use CSS.
I've discovered that adding
The side effect is that the cursor rendering will now be dependent on OpenTTD's frame rate, but that's also how it works on the normal ports. On my machine I don't see any noticeable lag while testing it.