Commit Graph

8734 Commits (1bfefb5b4d5fbd9899fca460442240dad2bd4510)

Author SHA1 Message Date
Ozkan Sezer 1bfefb5b4d regenerated configure script. 2022-01-17 20:56:50 +03:00
Ozkan Sezer a575e2cf5e Enable alloca on mingw/cygwin builds:
This effectively reverts commit 391d73e37b26614e2e343ca8e9d4334e07380896
Fixes https://github.com/libsdl-org/SDL/issues/5234
2022-01-17 20:56:24 +03:00
Ozkan Sezer 33dadbf137 'dnl' whitespace tidy-up in configure.ac 2022-01-17 20:56:20 +03:00
Cameron Gutman d3952a8a2c wayland: Avoid spurious resize events 2022-01-17 11:30:03 -06:00
Sam Lantinga b06866ef97 Entirely remove Xbox axis filtering, we don't want this at all. 2022-01-16 09:44:28 -08:00
Sam Lantinga 09aed1020b Don't send output reports to the Victrix Pro FS v2
It'll hang on reboot if it gets output reports, and it doesn't have functionality that requires them, so skip it.
2022-01-16 09:23:58 -08:00
Sam Lantinga 85961b61a1 Disable Xbox axis deadzone handling by default
Fixes https://github.com/libsdl-org/SDL/issues/5227
2022-01-16 09:01:56 -08:00
Mathieu Eyraud 2a0cde8fd5 Always send SDL_WINDOWEVENT_SIZE_CHANGED when window is resized
SDL_WINDOWEVENT_SIZE_CHANGED is now sent even if the resulting size of the window does not match the requested size.
2022-01-16 08:49:48 -08:00
Sam Lantinga 1a50334c46 Fixed Xbox One trigger axis zero point 2022-01-14 15:04:26 -08:00
Ozkan Sezer e9511f7136 hidapi, libusb: don't use iconv on OS/2, it lacks wchar_t functionality.
Taken from a patch by Silvan Scherrer at bitwiseworks' OS/2 fork.
2022-01-14 14:39:04 +03:00
Ethan Lee 9a2bbd8acb wayland: Convert URI to local path for DropFile 2022-01-12 13:01:05 -05:00
Ozkan Sezer 0abc0a6f32 SDL_string.c: tidy-up gcc2 va_copy defines after previous haiku commit. 2022-01-12 20:37:32 +03:00
kenmays d37c9777b9 haiku: updated for Haiku 2022-01-12 09:32:56 -08:00
kenmays bff867013e haiku: updated for Haiku 2022-01-12 09:32:56 -08:00
kenmays 094e94402d haiku: Remove BDirectWindow, fix OpenGL handling.
From e6cc4e7f4b8189be55dd3b0e13e54e59f73d7672 Mon Sep 17 00:00:00 2001
From: X512 <danger_mail@list.ru>
Date: Thu, 30 Jan 2020 04:01:58 +0900
Subject: libsdl2: Remove BDirectWindow, fix OpenGL handling.

* BDirectWindow changed to BWindow.
* Implemented fullscreen.
* Introduced view for non-OpenGL drawing.
* Drawing thread removed, window thread is used instead.
* Use BGLView as OpenGL context. Implement proper context switching and OpenGL
  locking. Only one context per window is supported. BGLView should be not
  deleted when window is closed, it deleted when deleting context.
2022-01-12 09:32:56 -08:00
Ozkan Sezer 407d4e470a cmake: simplify after the previous os/2 commit. 2022-01-12 20:32:00 +03:00
Ozkan Sezer f199f832e9 cmake: added target_properties for os/2. 2022-01-12 20:22:28 +03:00
Ozkan Sezer 5b6e2d69a5 SDL_os2messagebox.c (_makeDlg): remove unnecessary casts 2022-01-12 11:01:02 +03:00
Ryan C. Gordon ae9e2149a5
os2-buildbot.sh: Use the 64-bit Watcom binaries.
GitHub Actions is a 64-bit Ubuntu instance. It was only using the 32-bit
binaries because our buildbot put this on the 32-bit Linux host to spread
the CPU load around more evenly.
2022-01-11 21:32:07 -05:00
Ryan C. Gordon 42302d0a59
x11: Let apps specify a custom _NET_WM_WINDOW_TYPE.
Fixes #5185.
2022-01-11 21:17:21 -05:00
Ryan C. Gordon f9b918ff40 opengles2: Use client-side arrays on everything but Emscripten.
Turns out they're much faster!

Fixes #5206.
2022-01-11 19:41:41 -05:00
ulatekh bb9ebad74b Optionally disable generation of SDL2main and uninstall projects.
Mostly meant to allow SDL2 to be incorporated as a sub-project of
external CMake projects.
2022-01-11 15:56:37 -08:00
Khem Raj fcf0e524bb cmake: Remove libunwind-generic as hard dependency
when using alternate unwind implementations like LLVM libunwind
this library is not provided yet the libunwind features are fully
implemented in main libunwind, making this hard dependency assumes
a particular libunwind implementation, this patch makes it optional
which makes the builds to work with llvm libunwind

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-01-11 11:00:20 -08:00
Sam Lantinga 73434a964c Removed debian directory
This isn't used directly by any distribution and isn't helpful at this point.
2022-01-11 10:37:59 -08:00
Max Krummenacher c3a7cc34fb cmake: sdlchecks.cmake: pass cflags to the appropriate cmake variable
If egl.pc sets at least two macros as the i.MX Vivante driver does, e.g.:
| Cflags: -I${includedir} -DLINUX -DWL_EGL_PLATFORM

then we get the following error during configuration:

| -- Performing Test HAVE_OPENGL_EGL
| CMake Error: Parse error in command line argument: WL_EGL_PLATFORM
|  Should be: VAR:type=value

If one changes to add a value to the macro, e.g.
| Cflags: -I${includedir} -DLINUX=1 -DWL_EGL_PLATFORM=1
then cmake does not error out but the macro is not passed to the
C compiler.

CMAKE_REQUIRED_FLAGS is the wrong variable to pass the CFLAGS in,
CMAKE_REQUIRED_DEFINITIONS should be used.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2022-01-11 09:00:37 -08:00
Ozkan Sezer ea0bca573d SDL_cocoamodes.m: fix build against older SDKs.
Fixes https://github.com/libsdl-org/SDL/issues/5208
2022-01-11 14:56:56 +03:00
Ozkan Sezer 7527c8d3d7 hidapi, libusb: provide a wcsdup implementation if it is not available.
similar to mac and android versions..
2022-01-11 11:33:02 +03:00
Ozkan Sezer c6c4d4211b pthread: disable SetThreadPriority for OS/2 too 2022-01-11 11:33:02 +03:00
Ozkan Sezer b265677610 cmake: initial attempt at adding os/2 support. 2022-01-11 11:33:02 +03:00
SDL Wiki Bot b424665e08 Sync wiki -> header 2022-01-10 20:40:05 +00:00
SDL Wiki Bot 5e3f4ccc34 Sync wiki -> header 2022-01-10 20:35:04 +00:00
Sam Lantinga d8129c5698 Mark internal function as static 2022-01-10 10:50:59 -08:00
Ethan Lee 3e1b3bc344
wayland: Horizontal wheel values do not need to be inverted 2022-01-10 10:07:44 -05:00
Sam Lantinga a29d3acc9e Updated Bresenham line drawing to match software renderer output 2022-01-09 11:12:13 -08:00
Ozkan Sezer b9d98331c5 os2joystick: fix uninitialized use of local var 'maxdevs' 2022-01-09 20:33:32 +03:00
Ozkan Sezer 17da60068d os2joystick: fix -Wsequence-point issues. 2022-01-09 20:33:32 +03:00
Ozkan Sezer f14c7bb443 added missing hidapi stuff for os/2 with libusb 2022-01-09 20:33:32 +03:00
Sam Lantinga 1f32dd8edc Fixed overdraw with duplicate points, fixed not drawing single point lines 2022-01-09 06:36:18 -08:00
Ryan C. Gordon 5d07c03613
psp: Force channels to stereo if user requested anything other than mono.
Before it would only clamp to stereo if it also had to resample, which would
fail if the app specified 44100Hz and surround sound.
2022-01-09 08:13:34 -05:00
Ryan C. Gordon c275436f56
opengles2: Batching lines/points used wrong var for summing vertex counts.
Fixed this in the vitagxm backend too, but I don't know what the state of
that code is otherwise.

Reference Issue #5061.
2022-01-09 00:39:02 -05:00
Joan Bruguera 9e6249fa54 wayland: Avoid spurious key repeats when not pumping events
Previous to this commit, key repeats events were typically generated when
pumping events, based on the time of when the events are pumped. However,
if an application doesn't call `SDL_PumpEvents` for some seconds, this time
can be multiple seconds in the future compared to the actual key up event time,
and generates key repeats even if a key was pressed only for an instant.

In practice, this can happen when the user presses a key which causes the
application to do something without pumping events (e.g. load a level).
In Crispy Doom & PrBoom+, when the user presses the key bound to "Restart
level/demo", the game doesn't pump events during the "screen melt" effect,
and the level is restarted multiple times due to spurious repeats.

To fix this, if the key up event is among the events to be pumped, we generate
the key repeats there, since in the Wayland callback we receive the time when
the key up event happened. Otherwise, we know no key up event happened and we
can generate as many repeats as necessary after pumping.

Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
2022-01-08 14:10:22 -08:00
Joan Bruguera 461724d287 wayland: Refactor time fields in SDL_WaylandKeyboardRepeat
Refactorization with no functional changes.

Instead of `next_repeat_ms` containing a timestamp based on SDL ticks, we make
it zero-based relative to the key press time, and we store the key press time in
SDL ticks in a new field.

This refactorization is groundwork for future commits which need to use the
key press and release timestamps provided by the Wayland API, which are also
expressed in milliseconds, but whose base does not match the one for SDL ticks.

Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
2022-01-08 14:10:22 -08:00
Joan Bruguera fb0c3040c0 wayland: Avoid infinite loop in keyboard_repeat_handle
If `repeat_info->next_repeat_ms` overflows, many key presses will be generated.
In the worst case, `now = 0xFFFFFFFFU` and the loop will never terminate.

Rearrange the comparison in order to gracefully handle the overflow case.

Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
2022-01-08 14:10:22 -08:00
Sam Lantinga 3b083b9911 Fixed compile warning 2022-01-08 14:07:42 -08:00
Sam Lantinga b82af9dfbf Improved OpenGL point drawing performance (thanks @slime73!)
We'll do proper call batching for the SDL 2.0.22 release
2022-01-08 14:05:50 -08:00
Sam Lantinga 1a73c45a08 Fixed incorrect color in the OpenGL driver 2022-01-08 13:35:17 -08:00
Sylvain 3cdda8f8ab
PSP: use 'data' variable which is alread the driver data 2022-01-08 21:58:26 +01:00
Sam Lantinga 9f1e609aa0 Document SDL_HINT_RENDER_LINE_METHOD in the release notes 2022-01-08 12:42:36 -08:00
Sam Lantinga 4ef2529bf9 More efficient calculation of render_count 2022-01-08 12:37:57 -08:00
Sam Lantinga 5346c93b62 Fixed assertion on number of points rendered 2022-01-08 12:28:43 -08:00