Commit Graph

172 Commits

Author SHA1 Message Date
Thilo Schulz 5769bed4a3 Make Sys_SetEnv behave alike on Windows and Linux 2011-04-18 00:39:15 +00:00
Tim Angus 01a274baf7 * Actually call Sys_PlatformExit 2011-04-09 12:33:56 +00:00
Tim Angus 52ead6fa36 * Crash recovery for com_pipeFile (Lakitu7) 2011-03-30 21:58:31 +00:00
Thilo Schulz 3bf8ec2dab (#4925) - com_pipefile to create a named pipe for sending commands from other processes, patch by Chris Schwarz 2011-03-10 01:01:27 +00:00
Thilo Schulz ccd24cd647 - Fix unterminated string errors in Q_vsnprintf() on windows. Thanks to Eugene C. for reporting (#4907)
- Get rid of bigbuffer in Com_sprintf()
- Get rid of Q_snprintf and replace with Com_sprintf()
2011-02-23 16:17:09 +00:00
Thilo Schulz 2b52867b74 Code cleanup patch by devhc 2011-02-08 18:19:31 +00:00
Thilo Schulz f03ee4b61c Oops typo. 2011-02-06 18:59:39 +00:00
Thilo Schulz 7bb5906599 Patch by Simon McVittie to improve dynamic library loading (#4700) 2011-02-04 17:47:57 +00:00
Thilo Schulz 3148416c04 - Change runtime standalone detection:
* com_standalone now read-only
  * add new cvars com_basegame, com_homepath
  * standalone now automatically detected when com_basegame is set to something different than baseq3 and no id pak pk3s are found
  * This fixes https://bugzilla.icculus.org/show_bug.cgi?id=4699
- Replace a few hardcoded string literals with macros
- Add checks for Team Arena PK3s to FS_CheckPak0()
2011-02-04 12:04:56 +00:00
Thilo Schulz fa8201c9b6 Delete unused variable 2011-01-31 22:09:47 +00:00
Thilo Schulz 5cd116d3ad Only adjust timer resolution for clients 2011-01-31 20:32:00 +00:00
Thilo Schulz e0a85521c9 Explicitly set timer resolution on windows 2011-01-31 20:23:05 +00:00
Ludwig Nussel 14c5a82c14 cvar is called fs_game (bug 4866) 2011-01-30 13:34:54 +00:00
Thilo Schulz 7471510c8e Shut up compiler error 2011-01-21 20:47:32 +00:00
Tim Angus 7000b9a315 * (bug #4853) Fix comment that refers to old code 2010-12-19 17:45:03 +00:00
Ludwig Nussel 368a3be2a6 64bit Windows fix (patch by Marcus Meissner) 2010-04-16 09:29:34 +00:00
Ludwig Nussel 760f4a1949 64bit Windows support (patch by Michael Menegakis) 2010-02-28 09:00:02 +00:00
Tim Angus 3ebe048968 * Fix a memory leak in OS X Sys_Dialog
* Fix compilation on Snow Leopard
2010-02-26 16:32:49 +00:00
Tim Angus 005f870ebe * Sys_Dialog for more user friendly error reporting
* (bug #3932) Recovery from bad video settings
2010-02-15 16:20:33 +00:00
Ludwig Nussel 6f9b34ef75 avoid setting cvars by name each frame 2010-01-06 13:47:41 +00:00
Tim Angus a405637985 * Handle SIGINT 2009-12-24 01:39:30 +00:00
Tim Angus 78df7a1de4 * (bug #4346) Dedicated server uses 100% CPU when stdin is not a TTY
* com_speeds reports misleading values on dedicated server (Guillaume Bougard)
2009-12-24 00:40:39 +00:00
Thilo Schulz 04c5efd739 Fix possible buffer overflow in console, thanks to John Ellis for the patch. 2009-11-10 02:17:32 +00:00
Tim Angus 108705d31f * Rewrite win32 Sys_Mkdir to use CreateDirectory
* Make FS_ReplaceSeparators filter out runs of multiple separators
* Make FS_CreatePath skip creation of the root directory
2009-11-07 16:43:02 +00:00
Tim Angus eee9770fbf * Reimplement r1597-1598 in a better way (Oopss)
* Fix Sys_SetEnv warning
2009-11-05 20:20:23 +00:00
Thilo Schulz d574e10bc4 Ugh. Forgotten ) 2009-11-03 20:44:16 +00:00
Thilo Schulz bd2ab9bffd - implement r_noborder, inspired by patch from ensiform (#4289)
- Add Sys_SetEnv for portable setting of environment variables
 - Default ioquake3 to appear on the center of the screen if running in windowed mode.
2009-11-03 20:29:43 +00:00
Tim Angus 9f6cee30d3 * Remove disabling of stdout/err redirection on windows as it doesn't work
(since the environment variable is acted upon by the SDL_main stuff, which
  happens before our main)
2009-10-27 11:48:18 +00:00
Tim Angus 968892c61b * Bump the minimum SDL version up to 1.2.10, and remove workarounds for earlier versions 2009-10-25 22:36:32 +00:00
Thilo Schulz c312449422 Add SIGCONT signal handler to reinitialize console after doing CTRL+Z / fg, as under Linux/bash stdin seems to lose O_NONBLOCK flag as well as all tcsetattr() attributes after foregrounding 2009-10-24 12:01:29 +00:00
Thilo Schulz b9ec0e4639 Don't look for DLLs on current working directory anymore, for security reasons. 2009-10-17 22:06:51 +00:00
Tim Angus 504bd58b90 * Disable stdout/stderr redirection on Windows 2009-10-16 22:36:57 +00:00
Ryan C. Gordon 5ffb45c79f Cleanups for the Mac error dialog, after a code review from tma.
- Don't expose the function in sys_local.h (it would be static if we could).
- Don't call it Sys_Cocoa_*; it'd be nonsense with q3a's naming conventions.
2009-09-16 12:54:12 +00:00
Tim Angus 083bd1b005 * ...and actually r1626 this time 2009-09-16 09:30:21 +00:00
Tim Angus f89092fda6 * Revert r1624 and r1626-r1628 2009-09-15 09:48:11 +00:00
Ryan C. Gordon 9fd5e15b97 Added support for hardcoded HOMEPATH.
Partially fixes Bugzilla #4271.
2009-09-15 06:40:55 +00:00
Ryan C. Gordon 826f05f95f Let a separate libdir be specified for loading libraries.
Partially fixes Bugzilla #4271.
2009-09-15 06:32:05 +00:00
Ryan C. Gordon 62ea802cea Quote commandline args with spaces when building the string for Com_Init(). 2009-09-15 06:12:42 +00:00
Ryan C. Gordon f8604a64f4 Added a real GUI message box to Sys_ErrorDialog() on Mac OS X.
Fixes Bugzilla #3654.
2009-09-15 05:38:27 +00:00
Ryan C. Gordon 5079343ecd Fixed infinite recursion of writing crashlog because we're out of file handles.
Fixes Bugzilla #3772.
2009-09-15 00:19:22 +00:00
Ryan C. Gordon cf1bb85183 Make newly-created prefpath permissions more sane. 2009-09-14 23:46:44 +00:00
Ryan C. Gordon a5980d56d9 Create "~/Library/Application Support" on Mac OS X if it doesn't exist.
Apparently this can happen on freshly-installed Xserves? Also, a moron user
 could have dragged it to the trash anyhow.

  Fixes Bugzilla #4052.
2009-09-14 23:45:00 +00:00
Tim Angus 64a0a078d2 * Fix warning in cl_main.c
* Fix bug #4026 (SDL dx backend doesn't work on some machines)
2009-09-14 12:34:31 +00:00
Ludwig Nussel ec846d23b2 define STRING and XSTRING in q_shared.h (#4054) 2009-05-05 18:19:29 +00:00
Ludwig Nussel 799150ffc1 fix dedicated server stdin console (#4009) 2009-05-03 20:05:16 +00:00
Tim Angus 1bd63e59e5 * Remove superfluous comments committed with fix to bug #3999 2009-03-02 22:26:36 +00:00
Ludwig Nussel 1072b25ce8 initialize Sys_Milliseconds early (#3999) 2009-03-02 18:08:21 +00:00
Tim Angus 72dea0a184 * Fix some new GCC 4.3 warnings
* Fix many many strict aliasing warnings, now that it's re-enabled
2008-11-10 23:55:22 +00:00
Tim Angus a6382d2d9b * Fix unused variable warning
* Add USE_LOCAL_HEADERS guards to sys_loadlib.h
2008-08-23 22:45:30 +00:00
Tim Angus c29417b42a * Always show the mouse cursor when the mouse is disabled
* Rename IN_StartupJoystick to IN_InitJoystick, add IN_ShutdownJoystick
* Add IN_Restart, which avoids calling IN_DeactivateMouse at the wrong time
* Call IN_Restart when changing r_fullscreen
* Add CVAR_ROM r_sdlDriver for easy checking of the SDL driver in use
* Random README tweaks
2008-08-09 13:20:00 +00:00
Tim Angus d4d5527a89 * Add Sys_GLimpInit for platform specific GLimp initialisation
* Move Unix specific signal handlers to Sys_PlatformInit
* (Windows only) Don't set the SDL video driver if SDL_VIDEODRIVER is already
  set externally
* (Windows only) Use the "windib" SDL video driver if in_mouse is set to -1
2008-08-08 21:35:33 +00:00
Tim Angus 00e790ce00 * Change win32 client Sys_Sleep so it ONLY sleeps since before it was waking on
more or less any input event; fine for the server, not so much use for the
  client
* In the main loop, don't bother sleeping if it's going to be less than 10ms as
  the methods we're using to sleep at the moment aren't very precise
* Add Sys_PlatformInit for platform specific initialisation
* In win32 Sys_PlatformInit force selection of the DirectX SDL backend in order
  to get better fullscreen mouse input (in conjunction with a patched SDL DLL
  http://bugzilla.libsdl.org/show_bug.cgi?id=265)
2008-08-03 19:42:53 +00:00
Tim Angus 0124371c01 * Use Sys_Sleep to limit FPS, which will save CPU
* Add com_maxfpsUnfocused and com_maxfpsMinimized; self explanatory
* Fix reopening of bug 3703, I hope
2008-07-21 22:02:54 +00:00
Thilo Schulz 87fa68fd41 Add gamedirectory in .app to searchpath on MacOSX 2007-12-14 21:53:57 +00:00
Julian Priestley 4f0565a4a7 * Add con_log.c and con_passive.c from r1222 to quake3.vcproj.
* Rename 'write' and 'read' variables in con_log.c, as these are already
defined in io.h in the MSVC environment.
2007-12-02 00:48:59 +00:00
Tim Angus 3cde9bf0dc * Add con_log.c to log all console output
* Add con_passive.c to cut down on #ifdef DEDICATED in sys_main.c
* Add Sys_ErrorDialog to report ERR_FATALs to the user
  + On Windows use a MessageBox and offer to copy the console log to the
    clipboard
  + On everything else print to the terminal and save the console log as
    crashlog.txt
2007-11-30 18:32:52 +00:00
Tim Angus eaeed742c5 * Move MINSDL_ values to sys_local.h from Makefile/VC project
* Merge *BSD platform definitions in q_platform.h
* IRIX support (Patrick Baggett <baggett.patrick@figglesoftware.com>)
2007-11-26 20:18:53 +00:00
Tim Angus 6bd4bb16a0 * Move SDL library version check to sys_main.c as it's proving difficult to
make the Makefile check sufficiently portable
* Remove unnecessary GL PFN... casts from SDL_GL_GetProcAddress calls
* Replace OS X uname workaround with Solaris workaround, as I believe OS X
  uname now behaves the same as GNU name
2007-11-25 23:41:01 +00:00
Tim Angus f2f8e73d58 * s/O_NDELAY/O_NONBLOCK/ 2007-11-19 19:59:37 +00:00
Tim Angus b62950ca6e * Fix bug where an extraneous render command can cause a crash when
recording video
* Make S_CodecUtilClose NULL the snd_stream_t pointer
* Fix indentation in runtime SDL check code
2007-11-18 01:06:46 +00:00
Tim Angus 527a5ddb1d * Fix to win_resource.rc for MSVC build 2007-11-03 21:53:50 +00:00
Tim Angus 31c24bd0d2 * (bug 3393) Blank user names still possible (Michael Jard <kfaust@gmail.com>)
* (bug 3363) Download percentage overflow (Martin Doucha <next_ghost@quick.cz>)
* (bug 3390) MSVC project (Julian Priestley <juzley@gmail.com>)
* For OS X and MinGW ports, don't -I code/SDL when USE_LOCAL_HEADERS is 0
2007-11-02 23:36:23 +00:00
Tim Angus e955f142b8 * Grr. Argh. Whitespace. etc. 2007-10-09 20:50:18 +00:00
Tim Angus a9eaefecab * Replace Sys_AnsiColorify with Sys_AnsiColorPrint, a more simple means of
achieving the same feature
* Handle non-numeric color codes in Sys_AnsiColorPrint
2007-10-09 20:49:19 +00:00
Ludwig Nussel 95f67c2c3e fix incorrect use of strncpy
this function should really be removed or rewritten from scratch
2007-10-08 10:26:28 +00:00
Tim Angus 26641226a4 * Remove some C99isms (f0rqu3)
* Provide Q_snprintf wrapper for snprintf (f0rqu3)
2007-10-01 07:56:32 +00:00
Tony J. White = e46fe24426 * rewrite of the win32 dedicated console:
1) NET_Sleep() no longer watches for input, Sys_Sleep() added for waiting
     on input.
  2) Added "CtrlHandler" for trapping Ctrl-C and other quit methods not
     handled by signals on windows
  3) Added history support
  4) Added tab completion
  5) Removed automatic cursor/scroll adjustment (too problematic)
  6) Enable mousewheel scrolling
  7) Stop using the InputBuffer for editing

  This seems to work pretty well now, but I jumped the gun on a previous
  commit message by saying you can scroll now without locking up your server.
  That was only true up until the point that a server tried to print to
  the console, at that point it will hang until you release the scroll bar :(
  It may be possible to get around this by using a seperate thread for
  console output, but that's a whole new can of worms.
2007-09-15 02:22:58 +00:00
Tony J. White = 687b744166 * win32 dedicated console cleanup: drop silly predifined height and width,
scroll the command buffer to the right when typing long lines, restore
  the original color theme on CON_Shutdown().
2007-09-09 07:20:12 +00:00
Tony J. White = e75c19b45d * Adds preliminary support for win32 dedicated server console.
Functionality is still quite limited (no tab completion, history, etc.),
  but at least with this console you can scroll without locking up
  your server.
2007-09-07 21:27:01 +00:00
Tim Angus 54ba74964a * Build dedicated server binary on Windows 2007-09-06 20:31:30 +00:00
Tim Angus e56a151a97 * Compile time and runtime checks for SDL >= 1.2.7
* Modified versioning to play nice with the reverted Makefile change
2007-09-06 18:21:10 +00:00
Tim Angus 672cfbf16f * Merge unified-sdl to trunk
* Bump Q3_VERSION to 1.35
2007-09-05 18:17:46 +00:00