36/1000 is always 0 and doesn't make a lot of sense anyway. Use 1000/36
(aka 1000ms/36fps) instead so the UI thread has some time to rest.
Also use a Qt::PreciseTimer so Qt doesn't try to coalesce the scheduler
timer with other timers to save energy.
* Engine would always open up in Fullscreen and then switch to Windowed
instead of just starting up as Windowed.
* Could not change resolution because bit depth or refresh rate did not match
* handle RefreshRate==0 as "any", just like windows
* Remember refresh rate in combo box that enumerates all the modes and
propagate to video mode setting instead of assuming all modes have the
same refresh rate.
* Report bit depth as 32 even if SDL tells us it's 24. Other parts of the
code require it to be equal to 32, but 24 works just fine.
* Changing from fullscreen to windowed when "Screen" was selected in
resolution combo box (i.e. iXRes==-1) makes the window tiny (0x0 pixels).
The last error is displayed in the GUI, so until now there was just a "(null)"
string there.
The whole (SDL) resolution switching code is completely broken as well, but
that's a different story...
The GTK code does not work with the Qt editor. The simpler SDL2 platform
does, so we have little reason to keep the GTK code.
Note that GTK is still a dependency for mape.
Discussion: http://forum.openclonk.org/topic_show.pl?tid=3328
C4Group::SearchNextEntry would waste lots of cycles looking up file
attributes that were never inspected afterwards. Since all we want is
the file size, and we already get that for free from FindFirstFile and
FindNextFile, store it with the directory iterator instead of querying
it at every iteration.
This reduces load times on my machine by almost half, tested across
several different scenarios.
Unfortunately, there doesn't seem to be an easy way to apply
multisampling changes in SDL. As a workaround, a message requesting the
player to restart the game is shown.
Since LTCG is enabled now, we don't have to define every function inside
the headers for ~xXx super speed xXx~, which means we can strip the
headers down to their bare minimum and reduce interdependencies and
therefore recompilation times by a lot.
The SDL port used to define a separate set of key codes differing from
the usual ones. The SDL codes are now translated to make the Qt input
easy.
This also fixes a broken keycode for the '0' key.
The available gamepads are distributed automatically among players.
This also implements controller hot-plugging: It is possible to start a
game without a controller and plug it in later, and to reconnect a
controller after plugging it out.