Pulseaudio audio capture didn't stop when paused on Debian 8 but works
on Debian 9 when using the same manual SDL build. So it seems to have
been an issue in pulseaudio, not SDL.
There is no need for a tentative definition in this case. By providing
an explicit initializer, the resulting definition has the same effect
as before, but is no longer tentative. This avoids easy errors
resulting from multiple tentative definitions in different translation
units. (Previous compilers permitted those common errors, but GCC 10
rejects them by default.)
GL_CLAMP (clamp to border) was changed to GL_CLAMP_TO_EDGE in 2008
(f2baf359). In 2018 (ce1d5406) I made OpenGL 1.2 be required since
GL_CLAMP_TO_EDGE is used.
Restore support for GL_CLAMP in order to support OpenGL 1.1 like vanilla
Quake 3 does. This should allow using the default Microsoft Windows
GDI Generic OpenGL 1.1 driver (untested but it won't fail the version
check at least).
From gpuinfo.org, it looks like drivers stopped advertising support for
GL_SGIS_texture_edge_clamp so use a version check in addition to the
extension check.
r_allowExtensions 0 disables using GL_CLAMP_TO_EDGE in the opengl1
renderer. GL_CLAMP support wasn't added to the opengl2 renderer.
My commit last month "Fix SDL audio playback with surround sound" broke
16-bit stereo sound. S_TransferStereo16() still assumed that dma.samples
was a power of two. I also cleaned up code related to the previously
mentioned commit.
If user has surround sound enabled, ioq3 would not play any sound.
Fix painting sound buffer for 4/5.1 audio channels. Extra channels
currently play no audio.
Load functions procs supported by OpenGL ES 2.0, though there is not a
compatible renderer yet. Change argument for GLimp_Init from coreContext
to fixedFunction.
Also declare the GL functions in tr_local.h so there is compile error
for non-core GL functions instead of SEGFAULT from dereferencing a NULL
pointer.
Disable the non-functional stencil shadow code that hasn't been updated
to use OpenGL 3.2 core compatible drawing.
If renderer is compiled into client (USE_RENDERER_DLOPEN=0) and after
start up set r_allowExtension to 0 and run vid_restart, some extension
were still used.
When you start recording using SDL pulseaudio driver the client sends
all audio captured while not recording. 240 milliseconds of audio is
sent each frame until the capture buffer is empty. This is a problem for
privacy and causes confusing to debug VoIP playback issues on other
clients connected to server and when playing back demos.
The version check is required for supporting macOS PPC with SDL 2.0.1
and Travis-CI (Ubuntu Trusty) with SDL 2.0.2.
The client now requires SDL 2.0.5 runtime if compiled against SDL 2.0.5
or newer.
This is a little bit of future-proofing, but also gives us a little more
flexibility in general; now we can add in the cvars to open a specific
device, etc, that the OpenAL codepath does.
In SDL2, the initialized subsystems are referenced counted, so it's safe to
initialize them twice, and it makes the SDL_QuitSubSystem during our shutdown
correctly decrement the count. Before (as a probably-harmless bug), it would
not increment the refcount if the subsystem was already initialized, causing
problems when it decremented it later.
The values passed to SDL are just the minimum required. Get actually
values of colorbits, depthbits, and stencilbits from SDL instead of
assuming that the engine got exactly what it asked for.
cls.glconfig.isFullscreen was not updated when changing r_fullscreen
without a vid_restart. Starting in fullscreen and switching to
windowed mode would not release the mouse.
Mods calling trap_GetGlconfig() after a fullscreen toggle now get
the correct value for isFullscreen. (Note: Mods already got the
correct value at start up and after vid_restart.)
Reported by Mickaël "mickael9" Thomas.
- Parse OpenGL version in sdl_glimp.c to share with both renderers.
- Add GL_VERSION_ATLEAST(major, minor) macro.
- Get address of glGetStringi if using OpenGL 3.
- Fix glConfig.extensions_string when using GL3 core context in
opengl2 renderer.
- Make opengl1 renderer's gfxinfo support qglGetStringi too.
Get all OpenGL functions using SDL_GL_GetProcAddress(). This makes it
easier to cross-arch compile on Linux and add support for OpenGL ES
in the future.
Users still have to supply their own libSDL2 for cross-arch compiling
on Linux. But now the user does not have to re-install libgl1-mesa-dev
package for i386 or amd64 on Debian when switching between compiling
ioquake3 for x86 and x86_64.
Disable SDL relative mouse mode when in_nograb is enabled. Relative
mouse mode hides the cursor and it cannot exit the window regardless
of the window's grab state.
This wasn't always the case. SDL before 2.0.4 on GNU/Linux released
the mouse cursor in relative mode. However, SDL 2.0.3/4 on Windows
does not. (I did not test other Windows versions.) So I think SDL
2.0.4 made GNU/Linux X11 behavior consistent with other platforms.
This fixes mouse input being unusable when debuging client crashes
in gdb.
SDL doesn't provide exact the exact time that input events happen
so use the earliest possible time that an event could happen.
This make sub-frame input actions such as walking take affect
immediately instead of in the next frame.
Based on patch by Alexander "wareya" Nadeau.