Mac OS X adds an argument starting with "-psn" when launched using Finder, Dock,
or a terminal using open command and not specifying arguments.
It caused the opening videos to be skipped.
This change mimics SDL 1.2.
Quiting SDL Video or Joystick subsystem implies quiting the Event subsystem in SDL2.
SDL keeps track of number of init and shutdown calls for each subsystem.
Shuting down video or joystick more or equal to number of times they're inited will lead to event shutdown.
Toggling in and out of fullscreen or running in_restart twice causes SDL event subsystem to shutdown, making input not work.
If the console is closed, IN_GobbleMotionEvents gets stuck in a loop. SDL_PeepEvents returns -1 when there is an error, but we assume non-0 means read more events.
IN_ShutdownJoystick needs to check if joystick subsystem was inited before quitting it, otherwise we may cause SDL event subsystem to shutdown.
gc command was forwarded to server after if wasn't recognized locally, but let's just send straight to server.
(trap_SendConsoleCommand should of had a \n at end, but using trap_SendClientCommand makes more sense.)
Introduced in commit "Add togglemenu command" bf2b04.
Don't let UI key event changing key catcher affect bind parsing. Bind parsing itself will never change the key catcher.
Example of issue: if mouse1 is bound to +attack when clicking Resume Game, player will shoot until releasing the mouse button.
Mouse button should have to be released and pressed again before player will shoot.
Update history position when CON_HistNext goes to input line, otherwise
when going to previous a line is skipped.
Don't let CON_HistPrev go to unused lines.
Make 'b' variable an int so that key values more than 255 will work (not currently an issue in ioq3 afaik).
Use SDL_BUTTON_* for easier transition to SDL2.
(SDL2 doesn't have SDL_BUTTON_WHEELUP or SDL_BUTTON_WHEELDOWN, X1/X2 are different values.)
Check r_nocurves in surface cull.
While r_nocurves is enabled, don't use merged surfaces because merged curves would be renderer. (note: surface merging is enabled by r_mergeLeafSurfaces)
Set the variables that use tess.numVertexes after calling RB_CHECKOVERFLOW() as it may set tess.numVertexes to 0!
Could cause visual issues and error "RB_EndSurface() - SHADER_MAX_VERTEXES hit".
fogNum 0 means no fog. Shaders don't try to apply fog color if fogNum is 0.
This was done to make things more consistent and fix a crash in iortcw MP using a user made map on GNU/Linux x86_64.