Commit graph

25 commits

Author SHA1 Message Date
Sam Lantinga cc1f9eb983 Use Apple's nomenclature for macOS and iOS
Fixes https://github.com/libsdl-org/SDL/issues/6621
2022-11-25 16:00:06 -08:00
Pierre Wendling f25b4b2774 Style: Flip if statement. 2022-06-27 15:19:40 -07:00
Pierre Wendling 6c536afdb7 Fix C89 declaration for macOS modules.
Since Clang 14, `-Wdeclaration-after-statement` is enforced on every
standard.
2022-06-27 15:19:40 -07:00
Charlie Birks 99af3281ee timer: Fix Emscripten declaration-after-statement error 2022-01-22 12:27:54 +00:00
Sam Lantinga 120c76c84b Updated copyright for 2022 2022-01-03 09:40:21 -08:00
Sylvain c7065bf42f
Fix warning: declaration shadows a local variable 2021-11-09 13:33:24 +01:00
Sam Lantinga 8593076da7 Fixed whitespace 2021-11-02 16:04:36 -07:00
Brick 62629c2b5d Fix 64-bit timeval/timespec delta calculations 2021-11-02 16:02:18 -07:00
Ryan C. Gordon cca79d32a2 android: Patched SDL_GetTicks64() to compile. 2021-11-01 14:28:00 -04:00
Ryan C. Gordon affb183ea4 unix: Fixed SDL_GetTicks64 function signature. 2021-11-01 14:28:00 -04:00
Ryan C. Gordon 99c9727dc0 timer: Added SDL_GetTicks64(), for a timer that doesn't wrap every ~49 days.
Note that this removes the timeGetTime() fallback on Windows; it is a
32-bit counter and SDL2 should never choose to use it, as it only is needed
if QueryPerformanceCounter() isn't available, and QPC is _always_ available
on Windows XP and later.

OS/2 has a similar situation, but since it isn't clear to me that similar
promises can be made about DosTmrQueryTime() even in modern times, I decided
to leave the fallback in, with some heroic measures added to try to provide a
true 64-bit tick counter despite the 49-day wraparound. That approach can
migrate to Windows too, if we discover some truly broken install that doesn't
have QPC and still depends on timeGetTime().

Fixes #4870.
2021-11-01 14:28:00 -04:00
Sam Lantinga 2426949a18 Removed support for clock_gettime_nsec_np()
SDL_GetTicks() was broken and it's not adding any real value here.
2021-02-10 10:22:19 -05:00
Sam Lantinga 96cfb81232 Fixed bug 5467 - SDL sys timer Mac OS update proposal
David Carlier

Change of api from 2016 which reduce code complexity a bit.
2021-01-24 00:51:25 -05:00
Sam Lantinga 9130f7c377 Updated copyright for 2021 2021-01-02 10:25:38 -08:00
Sam Lantinga cb36189692 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.
2020-12-09 07:16:22 -08:00
Sylvain Beucler e594a6738a emscripten: Introduce SDL_HINT_EMSCRIPTEN_ASYNCIFY
See https://github.com/emscripten-core/emscripten/issues/10746

and

https://github.com/emscripten-ports/SDL2/pull/112

Fixes Bugzilla #4997.
2020-06-27 16:25:47 -04:00
Sylvain Beucler 01af7b0254 emscripten: support pseudo-synchronous screen refresh and events update using asyncify 2020-06-27 16:22:50 -04:00
Sam Lantinga a8780c6a28 Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
Sam Lantinga 5e13087b0f Updated copyright for 2019 2019-01-04 22:01:14 -08:00
Sylvain Becker 7468d1e096 Fix warnings detected on Android build 2018-12-06 15:46:40 +01:00
Sam Lantinga e3cc5b2c6b Updated copyright for 2018 2018-01-03 10:03:25 -08:00
Sam Lantinga 45b774e3f7 Updated copyright for 2017 2017-01-01 18:33:28 -08:00
Sam Lantinga 57d01d7d67 Patch from Sylvain to fix clang warnings 2016-11-13 22:57:41 -08:00
Sam Lantinga 42065e785d Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Philipp Wiesemann 0e45984fa0 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().
2015-06-21 17:33:46 +02:00