|
9130f7c3
|
2021-01-02T10:25:38
|
|
Updated copyright for 2021
|
|
cb361896
|
2020-12-09T07:16:22
|
|
Fixed bug 5235 - All internal sources should include SDL_assert.h
Ryan C. Gordon
We should really stick this in SDL_internal.h or something so it's always available.
|
|
0500c044
|
2020-11-12T07:53:05
|
|
Fix SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL also applying to HIGH priorities
As the name suggests, the hint should only apply to SDL_THREAD_PRIORITY_TIME_CRITICAL
The resulting priorities for my current distro result in these values:
| High | Time Critical
Hint |--------------|-----------------
0 | P=10 N=-10 | P=5 N=-15
1 | P=10 N=-10 | P=-21 N=0
|
|
07eae7d6
|
2020-11-11T08:47:18
|
|
Fix process randomly getting killed when SDL_THREAD_PRIORITY_HIGH/TIME_CRITICAL is set
When we request realtime priority from rtkit, we have a rttime limit. If we exceed
that limit, the kernel will send SIGKILL to the process to terminate it.
This isn't something that most high priority processes will want, only processes
that selectively opt into SCHED_RR/FIFO through SDL_HINT_THREAD_PRIORITY_POLICY
should be subject to this level of scrutiny.
This change:
* Switches non-apple posix OSs to use SCHED_OTHER instead of SCHED_RR
for SDL_THREAD_PRIORITY_HIGH/SDL_THREAD_PRIORITY_TIME_CRITICAL.
* Fixes using a hardcoded RLIMIT_RTTIME, instead queries it from rtkit
* Only sets RLIMIT_RTTIME for MakeRealtime rtkit requests
* Adds a note regarding the possible SIGKILL with SDL_HINT_THREAD_PRIORITY_POLICY
* Introduces SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL to allow apps to acquire realtime scheduling policies on Linux
|
|
0713c579
|
2020-05-26T13:19:44
|
|
More Linux fixes.
|
|
c7d1dab1
|
2020-05-26T13:19:41
|
|
Rename Linux-only variable.
|
|
b820a81f
|
2020-05-26T13:19:35
|
|
Include SDL_hints.h.
|
|
de866e66
|
2020-05-26T13:19:29
|
|
Include SDL_hint.h.
|
|
abd58418
|
2020-05-26T13:19:19
|
|
Make some changes to SDL_SetThreadPriority to try and have SDL transparently handle more of the work.
1. Comment that SDL_SetThreadPriority will make any necessary system changes when applying priority.
2. Add a hint to override SDL's default behavior for scheduler policy.
3. Modify the pthreads SDL_SetThreadPriority so that instead of just using the current thread scheduler policy it will change it to a policy that should work best for the requested priority.
4. Add hint checks in SDL_SetThreadPriority so that #3 can be overridden if desired.
5. Modify the Linux SDL_SetThreadPriority so that in the case that policy, either by SDL defaults or from the hint, is a realtime policy it uses the realtime rtkit API.
6. Prior to calling rtkit on Linux make the necessary thread state changes that rtkit requires. Currently this is done every time as it isn't expected that SDL_SetThreadPriority will be called repeatedly for a thread.
|
|
b6afbe63
|
2020-04-07T09:38:57
|
|
Added SDL_log.h to SDL_internal.h so logging is available everywhere
|
|
378a5cfb
|
2020-04-01T16:39:05
|
|
Updated thread priorities for Apple operating systems
|
|
46bb47cf
|
2020-03-26T22:14:59
|
|
thread: Put all important SDL_CreateThread internal data into SDL_Thread.
This avoids the need to malloc something extra, use a semaphore, etc, and
fixes Emscripten with pthreads support, which might not spin up a web worker
until after SDL_CreateThread returns and thus can't wait on a semaphore at
this point in any case.
Fixes Bugzilla #5064.
|
|
8f1a916a
|
2020-02-13T20:50:47
|
|
Add basic support for compiling on RISC OS
|
|
a8780c6a
|
2020-01-16T20:49:25
|
|
Updated copyright date for 2020
|
|
b458d7a2
|
2019-10-30T15:13:55
|
|
Readability: remove redundant cast to the same type
|
|
5e13087b
|
2019-01-04T22:01:14
|
|
Updated copyright for 2019
|
|
252dc85e
|
2018-12-06T09:22:00
|
|
Fix warnings detected on Android build
|
|
1689e9f9
|
2018-12-05T16:51:22
|
|
linux: Move SDL_LinuxSetThreadPriority() elsewhere to fix build.
Fixes Bugzilla #4393.
|
|
6259a726
|
2018-12-05T16:13:12
|
|
Warnings: fix a documentation warning and missing prototypes
|
|
c4bc59a5
|
2018-12-01T10:36:26
|
|
Patched to compile on Linux with --disable-threads.
Fixes Bugzilla #4393.
|
|
0ad4b0b6
|
2018-05-21T12:00:21
|
|
thread: fixed compiler warnings on non-Linux systems that use pthread.
(static function rtkit_setpriority was unused, moved it in with rest of
__LINUX__ section.)
|
|
8f780e76
|
2018-04-23T22:17:56
|
|
Fixed build
|
|
f521b22e
|
2018-04-23T22:07:56
|
|
Added SDL_THREAD_PRIORITY_TIME_CRITICAL
|
|
b5d231ee
|
2018-04-23T19:20:12
|
|
Handle NULL return from SDL_DBus_GetContext()
|
|
43231256
|
2018-04-23T19:18:52
|
|
Added SDL_LinuxSetThreadPriority() to directly set the priority of a Linux thread (tid)
This function tries using RealtimeKit connecting over DBUS as needed.
|
|
816a6e68
|
2018-04-23T17:10:36
|
|
Added support for adjusting thread priorities using Linux RealtimeKit
Michael Sartain
This is a quick pass at adding Linux RealtimeKit thread priority support to SDL.
It allows me to bump the thread priority to high without root privileges or setting any caps, etc.
rtkit readme here:
http://git.0pointer.net/rtkit.git/tree/README
|
|
75a58303
|
2018-02-17T23:57:57
|
|
pthread: fix error code checks (thanks, Andreas!).
Most pthread functions return 0 on success and non-zero on error, but those
errors might be positive or negative, so checking for return values in the
Unix style, where errors are less than zero, is a bug.
Fixes Bugzilla #4039.
|
|
40b27fd5
|
2018-02-12T17:00:00
|
|
revert the recent typecast assignment changes (see bug #4079)
also change the void* typedefs for the two vulkan function
pointers added in vulkan_internal.h into generic function
pointer typedefs.
|
|
90e72bf4
|
2018-01-30T18:08:34
|
|
Fixed ISO C99 compatibility
SDL now builds with gcc 7.2 with the following command line options:
-Wall -pedantic-errors -Wno-deprecated-declarations -Wno-overlength-strings --std=c99
|
|
e3cc5b2c
|
2018-01-03T10:03:25
|
|
Updated copyright for 2018
|
|
619ab7a2
|
2017-05-01T18:39:05
|
|
haiku: Various fixes from haikuports.
Based on patch here:
https://github.com/haikuports/haikuports/blob/master/media-libs/libsdl2/patches/libsdl2-2.0.5.patchset
|
|
45b774e3
|
2017-01-01T18:33:28
|
|
Updated copyright for 2017
|
|
83cb2b63
|
2016-10-14T06:57:55
|
|
Fixed bug 2758 - Android issues with NDK r10c and API-21
Sylvain
After a long time, I found out more clearly what was going wrong.
The native libraries should be built with a "APP_PLATFORM" as low as possible.
Ideally, APP_PLATFORM should be equals to the minSdkVersion of the AndroidManifest.xml
So that the application never runs on a lower APP_PLATFORM than it has been built for.
An additional good patch would be to write explicitly in "jni/Application.mk": APP_PLATFORM=android-10
(If no APP_PLATFORM is set, the "targetSdkVersion" of the AndroidManifest.xml is applied as an APP_PLATFORM to the native libraries. And currently, this is bad, because targetSdkVersion is 12, whereas minSdkLevel is 10.
And in fact, there is a warning from ndk: "Android NDK: WARNING: APP_PLATFORM android-12 is larger than android:minSdkVersion 10 in ./AndroidManifest.xml".)
to precise what happened in the initial reported test-case:
Let say the "c" code contains a call to "srand()".
with APP_PLATFORM=android-21, libSDL2.so contains a undef reference to "srand()".
with APP_PLATFORM=android-10, libSDL2.so contains a undef reference to "srand48()".
but srand() is missing on devices with APP_PLATFORM=android-10 (it was in fact replaced by srand48()).
So, if you build for android-21 (where srand() is available), you will really have a call to "srand()" and it will fail on android-10.
That was the issue. The path tried to fix this by in fact always calling srand48().
SDL patches that were applied are beneficial anyway, there are implicitly allowing they backward compatibility of using android-21 on a android-10 platform.
It can be helpful in case you want to target a higher APP_PLATFORM than minSdkVersion to have potentially access to more functions.
Eg you want to have access to GLES3 functions (or other) of "android-21". But, if dlopen() fails (on android-10), you do a fall-back to GLES2.
|
|
741aaf4c
|
2016-10-12T22:34:54
|
|
Added a note on how to allow non-root applications to increase their thread priority on Linux
|
|
7ae2951f
|
2016-04-12T14:38:50
|
|
threads: Handle SDL_HINT_THREAD_STACK_SIZE at top level, implement elsewhere.
|
|
42065e78
|
2016-01-02T10:10:34
|
|
Updated copyright to 2016
|
|
696cd797
|
2015-12-29T02:32:47
|
|
NetBSD: fixed issues with cpuinfo and pthread_setname_np (thanks, Thomas!).
Fixes Bugzilla #3176.
|
|
98986f39
|
2015-08-15T21:21:29
|
|
Removed not needed call to pthread_attr_getstacksize() for SDL_CreateThread().
|
|
0e45984f
|
2015-06-21T17:33:46
|
|
Fixed crash if initialization of EGL failed but was tried again later.
The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly
uninitialized data structure if loading the library first failed. A later try to
use EGL then skipped initialization and assumed it was previously successful
because the data structure now already existed. This led to at least one crash
in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was
dereferenced to make a call to eglBindAPI().
|
|
1a348aac
|
2015-06-17T21:05:25
|
|
Android: Fixed two warnings.
|
|
45989035
|
2015-06-17T00:07:45
|
|
Partial fix for bug 2758 - Android issues with NDK r10c and API-21
Sylvain
When using API 21 and running on an old device (android < 5.0 ?) some function are missing.
functions are (at least) : signal, sigemptyset, atof, stpcpy (strcat and strcpy), srand, rand.
Very few modifications on SDL to get this working :
on SDL
======
Undefine android configuration :
HAVE_SIGNAL
HAVE_SIGACTION
HAVE_ATOF
In "SDL_systrhead.c", comment out the few block of lines with "sigemptyset".
Android.mk:
remove the compilation of "test" directory because it contains a few rand/srand calls
Also, there are more discussions about this in internet :
https://groups.google.com/forum/#!topic/android-ndk/RjO9WmG9pfE
http://stackoverflow.com/questions/25475055/android-ndk-load-library-cannot-locate-srand
|
|
059a0307
|
2015-05-26T21:30:41
|
|
Uh, yeah, it helps to press "Save" before committing...
|
|
baea64e6
|
2015-05-26T21:19:23
|
|
Stack hint should look for 0, not -1, and not care about environment variables.
|
|
a8fa7bd1
|
2015-05-26T21:13:27
|
|
Added a hint to specify new thread stack size (thanks, Gabriel!).
Fixes Bugzilla #2019.
(we'll do a better fix when we break the API in SDL 2.1.)
|
|
2c4a6ea0
|
2015-05-26T06:27:46
|
|
Updated the copyright year to 2015
|
|
b72938c8
|
2015-04-20T12:22:44
|
|
Windows: Always set the system timer resolution to 1ms by default.
An existing hint lets apps that don't need the timer resolution changed avoid
this, to save battery, etc, but this fixes several problems in timing, audio
callbacks not firing fast enough, etc.
Fixes Bugzilla #2944.
|
|
fe6c797c
|
2015-04-10T23:30:31
|
|
Fixed an iOS view orientation issue when SDL_GL_CreateContext or SDL_CreateRenderer is called.
|
|
b88ca1b4
|
2015-02-10T16:28:56
|
|
the last parameter of XChangeProperty is the number of elements.. and when the element format is 32.. the element is "long" so we have 5 long elements here.
Yes this seems confusing as on mac+linux Long is either 32 or 64bits depending on the architecture, but this is how the X11 protocol is defined. Thus 5 is the correct value for the nelts here. Not 5 or 10 depending on the architecture.
More info on the confusion https://bugs.freedesktop.org/show_bug.cgi?id=16802
|
|
b48e54aa
|
2015-01-26T22:00:29
|
|
Fixed bug 2802 - [patch] Fix android build compiling in wrong filesystem implementation
Jonas Kulla
The configure script didn't differentiate between Linux and Android, unconditionally compiling in the unix implementation of SDL_sysfilesystem.c.
I'm probably one of the very few people building SDL for android using classic configure + standalone toolchain, so this has gone undetected all along.
|
|
70438be2
|
2014-12-03T10:55:23
|
|
WinRT: fixed bug whereby SDL would override an app's default orientation
WinRT apps can set a default, preferred orientation via a .appxmanifest file.
SDL was overriding this on app startup, and making the app use all possible
orientations (landscape and portrait).
Thanks to Eric Wing for the heads up on this!
|
|
9c398852
|
2014-11-22T22:20:40
|
|
Corrected header file documentation comment.
|
|
24c86b55
|
2014-09-11T19:24:42
|
|
[X11] Reconcile logical keyboard state with physical state on FocusIn
since the window system doesn't do it for us like other platforms.
This prevents sticky keys and missed keys when going in and out
of focus, for example Alt would appear to stick if switching away
from an SDL app with Alt-Tab and had to be pressed again.
CR: Sam
|
|
7e52722d
|
2014-06-20T11:10:16
|
|
Fix compiler warnings in Native Client and Linux builds.
|
|
1e352d79
|
2014-06-06T15:45:59
|
|
Chrome's Native Client backend implementation
|
|
3dcb451f
|
2014-04-09T21:29:19
|
|
Added a README file regarding WinRT support
To note, this file is currently formatted with CRLF line endings, rather than
LF, to allow the file to be viewed with Notepad.
|
|
58edac3e
|
2014-02-02T00:53:27
|
|
Fixed bug 2374 - Update copyright for 2014...
Is it that time already??
|
|
f848adff
|
2013-11-29T10:06:08
|
|
Improve Android pause/resume behavior.
|
|
7e1289af
|
2013-11-24T23:56:17
|
|
Make internal SDL sources include SDL_internal.h instead of SDL_config.h
The new header will include SDL_config.h, but allows for other global stuff.
|
|
8d6e03f3
|
2013-11-14T00:52:39
|
|
Added SDL_DetachThread() API.
|
|
7550ddcc
|
2013-11-13T22:35:26
|
|
Started BeOS removal: merged BeOS thread and pthread code.
Haiku uses most of the standard pthread API, with a few #ifdefs where we
still need to fallback onto the old BeOS APIs.
BeOS, however, does not support pthreads (or maybe doesn't support it well),
so I'm unplugging support for the platform with this changeset. Be Inc went
out of business in 2001.
|
|
dad42067
|
2013-08-12T11:13:50
|
|
Fixes #2022, do not resume on Android when surfaceChanged
If the app is in landscape mode and the user presses the power button, a pause
is followed immediately by a surfaceChanged event because the lock screen
is shown in portrait mode. This triggers a "false" resume.
So, we just pause and resume following the onWindowFocusChanged events.
Also, wait for SDL_APP_WILLENTERBACKGROUND and SDL_APP_DIDENTERBACKGROUND before
blocking the event pump.
|
|
1ad936eb
|
2013-08-11T19:56:43
|
|
Fixed bug 2027 - Full-screen appears to be broken - hang in SDL_DestroyWindow()
Rainer Deyke
I'm running Linux Mint 15 with the Cinnamon window manager. SDL_DestroyWindow consistently locks up for me when the window if fullscreen.
|