Commit graph

639 commits

Author SHA1 Message Date
Yamagi Burmeister
9a9babf8d6 Add a new cvar "r_waylandcompat"
Commit 9e158470 set the SDL OpenGL attribut SDL_GL_ALPHA_SIZE to 0 since
the alpha channel is used by Wayland. But for X11 the GLX 1.4 specification
clearly states: "If the requested number of bits in attrib_list for a
particular color component is 0 or GLX_DONT_CARE, then the number of
bits for that component is not considered." So if SDL_GL_ALPHA_SIZE is
0 a framebuffer without an alpha channel is created. This is no problem
on the default GLX module due to a non standard implementation but
manifests with Nvidias GLX module. The consequence are render mistakes
like in game display showing static or the flashlight looking weird.
2012-11-13 23:33:00 +01:00
Daniel Gibson
f317b056c6 List.h needs sys/platform.h for ID_INLINE
Everytime List.h is included in a new file (and sys/platform.h isn't)
there are confusing compiler-errors..
So just #include sys/platform.h in List.h directly, because it uses
ID_INLINE which is defined there
2012-11-13 23:28:21 +01:00
Daniel Gibson
a7bfd05797 Use current type for BT_CLOSED enum
doesn't really make a difference code-wise, but removes one compiler warning.
2012-11-13 23:27:07 +01:00
Daniel Gibson
3202f0aa0f Get rid of some compiler warnings
GCC had shitloads of superfluous warnings wherever List.h and Str.h were
included.. get rid of them by using #pragma GCC diagnostic at some places
in List.h and Str.h.
Also add some casts, initialize some variables for other warnings
2012-11-13 23:24:13 +01:00
Daniel Gibson
aedc76b50e Don't save duplicate consecutive commands to history
If the entered command is the same as the last command, don't save
it to history.
2012-11-13 23:21:38 +01:00
Daniel Gibson
04266eee5e Make console history persistent
The console history is saved to a file on quit and restored after
starting the game.
So the commands entered in the console the last times the game was run
are still available in the console-history, just like commands that
were just entered.
2012-11-13 23:21:38 +01:00
Daniel Gibson
8c6e4eb38a Add support for norwegian keyboard layout
via "in_kbd norwegian". It's the '|' and 'ยง' chars (124, 167)

Fixes #33
2012-11-13 23:18:45 +01:00
Daniel Gibson
6d9a43cb23 On Linux/Unix, return EXE-path as base-path if BUILD_DATADIR fails
Using this path was the old behavior and is expected by many users.
2012-11-13 23:16:03 +01:00
Daniel Gibson
768fdb5707 Load base game's gamelib if mod has no own gamelib
Some mods/mappacks have their own game dir (fs_game) but no own gamelib.
Doom3 defaulted to the base game dll (I think), so we should do the same.

Fixes #44
2012-11-13 23:14:57 +01:00
Daniel Gibson
c193e0b98e Win32: Statically link libgcc and libstdc++
Else one needs to copy those files from mingw32.. and I see no reason
not to statically link them.
2012-11-13 23:12:42 +01:00
Daniel Gibson
5936422d9d Fix freezing of dedicated server window on Windows
The code was donated by motorsep, thanks!
2012-11-12 20:18:00 +01:00
Daniel Gibson
105fdb0624 Fix dedicated server for Windows
* the OpenAL function definitions mustn't include __declspec(dllimport)
  => fixed by pretending to compile OpenAL statically
* glimp.cpp shouldn't be used in dedicated-only mode (as it was already
  the case on Linux and OSX)
  => No special handling for ID_DEDICATED needed in glimp.cpp, as it's not
   used anyway
* add APIENTRY to every gl function in stub_gl.cpp for compatibility
  with windows headers and MSVC
* remove GL/gl.h #include from win_local.h as it's not needed
* in qgl.h, when building dedicated server for windows, redefine WINGDIAPI
  to nothing for SDL_opengl.h #include to get rid off __declspec(dllimport)
  by using #pragma push_macro and pop_macro, because our stub is no dll.

Fixes https://github.com/dhewm/dhewm3/issues/39
2012-11-12 20:18:00 +01:00
Daniel Gibson
1f25568762 Remove duplicate functions from openal_stub.cpp + extern C
Some functions were duplicated, the only difference was a const in one
parameter. The definitions in the header were with const, so I kept
those versions.
Also, the functions in the header are pure C, so add extern "C",
this fixes issues with MSVC and the formerly duplicated functions.
2012-11-12 20:15:08 +01:00
Daniel Gibson
fa8f092e67 Unset key modifiers when regaining focus to unset ALT
There used to be a bug (discussed in #40), that ALT was still set after
using ALT-Tab. Thus when next pressing enter fullscreen was toggled.
This should now be fixed by unsetting the modifiers when focus is
regained (SDL_ACTIVEEVENT or SDL_WINDOWEVENT_FOCUS_GAINED).
2012-09-08 16:45:07 +02:00
Daniel Gibson
844cd2d8a8 Don't un-grab mouse when taking screenshots (fixes #18)
On windows un-grabbing (or possibly re-grabbing) the mouse seems to
mess up the view angly (view is centered afterwards), see
https://github.com/dhewm/dhewm3/issues/18
That's fixed by not releasing the mouse (there is no reason to do that
anyway).
2012-08-27 21:27:05 +02:00
dhewg
1b1787bb50 Disable the warning if the mouse grab request fails
This fails on some SDL drivers and just spams the console.
2012-07-28 12:54:25 +02:00
dhewg
9e15847083 Don't use alpha bits for the GL config
Wayland actually uses this.
2012-07-28 12:51:02 +02:00
Daniel Gibson
df81835de0 Fix several bugs from iodoom3 bugtracker
Apply 94cd0ee5 to d3xp as well.
2012-07-20 21:08:04 +02:00
dhewg
89071f1f57 Provide a stub for GLimp_GrabInput()
Fixes compilation of the dedicated server.
2012-07-20 21:04:04 +02:00
dhewg
227e8ee5c9 Add SDL2 support to framework/Common.cpp 2012-07-20 21:02:59 +02:00
dhewg
918e06cf00 Add SDL2 support to sys/osx/DOOMController.mm 2012-07-20 17:41:40 +02:00
dhewg
ed121102f4 Add SDL2 support to sys/win32/SDL_win32_main.c 2012-07-20 17:34:38 +02:00
dhewg
f120900000 SDL2's SDL_TimerID is not a pointer anymore 2012-07-20 17:34:38 +02:00
dhewg
454bebf99f Add SDL2 support in sys/glimp.cpp 2012-07-20 17:34:37 +02:00
dhewg
4f2f855105 Add SDL2 support in sys/events.cpp 2012-07-20 17:34:36 +02:00
dhewg
b8765ccf22 Move GrabInput() and rename to GLimp_GrabInput()
SDL2 supports multiple windows, and the grabbing is set per
window, so move it to sys/glimp.cpp.
2012-07-20 17:34:34 +02:00
dhewg
6dcf07974d Cleanup GrabInput()
Convert to bitflags to ease moving it.
2012-07-20 17:34:34 +02:00
dhewg
a75387c55e Add SDL2 support in sys/threads.cpp 2012-07-20 17:34:33 +02:00
dhewg
368bf2819c Log the SDL version 2012-07-20 17:34:32 +02:00
dhewg
264fdfa10e Add SDL2 support for the build system
Defaults to off, tree doesn't yet compile with SDL2.
2012-07-20 17:34:32 +02:00
dhewg
5639720c1c Add FindSDL2.cmake for SDL2
This is just a modified version of FindSDL.cmake
2012-07-20 16:43:39 +02:00
dhewg
826d0f7b7b cmake: set SDL_BUILDING_LIBRARY for win32 and osx
While that's a lie it makes FindSDL skip SDLmain, which we have
in tree and compile ourselves.
2012-07-20 16:43:38 +02:00
dhewg
e62e3870a3 Don't link against OpenGL
Dynamically load all symbols at runtime.
This in in preparation for SDL2/OpenGLES.
2012-07-20 16:43:37 +02:00
dhewg
63fdea82b4 Get rid of wglext.h
Good riddance.
2012-07-20 16:43:37 +02:00
dhewg
ac921bc99f Get rid of editor specific win32 vars
We don't compile any mfc crap for our own good, so get rid of these.
2012-07-20 16:43:36 +02:00
dhewg
227fac443d Fix description of r_swapInterval
This isn't specific to wgl.
2012-07-20 00:13:07 +02:00
dhewg
bf922dfc59 Get rid of glConfig.wgl_extensions_string
Unused and nobody cares.
2012-07-20 00:13:05 +02:00
dhewg
30d5cb16d0 Disable editor related rendering
These use OpenGL calls, which are useless on all platforms without
editor support.
2012-07-20 00:13:05 +02:00
dhewg
7f3fc825ed Get rid of GetCardCaps()
Useless now.
2012-07-20 00:13:04 +02:00
dhewg
3cdc5cec5c Get rid of unused var allowNV30Path 2012-07-20 00:13:03 +02:00
dhewg
de1b7b9adb Remove spurious call to SetBackEndRenderer()
Like the comment above said, this is invalid and can't work.
The backend is properly set via R_InitOpenGL().
2012-07-20 00:13:03 +02:00
dhewg
f4de0ed8c1 Remove the deprecated arb renderer 2012-07-20 00:13:02 +02:00
dhewg
a5678d2368 Remove the monochrome hack
This was only used for the nv20 renderer.
2012-07-20 00:13:02 +02:00
dhewg
6aa9b3602e Remove the deprecated nv20 renderer 2012-07-20 00:13:01 +02:00
dhewg
3f67a28abe Remove the deprecated nv10 renderer 2012-07-20 00:13:00 +02:00
dhewg
138b7b1def Remove the ATI fragment shader emulation
This was only used by the r200 renderer on OSX.
2012-07-20 00:12:59 +02:00
dhewg
4b67aae8fe Remove the deprecated r200 renderer 2012-07-20 00:12:59 +02:00
dhewg
4675ecb6d3 Get rid of precompiled.[h|.cpp]
Both unused, except for the mfc editors, which don't compile anyway.
2012-07-20 00:12:58 +02:00
dhewg
2cad07c38e Delete util_stub.cpp
Unused.
2012-07-20 00:12:57 +02:00
dhewg
e0fd437ba9 Don't warn about uppercase chars in filenames
Only print those in developer mode.
2012-07-20 00:12:56 +02:00