Commit Graph

49 Commits

Author SHA1 Message Date
Zack Middleton 05858d30e8 Don't load libraries with non-standard file extensions
Also don't allow writting files ending in a library extension such
as ".so.0" or ".dylib.0".
2017-05-24 10:28:46 -05:00
Max Crofts 7ff610db35 Detect GOG install path 2017-04-07 16:26:26 +10:00
Victor Roemer 398dea397c Fix Makefile for OSX
Bump base SDK from 10.5 -> 10.7
Just use the builtin __APPLE__
2016-06-12 17:17:33 -04:00
Zack Middleton 7e96fd9cb6 Make steam path optional at compile time for standalone games 2015-09-22 19:25:16 -05:00
SmileTheory f860a753e0 Add Steam's Quake 3 Arena dir to game dirs on Windows. 2015-09-17 02:53:19 -07:00
Dion Williams 2917077323 Ensure reads from /dev/urandom are unbuffered
Upstream: JACoders/OpenJK@de6a9dfd40
2015-09-07 11:33:29 +01:00
Zack Middleton 5d7612ec84 Merge pull request #109 from Pan7/SIGABRT
SIGABRT is in ANSI and POSIX.1, and SIGIOT isn't.
2015-06-18 13:20:54 -05:00
Pan7 9c52d6c2bf SIGABRT is in ANSI and POSIX.1, and SIGIOT isn't. 2015-01-18 18:41:06 +01:00
Zack Middleton d62dfd87f9 Set float rounding mode on non-Windows platforms
Sys_SetFloatEnv in sys_unix.c existed but was not called. It sets the
rounding mode to "to nearest" which is the default on Linux. Might be
required on other platforms, I don't know.
2015-01-12 17:03:13 -06:00
Tim Angus 621a72e698 Fix a few warnings 2014-08-30 17:29:23 +01:00
Zack Middleton 137ddb9dc6 Get clipboard data from SDL
This makes pasting in client console and UI edit fields work on X11 and OS X.

Sys_GetClipboardData is only used by client, so returning NULL in dedicated is fine.
2014-08-27 04:32:05 -05:00
Tim Angus 462694763e Bug #6021 Fix misuse of Sys_Mkdir (Joerg Dietrich) 2013-09-04 17:56:11 +01:00
Thilo Schulz daf71ca502 Fix recursive crash when home path cannot be created 2013-08-25 12:00:30 +02:00
/dev/humancontroller a8ce30163e make the fread() success-check code in Sys_RandomBytes() more secure 2013-05-30 15:41:19 -05:00
Zack Middleton 2e45edb550 5717 - Gamecode can open file "" for reading 2013-02-15 21:08:47 -06:00
Tim Angus 37f2b4db90 * (bug #5709) Fix crash when invoked with --version 2012-07-07 17:32:19 +00:00
Zachary Slater b5acc31a4d CVE-2012-3345 2012-06-14 18:28:58 +00:00
Thilo Schulz 8a500d71da Set default rounding mode to FE_NEAREST again. Thanks to Matthias Bentrup for providing some explanations. 2011-09-27 14:43:20 +00:00
Thilo Schulz 23f6fd1633 Bug 5094 - Code cleanup, patch by Zack Middleton and DevHC. Fixes unused-but-set gcc warnings 2011-07-29 12:27:00 +00:00
Tim Angus 22552c7bab * Replace usage of system with fork/exec 2011-07-24 22:01:50 +00:00
Tim Angus b248479376 * Fix various issues with unix Sys_Dialog 2011-07-18 19:32:25 +00:00
Tim Angus ea6cf5fda9 * Use specific exit code for xmessage 2011-07-18 10:14:04 +00:00
Thilo Schulz 03201aff22 - Add MASM assembler files for MSVC x64 projects to support vm_x86 in x64 mode
- Clean up ftol()/snapvector() mess
- Make use of SSE instructions for ftol()/snapvector() if available
- move ftol/snapvector pure assembler to inline assembler, this will add x86_64 and improve support for different calling conventions
- Set FPU control word at program startup to get consistent behaviour on all platforms
2011-06-13 09:56:39 +00:00
Thilo Schulz 876fd7dcb9 - Add HOMEPATH default name define to q_shared.c, patch by uZu (#4973)
- Reverted change from (#4972) and implemented the other suggestion to be consistent with cl_cgame.c and cl_ui.c
2011-05-04 15:39:35 +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 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 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
Tim Angus 7000b9a315 * (bug #4853) Fix comment that refers to old code 2010-12-19 17:45:03 +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
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
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 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
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 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 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
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 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
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
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
Tim Angus 672cfbf16f * Merge unified-sdl to trunk
* Bump Q3_VERSION to 1.35
2007-09-05 18:17:46 +00:00
Renamed from code/unix/unix_shared.c (Browse further)