Author Topic: 2015-01-26 released  (Read 10637 times)

0 Members and 1 Guest are viewing this topic.

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: 2015-01-30 released
« Reply #15 on: February 03, 2015, 05:49:53 AM »
Hi, thanks everyone. :-)

The slow mouse was reported independently by 3 people now, namida and ccx here, plus Ramond in IRC yesterday. All 3 don't use fullscreen regularly, and can't tell for sure whether it's been like that before. You can try these things:
  • Run geoo's build of 2015-01-30 for comparison, extract this into where the normal .exe sits.
  • Make sure you run 2015-02-* with the same global options and user options as the versions before. If you have unzipped the new version over the old one, it's guaranteed to use your old settings. If you have unzipped to a fresh directory, erase the data dir and replace it with the one from your old installation.
  • Go to your user file in data/user/ and set $MOUSE_ACCELERATION 1 instead of 0. I don't like this acceleration at all, but maybe you guys have been used to it. This hidden switch exists since 2014-07-06 with default value 0.
  • Run this testing version 2015-02-03-02. This reverts some of Sekti's mouse code from 2014-07-06. The hidden switch MOUSE_ACCELERATION is still present, try both settings for it.
  • Run this testing version 2015-02-03-03. This still uses Sekti's code, which doesn't seem to be the problem. You can now raise the mouse speed to a maximum of 80, not 40. Also, the ccexplore-described console doesn't open anymore.
  • Set your mouse speed to something higher in the game's options.
I haven't experienced a slow mouse durign fullscreen in Wine.

Quote from: ccexplore
The extra console window is definitely unique to Simon's build though.

There are some linker settings to get rid of that. Otherwise, this extra console is normal on Windows. I will add the settings to the makefile. The test version 2015-02-03-03 above doesn't have the extra console anymore, the relevant linker switches are --subsystem,windows -mwindows.

-- Simon
« Last Edit: February 03, 2015, 08:43:53 AM by Simon »

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: 2015-01-26 released
« Reply #16 on: February 12, 2015, 02:44:46 AM »
I broke down and downloaded the Allegro source code and did some research.  It appears that due to how Allegro handles mouse input in Windows, fundamentally you are all but guaranteed to experience a difference in mouse behavior between windowed and fullscreen mode, especially by default. :XD:

Specifically, on Windows in windowed mode, Allegro gets mouse input through Windows.  This means Window's normal user settings related to mouse speed and acceleration gets applied automatically for you.  On the other hand, in fullscreen mode, Allegro uses the DirectInput APIs to get mouse input basically directly from the mouse driver.  Microsoft's documentations on those APIs clearly states that since it is straight from the driver, the normal user settings (speed and acceleration) are bypassed.  So you are at the mercy of Lix's mouse-handling code to provide the speed factor (whose default apparently seems to be too low for most people on Windows) and acceleration factor (off by default, hidden even), resulting in mouse behavior that feels noticeably slower than "normal" (ie. windowed mode behavior).  Your only recourse is to tweak the Lix settings until it (hopefully) becomes close enough to normal Windows behavior.

While I have no means to test at the moment, I suspect in the "WINE under Linux" setup, WINE likely just takes the underlying mouse data from Linux and bubbles it up directly to applications; in effect there is probably no speed/acceleration factors ever applied by WINE because it expects Linux to have already "normalized" the mouse data accordingly.  If this theory is correct then it is understandable why there would be no difference between fullscreen vs windowed mode under WINE, and perhaps also why when Lix does apply its own speed/acceleration factor it feels "too much" for Simon.  Basically those behaviors that are needed in real Windows to compensate stuff become unnecessary (and hence overcompensation) in Linux+WINE.

Anyway, one thing we might consider is to tweak the default settings for (real-)Windows so it is more likely to be closer to "normal", and then update the code to apply such Windows-specific default settings (extra bonus if there's a way to detect WINE and don't do this since WINE behavior may be totally different).  For now you'll want to tweak the settings yourself as Simon detailed above.  Or just stick with windowed mode (in most people's setup Lix probably doesn't actually occupy the whole screen anyway in "full"screen mode ;P).