D3BFG gets the username from Steam, in the GPL release it just
uses the hostname.
Now it's possible to set a custom name with the ui_name CVAR
(like in classic doom3). If ui_name is empty ("") the hostname
is used.
The window losing focus in MP resulted in the console being spammed
with "changing com_pause not allowed in Multi Player" (or similar)
messages. Added CVAR_NOCHEAT flag to com_pause to get rid of that.
It now works on Linux so executing it doesn't freeze the game
like described in
https://github.com/RobertBeckebans/RBDOOM-3-BFG/issues/33
Furthermore, this function doesn't have any parameters anymore
(on any platform) because the only thing supplied was the original
program arguments +"+set com_skipIntroVideos 1" anyway - this is now
done in Sys_ReLaunch() (also on Windows).
Having the program arguments as one string is bad on Linux/POSIX
because there it's expected that the program arguments are one
C-string per argument.
A lot of keys (especially keys not available on US keyboards) just weren't
supported for console input with SDL1.2 (SDL2 uses a different mechanism for
that).
This is fixed now by reordering a few lines in sdl_events.cpp
Please note that still only ASCII characters are supported and those keys
still can not be used in bindings - only for text input!
Turned out that as "extension" (which is really more like a pattern
that matches the whole file) was even used with patterns like "*.*"
so we do proper matching using fnmatch() now - which is even easier
than the old way.
Now deleting savegames on POSIX works.
If the window loses focus com_pause is set to 1, when it regains focus
it's set to 0.
The behaviour on Win32 stayed the same (the implementation is less
hacky though) and Linux now matchces that.
In Sys_ListFiles() the extension was abused to match whole
filenames (of savegames), not just their extensions - that
didn't work with the POSIX backend, now it does.
Sys_ListFiles() now also supports "*" as a wildcard that matches
all files - needed for deleting savegames.
However, things like "bl*" or "*ub" don't work.
While at it, I replaced readdir() with the thread-safe readdir_r()
* add define for SDL_SCANCODE_GRAVE - seems like only SDL2
has names for the values
* add some missing keys to SDL_KeyToDoom3Key
* add scancode to unmapped-key warning
* backspace needs to be handled the same for SDL1 as in SDL2
(i.e. a new event must be created for it) to work in console
* Add support for Console-Key independently of KB Layout (with scancode)
* add support for TAB key
* Add hack so console is empty after opening it (SDL-only)
it didn't work correctly because the mouse isn't grabbed
(in contrast to dhewm3).
It's fixed now by returning absolute coordinates when a menu
is open, furthermore the cursor is now always hidden.