Commit graph

1332 commits

Author SHA1 Message Date
Yamagi Burmeister
3efb5a2b56 Update CHANGELOG for 5.21 2014-01-01 11:25:03 +01:00
Yamagi Burmeister
be14aea08d Add an signal handler for SIGINT and SIGTERM
This allows the user to shut the client down by pressing ctrl-c in it's
terminal or by sendig SIGTERM.
2014-01-01 11:17:28 +01:00
Yamagi Burmeister
ab220c10d6 Wrap too long line 2014-01-01 10:35:53 +01:00
Yamagi Burmeister
ca5b0183e2 Set an rpath entry to WITH_SYSTEMDIR/lib
This automagically sets an rpath to WITH_SYSTEMDIR/lib, when
WITH_SYSTEMWIDE is specified. If no WITH_SYSTEMDIR is given,
the default path /usr/share/games/quake2/lib is used. As for
the normal rpath, for now only FreeBSD and Linux are supported.
This was requested by caedes.
2014-01-01 10:32:27 +01:00
Yamagi Burmeister
fd1e55d18d Do not set the FPU to single precision on Windows
We had dual precision since ever on 64 bit unixoid systems and it "just
worked". So there should be no reason to still force Windows down to
single precision.  The performance impact should be negligible.
2013-12-31 13:18:05 +01:00
Yamagi Burmeister
8102e1a021 Move entitycmpfnc() to cl_view.c an reimplement it
This function is only used in cl_view.c, so no need for external
declaration. Reimplement it in a sane and on all platform 64 bit
clean way. This allows us to finally remove the horible INT macro.
2013-12-31 12:47:18 +01:00
Yamagi
78b974d3ca Merge pull request #28 from alericoveri/qgl_cleanup
QGL renundancy cleanup
2013-12-31 03:14:55 -08:00
Yamagi Burmeister
909729b2fd Rename CDA_ENABLED to CDA_DISABLED. Some minor wording fixes while here. 2013-12-31 10:02:58 +01:00
Yamagi Burmeister
1e2e1021af Make ARCH overrideable on Windows 2013-12-31 09:57:07 +01:00
Yamagi Burmeister
950c31d4ee Elaborate on 64 bit windows builds 2013-12-31 09:55:18 +01:00
Daniel Gibson
3afe57b8f2 Fix #29 by simplifying mouse button handling
Pressing two mouse buttons at the same time didn't work properly, only
one had effect, e.g. when pressing LMB to walk forward and RMB to shoot
(when bound like that...)

Not sure why that was, but the old mouse button handling (inherited from
the super-old win32 backend where it was supposed to work around bugs in
WinAPI or whatever, where sometimes there were two mouse button presses
in one event or something) was unnecessarily complicated anyway so I
replaced it with something simpler.
2013-11-26 19:22:29 +01:00
Alejandro Ricoveri
1cfb5c67d5 QGL renundancy cleanup
Despite QGL is only handling GL extensions, there was a little code renundancy.
QGL_EXT_Reset sets all extension pointers to NULL.
2013-11-22 08:17:34 -04:30
Yamagi Burmeister
64a39ce09e Bump version number to 5.20 2013-11-14 18:13:35 +01:00
Yamagi Burmeister
1ac7f52308 Update CHANGELOG 2013-11-10 10:52:53 +01:00
Yamagi Burmeister
0f9dcba9ed Apply some cleanup to the input backend
Make non global functions static, give some better names to variables,
remove unneccessary special cases and remove some superflous functions.
Form most - if not all - users this changes should be a no-op.
2013-11-10 10:10:43 +01:00
Yamagi Burmeister
dca3db9426 Add $ORIGIN/lib the RPATH on FreeBSD and Linux
This should ease the overwriting of systemwide installed libs with
specialized versions. Also distributors may use this facility to supply
libraries next to the binaries. Maybe the same should be added for the
other platforms, but I'm not sure if and how they support RPATHes.
2013-11-09 13:47:04 +01:00
Yamagi Burmeister
e7ac0653b2 Merge branch 'sdl2' 2013-11-09 13:21:39 +01:00
Yamagi Burmeister
1aff869393 Add a FAQ regarding XInput 2.2 or higher needed by SDL 2.0 2013-11-09 13:19:37 +01:00
Scott Smith
70eef55ab5 OpenGL-ES converstion
Specific device options for pandora, gcw, gph
2013-10-12 12:31:20 -04:00
Yamagi Burmeister
78cfbb5197 Mention SDL 2.0 in the Makefile header 2013-10-12 12:32:32 +02:00
Yamagi Burmeister
67e3355aa5 Mention that OS X is unsupported
I neither have a Mac nor the time to maintain this platform. SDL 2.0
requires some more complex changes than the usual "two lines to track
Unix and Windows" so suspend OS X support until someone steps up.
2013-10-12 12:30:01 +02:00
Yamagi Burmeister
bffc43ea53 Clarify SDL stuff in the README, mention vsync bug with SDL 1.2 2013-10-12 12:27:47 +02:00
Yamagi Burmeister
82f3fa84a9 Use "directsound" as sounddriver when using SDL2 on Windows 2013-10-12 12:13:33 +02:00
Yamagi Burmeister
5b10bdc2b2 Enable SDL2 by default 2013-10-12 11:55:04 +02:00
Yamagi Burmeister
ad27563ef6 Correct SDL2 statement for Windows
SDL2 can and should be statically linked. This is much more easier than
linking it dynamically and more comfortable for the user. One libs less
to care about.
2013-10-12 11:52:49 +02:00
Yamagi Burmeister
5c5a9beba5 Rename CreateWindow() to CreateSDLWindow()
CreateWindow() is a symbol internal to Windows. We can't use it in out
code or it will collide.
2013-10-12 11:07:05 +02:00
Yamagi Burmeister
5e85fbc8b9 Allow arbitrary screen sizes.
Without this change the width of the render windows was required to be a
multiple of 8, making it unable to use strange resolutions like 1366x768.
This change is based upon an idea submitted by "tmcp" in pull request
27.
2013-10-12 09:29:19 +02:00
Daniel Gibson
d1ca122955 Add -DSDL2 for Win32/OSX support (untested), print SDL2 usage on startup
The quake2 binary now gets -DSDL2 in the CFLAGS, so Win32/OSX can
use different #include paths accordingly.
This is also (ab)used to print which SDL version is used on startup.
Don't use this for anything else, use
#if SDL_VERSION_ATLEAST(2, 0, 0)
instead.

I haven't tested building on/for Win32 or OSX, there may be more
work to do.

Furthermore I added Copyright-Info about CalculateGammaRamp()
in refresh.c (it's from SDL2)
2013-09-01 14:19:33 +02:00
Daniel Gibson
628dff77a8 Clean up + improve setting gamma via xRandR
* save gamma on start and restore on exit
* handle errors
* Restore SDL1.2 compatibility
2013-09-01 03:18:21 +02:00
Daniel Gibson
9af707c7a0 use xrandr for x11gamma (still hacky) 2013-08-27 21:54:48 +02:00
Yamagi Burmeister
191513945f Fix printing of the "CDA is disabled" warning 2013-08-27 21:04:55 +02:00
Daniel Gibson
d6dbd6497e Set gamma with SDL2 2013-08-27 19:57:14 +02:00
Daniel Gibson
a83f1c8ff0 SDL2: Fix Icon 2013-08-27 01:16:05 +02:00
Daniel Gibson
997be0dcd1 Fixes for SDL2
* Fix input issues (mouse-wheel and mouse input)
* SDL2 is not default anymore in the Makefile (use WITH_SDL2=yes)
* If SDL2 is enabled, CD audio is disabled (SDL2 doesn't support
  that - use OGG/Vorbis instead)
* Small fix to make it compile with SDL1.2 again
2013-08-26 23:55:34 +02:00
Daniel Gibson
51b7607548 SDL2 support (mostly)
Makefile is adjusted, it compiles and works mostly, but
* For some reason (bug in SDL_GetRelativeMouseState() ?)
  mouse input doesn't work properly.. it seems to be bound
  to window borders, even if input is grabbed
* some keys can't be used anymore because there's no SDLK_*
  for them anymore (gotta find out if this is important)
* Maybe some of the changes need cleanup
2013-08-26 00:55:31 +02:00
svdijk
ee03e7f03a simplify the input grabbing code 2013-07-30 20:13:49 +02:00
Yamagi Burmeister
005fea6c94 Call GLimp_GetProcAddress directly 2013-07-27 08:50:20 +02:00
Yamagi Burmeister
88bd357231 Remove support for old SGI Opengl extensions
Those extensions have become part of ARB about 15 years ago and most if
not all video cards still in use should support the ARB versions. I
believe that at least parts of this code were disfunctional.
2013-07-27 08:47:28 +02:00
Yamagi Burmeister
ad52c5c888 Rename all qgl* functions top their OpenGL counterparts
This removes the need to define the old qgl function names to the
official OpenGL names. The OpenGL functions are now called directly
without any abstraction.
2013-07-27 08:47:21 +02:00
Yamagi Burmeister
9150bdc9ec Mention the refresher integration in the CHANGELOG 2013-06-15 10:43:15 +02:00
Yamagi Burmeister
ecc4302f94 Alter Makefile and header pathes following the refresh move
With this change the "refresh" make target doesn't any longer exists.
It was merged into the "client" target. One will need a "make clean"
before building yQ2 after this change.
2013-06-15 10:37:11 +02:00
Yamagi Burmeister
8a17f20e64 Move refresher to client/refresh
This is the more appropriate place now that the refresher is merged into
the client
2013-06-15 10:37:11 +02:00
Yamagi Burmeister
85571cfc56 Only cleanup the GL context if OpenGL was initialized 2013-06-15 10:37:11 +02:00
Yamagi Burmeister
9af9f54f36 Remove QGL pointers
This is a manual merge of Hecatomb Q2 ref b8952d5. Manual since git
couldn't do an automerge for some reasons... Notable changes are:
- QGL function pointers are removed, libGL is linked directly
- The OpenGL log framework is removed. It was disfunctional
- The gl_driver cvar is finaly gone
This change is currently untested on Windows and OS. There should
be no problems but a better Makefile integration of libGL is needed.
2013-06-15 10:37:11 +02:00
Alejandro Ricoveri
d2304ebcab Makefile fix for Windows
Refresher sources were not included for the Windows client build
2013-06-15 10:37:11 +02:00
Alejandro Ricoveri
2b0974822c Client refactoring
Some stuff being reordered
2013-06-15 10:37:11 +02:00
Alejandro Ricoveri
3e45c5e363 Refresh API refactoring
Analog functions of the former refexport_t are now public for the client
to access.
2013-06-15 10:27:30 +02:00
Alejandro Ricoveri
6686b875cc vid.c refactoring
VID_LoadRefresh with no parameters
VID_LoadRefresh doesn't need a DLL name (because there isn't one)
Rename reflib_active to ref_active
Reference to client input callbacks
All declarations are at the beginning of the file
Full reimplementation of VID_Shutdown
VID_Shutdown does all the refresher cleanup
Reimplementation of VID_FreeReflib
Implementation of VID_LoadRefresh
2013-06-15 10:27:30 +02:00
Alejandro Ricoveri
8e69d9dc5c Remove vid_ref cvar
Normally setting gl_mode cvar would result in VID_LoadRefresh because
of vid_ref being "modified". After removing vid_ref out of the picture
it will "modify" vid_fullscreen to replicate the same behaviour.

Variable "name" (who used to hold refresh dll name) is now left unused

All references to vid_ref cvar has been taken out ...
2013-06-15 10:27:30 +02:00
Alejandro Ricoveri
35e1792c91 Input backend refactoring
Get rid of input backend function pointers + some code cleanup that is no longer necessary
2013-06-15 10:27:30 +02:00