Compare commits

..

719 Commits

Author SHA1 Message Date
Sam Lantinga
981e1e3c44 Fixed logical size synchronization issue on macOS
https://discourse.libsdl.org/t/sdl-2-0-22-prerelease/35306/6
2022-04-23 10:35:05 -07:00
Ozkan Sezer
7a5743031d hidapi, libusb: import mainstream commit 536bad201e 2022-04-23 20:01:40 +03:00
Sam Lantinga
fa073ed01a Revert "Fix relative mouse input for Unvanquished (unvanquished.net)"
This reverts commit 3318590796.

Fixes https://github.com/libsdl-org/SDL/issues/5569
2022-04-22 22:31:04 -07:00
Sam Lantinga
8986efd643 Added support for the Backbone One controller on iOS 2022-04-22 14:21:46 -07:00
Sam Lantinga
2ca0837888 SDL: sometimes the PS5 controller doesn't report having to power even when connected over USB. Possibly related to being completely charged? Either way we already know that it's USB or BT so let's use the driver's knowledge instead. 2022-04-22 14:21:41 -07:00
Sam Lantinga
04bf7c9434 Fixed build 2022-04-22 09:36:39 -07:00
Sam Lantinga
d9b5805ba5 Return a correlation error when trigger rumble is attempted without correlation 2022-04-22 09:13:40 -07:00
Eddy Jansson
0288de8529 SDL_Rect: Add \sa documentation block to SDL_FRect 2022-04-22 12:09:13 -04:00
Sam Lantinga
ba62ead5ec Handle potential out of memory condition when working with hints 2022-04-21 08:47:41 -07:00
Cameron Gutman
145824f6ab WGI: Only call RoUninitialize() if RoInitialize() succeeded 2022-04-21 08:47:22 -07:00
Cameron Gutman
00b2e10a7a WGI: Keep a reference to the MTA to avoid crashing on COM teardown
Fixes #5552
Fixes #5270
2022-04-21 08:47:22 -07:00
Cameron Gutman
8982d9f403 windows: Fix RoInitialize() failure after a CoInitializeEx() call using apartment threading
This mirrors the same codepath in WIN_CoInitialize() which handles STA and MTA.
2022-04-21 08:47:22 -07:00
Cameron Gutman
923cb4463e windows: Fix calling convention for RoInitialize/RoUninitialize
Fixes #5563
2022-04-20 21:02:40 -05:00
Ryan C. Gordon
d4a01bfef0 os2: SDL_DestroyMutex should ignore NULL mutexes.
Every other backend does this, so this should match, now.
It's possible this was harmless, but we can avoid the system call
and the (likely?) debug message when it fails, though!
2022-04-20 14:08:09 -04:00
Eddy Jansson
a40405d724 hidapi: Wrap CopyHIDDeviceInfo in define checks.
The purpose of this is to silence a 'defined but not used'
warning.
2022-04-20 09:33:40 -07:00
Eddy Jansson
5bc2933425 test: Basic tests for SDL_FRectEquals
Based on the integer version. These tests mostly check that input
isn't mangled and that invalid input gives the expected negative
result.
2022-04-20 08:38:53 -07:00
Eddy Jansson
fc944859d1 SDL_Rect: Use a default epsilon in SDL_FRectEquals()
Add SDL_FRectEqualsEpsilon() for when more control over
equality test is required.
2022-04-20 08:38:53 -07:00
Eddy Jansson
00feca27b0 Add SDL_FLT_EPSILON. 2022-04-20 08:38:53 -07:00
Eddy Jansson
5d4a1f8356 WhatsNew.txt: Add SDL_FRectEqualsEpsilon() 2022-04-20 08:38:53 -07:00
Frank Praznik
aeadbdd788 Remove an unused function prototype 2022-04-20 09:39:34 -04:00
Frank Praznik
c8c59a2139 Fix a -Wshadow warning 2022-04-20 09:39:34 -04:00
Jaylon Gowie
d9009388c8 SceKernelMemBlockType to unsigned int 2022-04-19 14:17:27 -07:00
Jaylon Gowie
3753a7b1c3 Fix recent changes in VitaSDK 2022-04-19 14:17:27 -07:00
Sam Lantinga
02225aa738 Fixed build 2022-04-18 22:57:03 -07:00
Ryan C. Gordon
49a2e4b0ea x11: Revert "Fix keymap updating for X11 backend"
This reverts commit de6d290266.

This patch had multiple issues, discussed in #5520.
2022-04-19 00:37:39 -04:00
Sam Lantinga
b9fe6ba0e7 Fixed compile warnings 2022-04-18 13:09:08 -07:00
Sam Lantinga
57927a2458 Don't call scandir() inside of scandir()
This works around a crash in address sanitizer
2022-04-18 12:57:28 -07:00
Sylvain
1ede941f5c SDL_render.c: internally change viewport/cliprect type from SDL_FRect to SDL_DRect (double precision). (see bug #5547) 2022-04-18 12:26:32 -07:00
Sam Lantinga
9919d1a7a5 Remove HWND_TOPMOST for fullscreen windows
Fixes https://github.com/libsdl-org/SDL/issues/5509
2022-04-18 11:51:54 -07:00
pionere
009a0ff95f use explicit GetModuleFileNameW 2022-04-18 14:12:22 -04:00
pionere
de711e1685 simplify SDL_GetBasePath on windows
- use GetModuleFileName directly (as recommended)
2022-04-18 14:12:22 -04:00
Jan Beich
7c140429a8 Enable evdev-based gamecontrollerdb on FreeBSD 2022-04-18 09:57:49 -07:00
Sam Lantinga
e7b01ee745 Added controller mapping for the Thrustmaster Dual Analog 3.2 on Linux 2022-04-18 09:55:52 -07:00
Frank Praznik
2b52946143 video: Don't minimize fullscreen windows on focus loss by default when mode switching is disabled
When mode switching is disabled in a video backend, fullscreen windows are basically just fullscreen desktop windows with different internal scaling.  As no mode switching occurs, there's no need to minimize them on focus loss by default.  This can still be overridden by explicitly setting the internal hint for minimizing on focus loss.

This has the side effect of fixing a bug on GNOME, where, when a fullscreen Wayland window has it's focus lost and restored via alt+tab followed by switching back to windowed mode, the top portion of the window won't end up being obstructed by GNOME's top bar.
2022-04-18 09:39:25 -07:00
Ethan Lee
c37090f9a4 wayland: Add support for TOOLTIP/POPUP_MENU 2022-04-18 12:31:02 -04:00
Sam Lantinga
9e264b921b Certain audio drivers, like the RME "Pro" Audio driver, have resampling quality issues when using WASAPI.
We'll use SDL's resampling algorithm so we have consistent quality between platforms and drivers.

Fixes https://github.com/libsdl-org/SDL/issues/5538
2022-04-18 09:20:47 -07:00
Sam Lantinga
254fcc90eb Revert "video: Prefer Wayland over X11"
This reverts commit 8ceba27d62.

SDL Wayland support is stable, but there are a number of issues with third-party software (NVIDIA drivers, libwayland event overflow, libdecor not handling plugin load failures, Steam overlay not working with Wayland, etc.) that make it better to default to X11 at this time.

Games which would like to prefer wayland when available can use the following code before SDL_Init():
	SDL_SetHint(SDL_HINT_VIDEODRIVER, "wayland,x11");

Fixes https://github.com/libsdl-org/SDL/issues/5527
2022-04-18 09:03:14 -07:00
Ryan C. Gordon
c1336b21ed hints: Make SDL_VIDEODRIVER and SDL_AUDIODRIVER formal hints.
They were just environment variables before.

Fixes #5528.
2022-04-17 11:31:55 -07:00
Ryan C. Gordon
634b9edc7f cmake: Fixed indenting and some oldschool endif(TEXT) things. 2022-04-15 20:50:55 -04:00
Semphris
dc5bc5237c Added CMake option to disable the installer 2022-04-15 20:48:40 -04:00
Ryan C. Gordon
67e0f546c5 x11: Update the display when the WM changes a window's fullscreen state.
Fixes #5390.
2022-04-15 18:25:53 -04:00
Frank Praznik
edb473cf46 video: Wayland: Always round scaled pointer coordinates down
Rounding up can cause the pointer coordinates to exceed the window boundaries at the right and bottom edges.
2022-04-15 16:24:20 -04:00
Frank Praznik
13393a1c4b video: Wayland: Clamp fullscreen window dimensions to desktop
A scaled fullscreen window may exceed the bounds of the desktop.  Clamp the window size to the desktop dimensions in fullscreen mode.
2022-04-15 16:24:20 -04:00
pionere
0adb67017b avoid NullPointer in SDL_GetRenderTarget 2022-04-15 15:47:35 -04:00
pionere
01b14e14e6 avoid NullPointer in SDL_GL_MakeCurrent 2022-04-15 08:30:33 -04:00
Ozkan Sezer
55a4e1d336 CI: update os2.yml to use open-watcom/setup-watcom
also remove os2-buildbot.sh -- not needed anymore.
2022-04-14 10:10:02 +03:00
Simon McVittie
c36bd78474 WhatsNew.txt: Document new dependency on libwayland-client 1.18.0
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-04-13 10:14:29 -04:00
Ethan Lee
46616af722 WhatsNew.txt: Added SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR 2022-04-12 11:53:40 -04:00
David Gow
9c2f46b0d5 Wayland: Add SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR
This hint allows libdecor to be used even when xdg-decoration is
available. It's mostly useful for debugging libdecor, but could in
theory be used by applications which want to (for example) bundle their
own libdecor plugins.
2022-04-12 11:52:41 -04:00
Mathieu Eyraud
99ae6395b1 Initialise scandir argument
'scandir' does not initialise 'entries' on error
2022-04-12 11:14:07 -04:00
Simon McVittie
68b6fff245 test: Copy utf8.txt to build directory
testiconv wants this.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-04-12 11:01:20 -04:00
Simon McVittie
b4256d03e9 testevdev: Adapt to a broader definition of keyboards
At the time I contributed this unit test, SDL had a relatively narrow
definition of what is a keyboard, approximately matching udev
ID_INPUT_KEYBOARD. Now it uses the equivalent of udev ID_INPUT_KEY,
which matches anything with keyboard keys, and not just reasonably
complete alphanumeric keyboards.

Fixes: 040bd7a9 "Fix udev not detecting ID_INPUT_KEY devices when udev is not running"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-04-12 10:59:53 -04:00
Simon McVittie
c2946902fa testevdev: Recognise touchpads as such
At the time I contributed this unit test, SDL didn't understand Linux
touchpads, but now it does.

Fixes: 373216ae "Added support for touchpads in the Linux evdev code"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-04-12 10:59:53 -04:00
pionere
f708cebe10 fix os2 timer in fallback mode 2022-04-12 17:01:20 +03:00
Ivan Epifanov
b75996138a Vita: fix VIDEO_VITA_PVR flag 2022-04-11 17:16:22 -04:00
Ethan Lee
b1831715a2 UWP: Require Windows 10 16299 or newer.
This is required to build with WGI support. Thanks for @FrozenChameleon for the fix!

Fixes #5504
2022-04-11 12:09:40 -04:00
Ryan C. Gordon
727eef7064 audio: SDL_ConvertStereoToMono_SSE3 missed an unaligned load. 2022-04-09 10:13:37 -04:00
Sam Lantinga
505d6a4a05 Update version to 2.0.22 for release 2022-04-08 18:18:56 -07:00
Sam Lantinga
a256e6ba7f Updated the patch notes with API changes for 2.0.22 2022-04-08 18:10:56 -07:00
Sam Lantinga
6d7d142b70 Fixed typo 2022-04-08 18:10:38 -07:00
Frank Praznik
c2093fab99 video: wayland: Set the surface damage region when using fullscreen viewports
When using emulated display modes, the output size is often larger than the drawable buffer.  As the surface damage region is automatically calculated from the smaller drawable buffer size, the damage region needs to be manually set to cover the entire viewport region or visual repaint artifacts can result.
2022-04-08 14:11:44 -04:00
Ethan Lee
ba0ba9ef16 direct3d11: Set the swapchain target immediately after creating it.
Fixes #4782
2022-04-07 23:47:20 -07:00
Ethan Lee
cb81630816 render: Update the size/scale/viewport on moves, in addition to resizes.
For OpenGL this means resetting the viewport state shadowing flag too.

Fixes #1504
2022-04-07 23:38:33 -07:00
Sam Lantinga
5613a56032 Make sure the UIKit message box is being handled on the main thread
Potentially fixes https://github.com/libsdl-org/SDL/issues/4865
2022-04-07 11:33:54 -07:00
Ozkan Sezer
2823534fef minor adjustment to os/2 watcom makefile 2022-04-07 20:11:50 +03:00
Sam Lantinga
49b9e3470b Only update modifier state for keys that are pressed in another application
Fixes https://github.com/libsdl-org/SDL/issues/4432
2022-04-07 08:24:03 -07:00
Ryan C. Gordon
85977354fb x11: Treat WM setting the window "fullscreen" like FULLSCREEN_DESKTOP.
Fixes #5390.
2022-04-07 09:15:27 -04:00
Connor Clark
6dbca7c911 Compile with recursive mutexes for emscripten
Emscripten actually does support recursive mutexes, so no need to use SDL's fake recursive code.

Background: #5428, #5479
2022-04-06 18:51:35 -07:00
Ozkan Sezer
64c7896f09 Makefile.in: added missing CXX variable. 2022-04-06 20:56:10 +03:00
Ethan Lee
d1f7f9e35d wayland: Pin the fake window position at (0, 0).
I kind of thought it'd be nice to have it in the center, but this is an issue
for applications that still assume global mouse and window positions are
accessible. For example, this fixes cursor offset issues in UE5.
2022-04-06 11:18:46 -04:00
Ethan Lee
279aeb59be wayland: Add a bug link for the detach FIXME 2022-04-06 01:32:57 -04:00
Ethan Lee
3ada694e62 wayland: Try to detach at the beginning of ShowWindow, just in case.
It's possible that an external component (probably a GL/VK context) committed, so we need to cover our bases and detach in both HideWindow and ShowWindow.

Fixes a crash in UE5 editor's pop-ups.
2022-04-06 01:18:03 -04:00
Ethan Lee
dcfb7fff00 wayland: Evaluate WINDOWPOS_CENTERED_DISPLAY for move events
Partially fixes the mouse cursor in UE5 editor. Imperfect because UE5 uses window position and global mouse state to get position, but of course we don't have global mouse and this is just to get the right display index so this still fails overall. We really need to make global mouse support a feature query...
2022-04-06 00:55:32 -04:00
Sam Lantinga
7ea1b69dd4 Sort controllers by the js* index on Linux
Also fixed the initial scan to directly scan devices instead of using
udev so they can be sorted, as intended.

Fixes https://github.com/libsdl-org/SDL/issues/4688
2022-04-05 21:02:52 -07:00
Ryan C. Gordon
0249df9d96 x11: Try to keep SDL_WINDOW_FULLSCREEN* in sync with window manager.
So if Gnome/KDE/etc have a keyboard shortcut or titlebar decoration to
make any window go fullscreen (with the _NET_WM_FULLSCREEN flag on the
_NET_WM_STATE property), we update the SDL window flag.

Fixes #5390.
2022-04-05 23:18:10 -04:00
Sam Lantinga
eb660e862c Cache the fact that a device didn't look like a joystick
Fixes https://github.com/libsdl-org/SDL/issues/5211
2022-04-05 19:47:42 -07:00
Weng Xuetian
138d96c8a6 Send key release event to input method. (#5281)
Co-authored-by: Ethan Lee <flibitijibibo@gmail.com>
2022-04-05 22:30:25 -04:00
Ryan C. Gordon
8bae343f25 x11: when waiting on fullscreen changes, not window position _and_ size.
This makes sure the window doesn't have outdated values if you try to access
them (or call something that does, like SDL_SetWindowMinimumSize).

Fixes #5233.
2022-04-05 22:21:57 -04:00
Sam Lantinga
268c2fa882 Don't resize fullscreen windows when hiding or minimizing them (thanks @madewokherd!)
This has the benefit of window previews (mousing over the icon) having the correct size and contents.

Fixes https://github.com/libsdl-org/SDL/issues/5320
2022-04-05 18:42:17 -07:00
Esme Povirk
def27267b5 Ignore focus change messages that contradict GetForegroundWindow.
On Wine, when a window is programmatically minimized in response
to losing focus, we receive a WM_ACTIVATE for the deactivation,
but GetForegroundWindow still indicates that our window is focused.
This causes an incorrect SDL_WINDOWEVENT_FOCUS_GAINED.

This is probably a Wine bug, but it may take a while to fix and
then for the fix to make its way to users.
2022-04-05 18:00:39 -07:00
Weng Xuetian
ff5b67e5e0 IBus should use ev keycode instead of X keycode
See: 5a455b1ead/client/gtk2/ibusimcontext.c (L468)
2022-04-05 20:04:40 -04:00
Sam Lantinga
27fc582b59 Minor cleanup 2022-04-05 15:11:49 -07:00
Sam Lantinga
86acb1a347 Handle interaction between auto capture and the SDL_CaptureMouse() API
Fixes https://github.com/libsdl-org/SDL/issues/5457
2022-04-05 15:05:07 -07:00
Sam Lantinga
0e198a8799 Added a define VERBOSE_MOTION_EVENTS to show mouse and finger motion events 2022-04-05 15:03:18 -07:00
capehill
006a5a9e03 testgles2: Fix buffer object sizes 2022-04-05 13:05:51 -04:00
Ryan C. Gordon
a5672b858e x11: Wait a bit to see if window pos changes when changing fullscreen.
Helps prevent window from moving to 0,0 when leaving fullscreen.

Fixes #4749.
2022-04-05 11:10:41 -04:00
Cameron Gutman
45372b1c27 x11: Don't unload libGL.so to prevent a crash in XCloseDisplay()
libGL.so may register callbacks that can be invoked upon XCloseDisplay().
If XCloseDisplay() is called after libGL.so is unloaded, the callback pointer
will point at freed memory and invoking it will crash.

The texture framebuffer check optimized out in f37e4a9 was causing libGL.so to
never be unloaded as a side-effect. Skipping it exposed this bug by allowing
libGL.so to actually unload.
2022-04-04 21:39:41 -07:00
Sam Lantinga
7b3449b89f Minor cleanup 2022-04-04 20:46:56 -07:00
Christoph Reichenbach
6cd444f0fa Visualise scroll wheel events in testmouse 2022-04-02 20:50:21 -07:00
Cameron Cawley
57118fb7de render: Fix setting the scale mode for non-native textures 2022-04-02 09:51:28 -07:00
Ozkan Sezer
312c899f4f attempt to fix uwp build 2022-04-02 03:32:10 +03:00
Ozkan Sezer
c0bb39e5e9 check for HAVE_ROAPI_H in cmake and autotools, and
update SDL_config_windows.h and SDL_config_winrt.h
2022-04-02 02:50:02 +03:00
Ozkan Sezer
575dadb11d fix build against older SDKs after commit 8ebef12. 2022-04-02 02:20:02 +03:00
Sam Lantinga
8ebef12d31 Use RoInitialize/RoUninitialize for Windows.Gaming.Input
Thanks @walbourn!

Fixes https://github.com/libsdl-org/SDL/issues/5270
2022-04-01 14:59:45 -07:00
Sylvain Becker
1c9299b00d Add SDL_list to macosx xcode 2022-04-01 08:12:31 +02:00
Sylvain
78834b50d6 Add SDL_list.c/h 2022-04-01 08:01:44 +02:00
Sylvain
ad6bc521bd Move SDL_List functions to SDL_list.c to avoid more merge with eventual PR 2022-04-01 07:59:16 +02:00
Sam Lantinga
0d7edcb703 Fixed loading 32-bit BMP files 2022-03-31 16:15:51 -07:00
Ryan C. Gordon
ea7d5307ac emscripten: Proxy SDL_GetUsableDisplayBounds to the main thread. 2022-03-31 14:12:34 -04:00
Reinhold Gschweicher
fe79eb2fbb emscriptenframebuffer: fix formatting 2022-03-31 14:11:41 -04:00
Reinhold Gschweicher
268cc2a49c emscriptenmouse: remove useless return statement 2022-03-31 14:11:41 -04:00
NeroBurner
3136a53070 fix formatting and cast warnings
Co-authored-by: Charlie Birks <charlie@daftgames.net>
2022-03-31 14:11:41 -04:00
Reinhold Gschweicher
404158595c emscriptenmouse: remove old extra _INT 2022-03-31 14:11:41 -04:00
Reinhold Gschweicher
4dca8f7fb4 SDL2 thread proxying fixes
This PR uses new APIs added in [emscripten-core/emscripten#9336](https://github.com/emscripten-core/emscripten/pull/9336)
to improve compatibility with USE_PTHREADS=1.

Original PR: https://github.com/emscripten-ports/SDL2/pull/127
By: @jakogut
Reviewed by: Daft-Freak
2022-03-31 14:11:41 -04:00
Ryan C. Gordon
1c7bf478ae x11: Ignore BadValue for extremely small XRRSetScreenSize resolutions.
Reference Issue #4840.
2022-03-31 10:09:47 -04:00
Ivan Epifanov
db718998bd Vita: fix readme 2022-03-31 06:02:50 -07:00
Ivan Epifanov
95c0fec518 Vita: PVROGL: fix indentation and ifdef guards 2022-03-31 06:02:50 -07:00
Jaylon Gowie
b5700ab31e Cleanup Spaces 2022-03-31 00:02:56 -04:00
Jaylon Gowie
8e5adc62eb Update README-vita.md 2022-03-31 00:02:56 -04:00
Jaylon Gowie
8c542a3591 Desktop OpenGL 1.X/2.X PSVita Support 2022-03-31 00:02:56 -04:00
Cameron Gutman
2c04df8d65 joystick: Fix rumble issues on PS5 HIDAPI controllers
We were returning the report size from HIDAPI_DriverPS5_RumbleJoystick() rather
than 0 upon success, causing SDL_JoystickRumble() (and callers) to think that
rumbling failed.

This didn't cause major problems until 1868c5b, when it started preventing
rumble state from being persisted in the joystick core, even though it was
successfully sent to the hardware.

This led to all sorts of strangeness, including broken rumble duration and
attempts to stop rumble being discarded.
2022-03-30 18:33:38 -05:00
Ryan C. Gordon
7e15ad2fc4 x11: Catch X11 errors in X11_SetWindowPosition and X11_SetWindowSize.
The functions can go south if other operations are in progress, like
X11_SetWindowBordered, which might be doing something traumatic behind the
scenes of the window manager.

We can't make these tasks totally synchronous, which would fix the problem,
because not only can the window manager block however long it wants, it might
also decide to deny our requests without any notification, so we'd be waiting
forever for a window change that isn't coming.  :(

Fixes #5274.
2022-03-30 14:23:51 -04:00
Ryan C. Gordon
3425e9950e stdinc: SDL_COMPILE_TIME_ASSERT defines shouldn't have a semicolon. 2022-03-30 10:13:47 -04:00
Ivan Epifanov
cbdb67b4f6 Vita: add SDL_GetPreferredLocales support 2022-03-29 15:02:21 -07:00
Ivan Epifanov
178ac19615 Vita: add audio capture support 2022-03-29 14:12:37 -07:00
Frank Praznik
4d1905c9b6 video: wayland: Use viewports for non-fullscreen windows with fractional scaling
Use viewports for non-fullscreen windows when the desktop uses fractional scaling and the window is flagged as DPI-aware to provide a backbuffer mapped as close to 1:1 output as possible.  In the cases of odd window sizes the backbuffer may be a pixel off of scaling perfectly into the window size due to its scaled size being rounded off, but a minute amount of scaling during output is likely preferable to the large amounts of overdraw needed with integer scaled buffers.
2022-03-29 15:00:07 -04:00
Frank Praznik
fa4c51989d video: wayland: Expose more resolutions for mode emulation
Expose as many emulated display modes as possible.  They will currently display stretched to the display's native desktop aspect, but if an application requires a hardcoded resolution, it will work at minimum.

Aside from the change in the emulated display mode list, the Wayland event handling code had to be updated to support separate scaling for the x and y axes, as square pixels are no longer guaranteed.
2022-03-28 22:19:34 -04:00
Ethan Lee
d875416ac4 wayland: Minor fix for old compilers 2022-03-28 15:32:30 -04:00
Frank Praznik
4d76c9cb46 video: wayland: Use wp-viewporter for fullscreen with non-native resolutions
Wayland doesn't support mode switching, however Wayland compositors can support the wp_viewporter protocol, which allows for the mapping of arbitrarily sized buffer regions to output surfaces.  Use this functionality, when available, for fullscreen output when using non-native display modes and/or when dealing with scaled desktops, which can incur significant overdraw without this extension.

This also allows for the exposure of arbitrarily sized, emulated display modes, which can be useful for legacy compatability.
2022-03-28 13:18:26 -04:00
Connor Clark
aec86ba8bb emscriptenaudio: proxy calls to main thread 2022-03-28 12:04:04 -04:00
Ivan Epifanov
96be9cddcc Vita: add hint to select which touchpad generates mouse events 2022-03-28 08:36:32 -07:00
Mathieu Eyraud
1db47d468a Fix potential memory leak in QueueCmdFillRects 2022-03-28 08:34:32 -07:00
Cameron Gutman
a60986caa8 Correct default structure packing on Windows ARM64
See issue #5454 for details
2022-03-27 19:03:54 -05:00
SDL Wiki Bot
6d1c3cd691 Sync wiki -> header 2022-03-27 17:11:05 +00:00
Ivan Epifanov
95ed83137f Vita: Use preallocated memory pool for textures 2022-03-27 10:07:49 -07:00
SDL Wiki Bot
2591f7e39c Sync wiki -> header 2022-03-27 16:52:04 +00:00
SDL Wiki Bot
7ba4d24c25 Sync wiki -> header 2022-03-27 16:49:05 +00:00
capehill
0dcfa92e4c testgles2: Call correct function to get shader info log and add link status checking 2022-03-27 09:44:48 -07:00
Cameron Cawley
6529bf3de7 Clean up formatting in README-directfb.md 2022-03-27 09:12:25 -07:00
Cameron Cawley
0bc9e243b9 Remove URLs from markdown headers in README-visualc.md 2022-03-27 09:12:25 -07:00
Ryan C. Gordon
7bc498d325 direct3d: Implement missing blend operations.
This is only for Direct3D 9; Direct3D 11 already had this implemented.

Fixes #5375.
2022-03-27 09:14:07 -04:00
Ozkan Sezer
a630b02938 configure: improvements to libdecor discovery :
use PKG_CHECK_MODULES, and use DECOR_LIB with find_lib.
Closes: https://github.com/libsdl-org/SDL/pull/5460

Co-authored-by: Trigan2025 <trigan2025@hotmail.fr>
2022-03-27 11:56:40 +03:00
Ethan Lee
713a675401 wayland: Relax the check for mismatching output scales 2022-03-26 22:26:15 -04:00
Ethan Lee
5655be1558 wayland: Avoid overwriting xdg_output position with wl_output position 2022-03-26 19:57:39 -04:00
Ethan Lee
40417b188a wayland: Work around a GNOME xdg_output scaling issue 2022-03-26 19:55:04 -04:00
Ryan C. Gordon
94ed6b0a54 README-windows: Notes on building with Visual Studio/LLVM.
Fixes #5186.
2022-03-26 08:55:26 -04:00
Ryan C. Gordon
5acb4b70ab README-windows: Wordwrap text file.
This makes for easier reading outside of a formal Markdown viewer.
2022-03-26 08:50:25 -04:00
Ryan C. Gordon
26bfee8578 README-windows: Convert to actual Markdown text. 2022-03-26 08:47:46 -04:00
Ryan C. Gordon
beecae31f6 testshader: use SDL_malloc instead of SDL_stack_alloc. 2022-03-26 08:42:09 -04:00
capehill
d6122704e8 Initialize compile status variable and check also program link status 2022-03-26 08:38:42 -04:00
Ethan Lee
7a1c45bd1c wayland: Optimize keyboard_handle_modifiers.
1. Mod index values are (mostly) constant, so can be done with xkb_state_new
2. Mods can change without the group changing, avoid remap events if possible

Lastly, as a bonus, I added braces to the locale check, because I was nearby.
2022-03-25 12:54:05 -04:00
Ivan Epifanov
69d0b6e3c6 Vita: Fix NULL-pointer dereference 2022-03-25 09:29:20 -04:00
Sylvain
bf38fd4679 YUV: fix invalid read on last line when converting from SDL_PIXELFORMAT_YUY2 (see bug #4841) 2022-03-25 11:52:50 +01:00
Ethan Lee
2891f0821b wayland: Use xkb_keymap_mod to set mod state 2022-03-25 02:49:49 -04:00
Ethan Lee
6d9ca92626 wayland: Enforce text capitalization manually, for remapped keymods 2022-03-25 01:36:39 -04:00
Ethan Lee
a75c6150e0 wayland: Add an xkb_keysym_t->SDL_Keycode mapping for backspace 2022-03-25 01:33:40 -04:00
DominusExult
ee96407edf iOS >= 10.0 silence GLes deprecation warnings 2022-03-24 12:37:10 -07:00
Ethan Lee
ab74b6a3c3 wayland: Remove some now-redundant casts 2022-03-24 15:34:29 -04:00
Ethan Lee
ee52ad08cd wayland: Minor fixes for old compilers 2022-03-24 15:32:25 -04:00
Simon McVittie
b4d28085bf wayland: Don't overwrite error message from SDL_EGL_CreateSurface
SDL_EGL_CreateSurface sets a more specific error message, so overwriting
it would lose information.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-03-24 14:59:25 -04:00
Simon McVittie
d5bbbd3f73 Avoid depending on libwayland 1.20 unnecessarily
When using shared linking (linking in the normal way with
-lwayland-client) rather than loading Wayland libraries dynamically at
runtime, listing symbols that don't exist in the current version results
in a build failure. We don't actually call wl_proxy_marshal_flags() or
wl_proxy_marshal_array_flags() directly; the reason we need them is
that they're called by the code generated by wayland-scanner >= 1.20.

If we're building against an older Wayland library, then we'll have its
corresponding version of wayland-scanner (mismatched versions are not
supported), so we won't need those two symbols, and can avoid generating
a dependency on them.

Conversely, if we're building against a newer Wayland library, the
generated code will call them unconditionally, so we cannot treat them as
optional and gracefully fall back: that would result in a crash. Instead,
treat them as a mandatory part of the Wayland library, so that if they
are not found at runtime, we can fall back to X11 without crashing.

libwayland 1.18 is in several LTS distributions (Ubuntu 20.04,
Debian 11, RHEL 8) so avoiding a hard dependency on 1.20 is quite
useful.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Resolves: https://github.com/libsdl-org/SDL/issues/5376
2022-03-24 14:46:48 -04:00
Ryan C. Gordon
d597a9b431 x11: Minor cleanups and corrections in X11_ShowMessageBox.
Reference issue #3254.
2022-03-24 14:25:34 -04:00
Sylvain
6c56193a2a Fixed bug #1650: X11 doesn't set KMOD_NUM and KMOD_CAPS to system state 2022-03-24 18:09:45 +01:00
Kimplul
2398c43be2 add some Thrustmaster wheels 2022-03-24 08:33:37 -07:00
Ryan C. Gordon
4fe7b2cbd1 static analysis: Fixed several complaints from codechecker.
There are still some pending Objective-C specific issues.

Reference issue #4600.
2022-03-24 11:00:43 -04:00
Ivan Epifanov
eadc064e2c Vita: add native YUV textures support.
* Fail if texture init fails.
* Refactor and cleanup.
2022-03-24 07:51:20 -04:00
Ivan Epifanov
0af2db6f29 Vita: support audio format fallback 2022-03-24 07:51:20 -04:00
Frank Praznik
0dae35bf3d video: wayland: Use xdg-output for retrieving the desktop dimensions
Using wl-output to get the desktop display dimensions and dividing by the integer scale factor will not return the correct result when using a desktop with fractional scaling (e.g. a 3840x2160 display at 150% will incorrectly report the scaled desktop area as 1920x1080 instead of 2560x1440).  Use the xdg-output protocol, if available, to retrieve the correct desktop dimensions and offset.

Versions 1 through 3 of the protocol are supported.
2022-03-23 19:43:11 -04:00
Florian "sp1rit"​
9125b244e7 wayland: Basic support for zwp_tablet_*v2 protocol 2022-03-23 13:47:46 -04:00
Ethan Lee
13337e17a5 wayland: The rest of the wayland-client 1.18 requirement... Git, please 2022-03-23 13:27:01 -04:00
Ethan Lee
f3ff0c568e wayland: Bump minimum requirement to wayland-client 1.18 or newer 2022-03-23 13:23:33 -04:00
SDL Wiki Bot
2a4e0f8fd0 Sync wiki -> header 2022-03-23 16:09:05 +00:00
Sylvain Becker
c23a7ad38a Add SDL_RenderGetWindow() API to get the window associated with a renderer (#5440)
Add SDL_RenderGetWindow() API to get the window associated with a renderer
2022-03-23 17:07:56 +01:00
Joao Paulo Magalhaes
57df1dfce6 Video: do not use hardcoded VIVANTE and VDK libraries 2022-03-23 08:49:29 -07:00
Sylvain
f5a980448e Android: add SetWindowResizable() implementation
- which also enable/disable the orientation lock status.

This is only provided when the window is not SDL_WINDOW_FULLSCREEN (see SDL_video.c).
Final orientation also depends on SDL_HINT_ORIENTATIONS.
2022-03-23 10:13:56 +01:00
Sam Lantinga
006aafabcf Fixed freeing a constant string (thanks @gnrlwart) 2022-03-22 20:24:17 -07:00
Ryan C. Gordon
8df045cc7d stdlib: just cast iconv()'s 2nd arg to void *.
This makes the compiler happy (enough) regardless of whether the C runtime
headers think this argument should be const or not.

Fixes #4966.
2022-03-22 16:14:06 -04:00
Charlie Birks
4b8d69a416 Avoid trying to use texture framebuffers on emscripten 2022-03-22 12:18:45 -07:00
pionere
25203222f5 optimize the SDL_str(case)cmp functions 2022-03-22 12:17:50 -07:00
pionere
aec58d8208 make SDL_strcasecmp standard compliant 2022-03-22 12:17:50 -07:00
pionere
b59ca92e82 use != '\0' comparison instead of SDL_strlen in the functions of SDL_getenv 2022-03-22 12:17:50 -07:00
Jonatha Gabriel
b944dc8f2e Also fix Android crash when SDL_HIDAPI_DISABLED set to 1
The Java code needs the native functions to be implemented, even if
they're not surfaced via the C API, therefore, a stub version of
functions were made only to the purpose of "fill the gaps" when
SDL_HIDAPI_DISABLED set to 1.
2022-03-22 12:12:16 -07:00
Egor
2302b2d5e5 Add mapping for Logitech Precision Gamepad 2022-03-22 10:04:03 -07:00
Sylvain
83df4a354e SDL_render.c: remove unsused case, since renderer target has been forced to NULL previously (see bug #4213) 2022-03-22 15:25:01 +01:00
Ryan C. Gordon
f782abe5f0 hints: Added SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE.
Fixes #2349.
2022-03-22 09:54:29 -04:00
Sam Lantinga
34fd83ca06 Don't try to hide foreign windows when destroying the SDL window representation
Fixes https://github.com/libsdl-org/SDL/issues/5432
2022-03-22 06:50:10 -07:00
Ozkan Sezer
74680f5c4c regenerated SDL_blit_auto.c. 2022-03-22 00:56:28 +03:00
pionere
dd6c46cb34 blit-auto optimizations 2022-03-22 00:56:28 +03:00
Sylvain
9dc201d448 Fixed bug #2962 - when SDL_RenderReadPixels format = 0, used format of the target texture
include/SDL_render.h, format:
"0 to use the format of the rendering target "
2022-03-21 10:41:14 +01:00
Sylvain
7f1feee02a Fixed bug #2426 - SDL_RenderReadPixels result is unspecified and fails testautomation
Call SDL_RenderPresent after calling SDL_RenderReadPixels.
From "include/SDL_render.h":
"If you're using this on the main rendering target, it should be called after rendering and before SDL_RenderPresent()."
2022-03-21 10:20:04 +01:00
Ryan C. Gordon
2b3c16eb5b Sync wiki -> headers. 2022-03-20 23:17:14 -04:00
Eddy Jansson
24ffcbd9ad audio: Set error message on dsp init failure.
if SDL_EnumUnixAudioDevices() fails to find any devices,
set an error message on the exit path. Without this,
SDL_Init() could fail without any message available
in SDL_GetError().
2022-03-20 10:31:19 -07:00
Sam Lantinga
8f964576da Fixed parameter operation ordering for ease of reading 2022-03-19 11:01:55 -07:00
Sam Lantinga
0517b61ed6 Relative mouse mode is tied to the window with keyboard focus
This isn't obvious, but makes sense when thinking about how games actually use it. This is also in line with how Windows mouse relative mode is implemented.

Fixes https://github.com/libsdl-org/SDL/issues/5340
2022-03-19 11:00:00 -07:00
Sam Lantinga
b559a4accc Fixed Android crash when SDL_HIDAPI_DISABLED set to 1
The Java code needs the native functions to be implemented, even if they're not surfaced via the C API.

Fixes https://github.com/libsdl-org/SDL/issues/5326
2022-03-19 10:39:22 -07:00
Sam Lantinga
a485ffc3c8 Fix "SDL_FALSE is not defined" runtime error for emscripten. 2022-03-19 09:50:22 -07:00
Ryan C. Gordon
d81fee7623 SDL_Rect: Added floating point versions of all the rectangle APIs.
Fixes #5110.
2022-03-19 10:35:24 -04:00
Ryan C. Gordon
4d9bef604a SDL_Rect: minor code cleanups. 2022-03-19 10:35:23 -04:00
Ryan C. Gordon
c573ebe143 SDL_UnionRect: If both rects are empty, zero out the result struct. 2022-03-19 10:35:23 -04:00
Christian Kündig
fbbd0270eb Fix "SDL_TRUE is not defined" runtime error for emscripten. 2022-03-18 16:42:12 -07:00
SDL Wiki Bot
aef1e56737 Sync wiki -> header 2022-03-18 17:30:05 +00:00
Sam Lantinga
40b7326b38 Added a note that SDL_RenderReadPixels() should be called before SDL_RenderPresent() 2022-03-18 10:28:38 -07:00
Sam Lantinga
6c96217727 Added the hint SDL_HINT_MOUSE_RELATIVE_MODE_CENTER, controlling whether the mouse should be constrained to the center of the window or the whole window in relative mode.
For further info about the pros and cons, check out the discussion in https://github.com/libsdl-org/SDL/issues/5271
2022-03-18 10:07:59 -07:00
Sam Lantinga
d3cc5764c0 Modern CMake doesn't need "LANGUAGE C" for Objective-C
CMake 3.19 fails to compile Objective-C with that property set

Fixes https://github.com/libsdl-org/SDL/issues/5418
2022-03-18 07:36:16 -07:00
Sam Lantinga
1868c5b521 Start rumbling once a raw input controller has been correlated
Fixes https://github.com/libsdl-org/SDL/issues/5351
2022-03-17 18:25:50 -07:00
Sam Lantinga
3167ba342d Fixed freeing the Windows blank cursor 2022-03-17 17:58:35 -07:00
Sam Lantinga
0387bf821a Fixed memory leak in WIN_CreateBlankCursor() 2022-03-17 17:55:28 -07:00
Sam Lantinga
5ff42438e3 Added a hint to capture the mouse when mouse buttons are pressed, defaulting on
Fixes https://github.com/libsdl-org/SDL/issues/5301
2022-03-17 17:39:46 -07:00
Sam Lantinga
09b8152fae Use SDL_Log instead of printf 2022-03-17 17:19:21 -07:00
Sam Lantinga
b22ce2b5a8 Workaround for bug in Microsoft WGI support
Fixes https://github.com/libsdl-org/SDL/issues/5270
2022-03-17 17:10:40 -07:00
Sam Lantinga
d406278513 Try not forcing activation when grabbing the mouse in fullscreen windows 2022-03-17 17:01:36 -07:00
Sam Lantinga
4e784fce43 When updating grab state, only activate windows that are grabbed, fullscreen, and shown.
Fixes https://github.com/libsdl-org/SDL/issues/5371
2022-03-17 16:57:33 -07:00
Sam Lantinga
e5f45455c9 Added a hint to mark a foreign window as usable with OpenGL
Fixes https://github.com/libsdl-org/SDL/issues/2942
2022-03-17 14:44:34 -07:00
Sam Lantinga
4e49b78a11 Fixed compile warning and comment typo 2022-03-17 14:44:17 -07:00
Ethan Lee
0bf8ccfb60 video: Add a hint to allow Vulkan surfaces on foreign windows 2022-03-17 14:25:55 -07:00
Sam Lantinga
ecaa22cbe6 Don't warn if anyone peeps for events after quitting the event subsystem
Fixes https://github.com/libsdl-org/SDL/issues/5013
2022-03-17 14:22:51 -07:00
Antoine Fontaine
3318590796 Fix relative mouse input for Unvanquished (unvanquished.net)
Here's an IRC dump that hopefully explains the issue this fixes:

> I'm debugging something odd where, for a libre game,
  unvanquished.net (a FPS), relative mouse input in fullscreen is
  buggy
> it's like, working mostly ok, but it has a weird
  performance/cleanup bug
> after some time in relative mouse input mode, some time as low
  as 15s, usually more, the SDL sends A LOT of relative mouse
  input per frame
> almost all of which have xrel==0 && yrel==0
> by A LOT, I mean that after ~1min, it's usually in the
  thousands per frame
> each frame, a while ( SDL_PollEvent( &e)) loop reads the
  inputs, but it seems SDL is not clearing the list.
> one way to clear the list is to open the in-game console or
  menu, which switches the input mode to absolute, then close it
  which gets a working relative input mode (for some time at least)
> I've shown the issue to be present with SDL2.0.20 but not with
  2.0.14 on my system
> some other players on Arch Linux (SDL2.0.20) report a possibly
  related issue, where some keys seem to be pressed at random
> I've did some bisection on SDL master, and I've found that
  there are actually two commits involved, one breaking it
  totally (no input at all), and one fixing it partially (with
  the problem described above)

First related commit that breaks it totally:

	commit 82793ac279
	Author: Sam Lantinga <slouken@libsdl.org>
	Date:   Thu Oct 14 14:26:21 2021 -0700

	    Fixed mouse warping while in relative mode

	    We should get a mouse event with an absolute position and no relative motion and shouldn't change the OS cursor position at all

Second related commit, that halfway fixes it:

	commit 31f8c3ef44
	Author: Sam Lantinga <slouken@libsdl.org>
	Date:   Thu Jan 6 11:27:44 2022 -0800

	    Fixed event pump starvation if the application frequently pushes its own events

Reverting the first commit did fix the issue for me, but would
probably reintroduce the bug it was fixing(?). This patch should
fix it for everyone hopefully.

https://github.com/DaemonEngine/Daemon/issues/600 is the upstream
bug, and contains some early investigation.
2022-03-17 14:00:59 -07:00
Esme Povirk
829e15a490 Ignore unknown WM_SIZE types.
According to MSDN, we can also get SIZE_MAXHIDE and SIZE_MAXSHOW,
based on state changes to other windows. It's not clear under
what circumstances this will happen (I saw some docs indicating
it may require multiple application windows), but it doesn't seem
right to treat them as RESTORED.
2022-03-17 12:51:46 -07:00
uyjulian
a164c9d245 SDL_cocoawindow.m: update fullscreen toggle when SDL_SetWindowResizable called 2022-03-17 12:35:57 -07:00
Sam Lantinga
cc152103ba Fixed warnings when building with cygwin
Fixes https://github.com/libsdl-org/SDL/issues/5025
2022-03-17 11:37:08 -07:00
Sam Lantinga
e8c3ff56e0 Removed problematic call to ISensor_SetEventSink()
Fixes https://github.com/libsdl-org/SDL/issues/5288
2022-03-17 10:01:13 -07:00
Sam Lantinga
bcb0f1de23 Fixed build when events are disabled
Fixes https://github.com/libsdl-org/SDL/issues/5413
2022-03-17 08:52:31 -07:00
pionere
01bfde4520 simplify SetDSerror
- no need to keep the error in a static variable
- always print the error code
- reduce the required stack-size
- reduce the number of snprintf calls (and code size)
2022-03-17 08:44:06 -07:00
Ozkan Sezer
01663238dc testplatform.c: move static asserts out of TestTypes(). 2022-03-17 08:43:27 -07:00
Ozkan Sezer
f0d2747df1 use _Static_assert for SDL_COMPILE_TIME_ASSERT(), when available 2022-03-17 08:43:27 -07:00
Ozkan Sezer
dfbe1f7248 SDL_GetBasePath() fixes for OS/2 2022-03-17 03:50:02 +03:00
Sylvain
b2db570ce9 SDL_triangle_blit_slow: sync code with SDL_blit_slow to handle ARGB2101010 2022-03-16 18:09:40 +01:00
Sylvain
93e7caab9a SDL_blit_slow: remove one nested 'if()' because of ARGB2101010 handling 2022-03-16 18:08:20 +01:00
Sylvain
56568ffb38 Remove 'reserved identifier' warning 2022-03-16 18:04:40 +01:00
Ozkan Sezer
1c1f5c180f imported two libtool mainstream commits 28fbcb6a and b55b1cc8 2022-03-16 17:15:20 +03:00
pionere
2c6a9c5194 minor optimization (SDL_audiocvt.c) 2022-03-16 07:58:28 -04:00
pionere
85dff3e453 emscripten: obey enable-misc/SDL_MISC settings 2022-03-16 14:55:28 +03:00
staphen
123b9aaa41 Adjust gradle dependencies to enable the build to position assets for the APK 2022-03-15 21:57:25 -07:00
Ozkan Sezer
5905696e66 SDL_audiocvt.c: minor cleanup. 2022-03-15 23:10:04 +03:00
Ozkan Sezer
61a93d3c46 minor whitespace cleanup. 2022-03-15 23:10:02 +03:00
Ozkan Sezer
d1e4367f58 SDL_windowskeyboard.c: fix build with SDL_DISABLE_WINDOWS_IME defined.
Fixes https://github.com/libsdl-org/SDL/issues/5408
2022-03-15 21:41:02 +03:00
Ryan C. Gordon
1ee196b483 INSTALL.txt: Say "macOS" instead of "Mac OS X" in modern times.
Reference Issue #5407.
2022-03-15 13:07:55 -04:00
Sylvain
90b13e1488 Merge remote-tracking branch 'refs/remotes/origin/main' 2022-03-15 17:50:57 +01:00
Sylvain
c44966b78b Fixed bug #2691 - re-enable surface_testCompleteSurfaceConversion for ARGB2101010 2022-03-15 17:48:38 +01:00
Sylvain
f3e86b9fd3 Fixed bug #2199: make SDL_blit_slow handles SDL_PIXELFORMAT_ARGB2101010, storing as RGBA 2022-03-15 17:46:12 +01:00
Sam Lantinga
67848b6531 Fix name of macOS platform and link to README file 2022-03-15 09:25:01 -07:00
Sylvain Becker
3bebdaccb7 METAL: clip rect w/h must be <= render pass 2022-03-15 10:37:17 +01:00
Wohlstand
7c421fec16 SDL_audiocvt.c: Don't byteswap 8-bit streams
Otherwise, this results an assert on big endian machines when attenpting to use SDL_LoadWAV_RW function to load 8-bit WAV files.
2022-03-14 08:41:07 -07:00
Zach Reedy
363c36781d Fixed: Incorrect assumption that mouse button is released when window is allocated 2022-03-14 08:38:25 -07:00
Guus Waals
7495b98141 Make SDL_VIDEO_OPENGL_EGL optional on Android 2022-03-14 13:38:12 +01:00
Sylvain
0ad606b48d Android: add comment to set render target to NULL when going to background (bug #4041) 2022-03-14 10:43:18 +01:00
Ozkan Sezer
ecc1c871e6 SDL_endian.h: use endian predefs from newer gcc and clang versions.
Closes: https://github.com/libsdl-org/SDL/pull/5403
2022-03-14 10:10:40 +03:00
Ozkan Sezer
ee6bfcdd66 SDL_blit_N.c: removed duplicated const (fixes bug #5401) 2022-03-13 20:56:42 +03:00
Ryan C. Gordon
3ab739afff cmake: Make test code use proper C main functions.
Fixes #5021.
2022-03-13 12:10:52 -04:00
Ozkan Sezer
072db7b005 SDL_windowskeyboard.c (IME_IsTextInputShown): remove unused local vars. 2022-03-12 01:56:40 +03:00
SDL Wiki Bot
229297d97f Sync wiki -> header 2022-03-11 22:47:04 +00:00
Zach Reedy
d14a126383 IME Composition Truncation + SDL_IsTextInputShown + SDL_ClearComposition (#5398)
* Fixes for IME Composition Truncation + Addition of SDL_ClearComposition, SDL_IsTextInputShown

* Fixed: Documentation and code style issues raised during code review.
2022-03-11 14:45:17 -08:00
Charlie Birks
9de97e19cc emscripten: Don't prevent default on filtered key events 2022-03-11 11:55:41 +00:00
Ozkan Sezer
afb0606f5a minor os/2 clean-ups. 2022-03-10 18:50:10 +03:00
Ozkan Sezer
50575aa184 Makefile.os2: fixed setting OS2DEBUG in CFLAGS. 2022-03-10 18:50:10 +03:00
Cameron Gutman
677dc1015c rawinput: Fix double detection of gamepads on some 3rd party X360 wireless receivers
The name that the Raw Input joystick driver pulls from the HID stack comes
from USB string descriptors contained on the device. For official wireless
receivers, this always contains "Xbox 360 Wireless Receiver for Windows"
which matches the friendly name that WGI provides.

3rd party Xbox 360 wireless receivers may have different strings in their
USB string descriptors (one uses "XBOX 360 For Windows" instead). This
fails to match WGI's name and causes Raw Input and WGI to both report the
same gamepad.

Since wireless Xbox 360 controllers seem to have a consistent VID/PID
regardless of the adapter enumerating them, we can also match on that to
catch these.

The duplicate case reported to me was:
Controller (XBOX 360 For Windows) - 030000005e040000a102000000007200
Xbox 360 Wireless Receiver for Windows - 030000005e0400000000000000007701
2022-03-09 21:19:53 -08:00
Ozkan Sezer
bf69868924 reduced a few ifdefs, fixed an unused warning if built w/o SDL_HAVE_YUV. 2022-03-10 01:55:04 +03:00
Jo Bates
01d38e7ade Make Win32 fullscreen and borderless windows minimizable 2022-03-09 14:08:12 -08:00
Sam Lantinga
09b652b70a Make sure the string properties are actually strings (thanks Nat!) 2022-03-09 13:54:23 -08:00
Sam Lantinga
c6eef542ab Removed dead code 2022-03-09 13:48:31 -08:00
pionere
911ba8d343 hide impossible branch in D3D_UnlockTexture 2022-03-09 20:17:55 +01:00
Sylvain
ea5b482bff Remove unused warning 2022-03-09 15:38:36 +01:00
Sylvain
45833a148d Prevent shadowing static variable '_this' with local paramter '_this' of SDL_CreateWindowTexture 2022-03-09 15:33:45 +01:00
Sylvain
a4a80c8607 Fix variable may be uninitialized when used here [-Wconditional-uninitialized] 2022-03-09 15:21:55 +01:00
Sylvain
04256a5372 Fix compilation (see #5313) 2022-03-09 15:12:25 +01:00
pionere
0983fcee5e fix memory leak in D3D11_CreateRenderer 2022-03-09 15:03:49 +01:00
pionere
3f8b450de2 extend the code hidden by SDL_HAVE_YUV 2022-03-09 15:03:30 +01:00
pionere
ce1883e1e7 fix compile error with disabled SDL_HAVE_YUV (vita)
- UpdateTextureYUV is not defined if SDL_HAVE_YUV is not defined/zero
+ calling SDL_free suffice if the VITA_GXM_RenderData was just allocated
2022-03-09 15:02:44 +01:00
Sam Lantinga
14db417e12 Reenable getting the serial number on macOS
We filter now on game controllers, so we shouldn't hit the crash bug on random devices that this was working around.
2022-03-08 21:32:27 -08:00
Sam Lantinga
c3ca3445bd Prefer HIDAPI on macOS, as that has extended functionality 2022-03-08 18:56:49 -08:00
Sam Lantinga
6a787619e6 Allow reading background events for MFi controllers 2022-03-08 18:42:13 -08:00
Sam Lantinga
b064ad6ac5 Allow GL_ARB_texture_non_power_of_two environment variable to override OpenGL 2.0 check 2022-03-08 18:14:10 -08:00
Sam Lantinga
1b7669374e Fixed the SDL controller type for USB_PRODUCT_XBOX_ONE_XINPUT_CONTROLLER 2022-03-08 09:58:24 -08:00
Mahyar Koshkouei
41e7d1baa6 Add SDL_GetDisplayDPI implementation on Emscripten
Signed-off-by: Mahyar Koshkouei <mk@deltabeard.com>
2022-03-07 07:18:45 -05:00
Nick Cao
f03215bc70 fix linking with SDL_PULSEAUDIO_SHARED=OFF and SDL_X11_SHARED=OFF 2022-03-07 12:55:50 +03:00
Cameron Gutman
b2463a917c events: Add logging support for several missing event types 2022-03-06 15:02:53 -06:00
Sam Lantinga
bdafe1e049 Fixed whitespace 2022-03-04 11:01:55 -08:00
Sam Lantinga
2e801b1ae7 Split long text input into multiple events if needed (thanks @zreedy!) 2022-03-04 10:50:16 -08:00
SDL Wiki Bot
232c3556ac Sync wiki -> header 2022-03-04 17:30:05 +00:00
Sam Lantinga
ae73ea9c07 Clarified documentation for the trigger rumble API
Fixes https://github.com/libsdl-org/SDL/issues/5372
2022-03-04 09:27:46 -08:00
IOBYTE
13756b5c72 Add X1 and X2 button support to mouse test 2022-03-04 12:09:08 -05:00
Cameron Cawley
2f7b885df9 Fix 'potentially uninitialized local pointer variable' error in UWP builds 2022-02-28 09:04:33 -08:00
Cameron Cawley
b7f8117d40 Build the standalone MSVC projects with GitHub Actions 2022-02-28 09:04:33 -08:00
Cameron Cawley
550b8377bc Combine the MSVC and UWP workflows 2022-02-28 09:04:33 -08:00
Cameron Cawley
98353533e5 riscos: Report keyboard repeat events 2022-02-24 09:11:33 -08:00
Sam Lantinga
af40cb6f00 Added support for the Razer Huntsman Analog keyboard in controller mode 2022-02-23 15:49:10 -08:00
SDL Wiki Bot
669a7f8552 Sync wiki -> header 2022-02-23 16:18:05 +00:00
Ozkan Sezer
4a43321c81 cmake: Fix bug #5361.
src/joystick/*.c wasn't unconditionally added to source list even though
joystick is an SDL subsystem. Also removed the `SDL_JOYSTICK AND NOT APPLE`
condition from src/joystick/dummy/*.c source addition: the OSX unresolved
symbols issue, if it really is there, should be fixed separately.

Fixes https://github.com/libsdl-org/SDL/issues/5361, i.e. build failures
when SDL_JOYSTICK and SDL_HAPTIC are disabled.
2022-02-23 18:10:02 +03:00
Phillip Stephens
94d43186f2 GameCubeAdapter: Add suppport for all rumble modes
This adds support for all 3 of the gamecube controller's rumble modes
Rumble: 1
Stop: 0
StopHard: 2
This is useful for applications that need the full range of support
This also adds a hint to control rumble behavior, defaults 0 to maintain compatibility
2022-02-23 07:03:02 -08:00
Ryan C. Gordon
b946e31ec8 video: Allow unaccelerated SDL_HINT_FRAMEBUFFER_ACCELERATION renderers.
If the app requested a specific renderer, even if it's not the optimal path,
let them have it, because they might want to render with a specific GPU API
on top of the framebuffer pixels.

This fixes DosBox-X crashing on startup, which forces the hint to "opengl".
2022-02-23 09:36:06 -05:00
Ryan C. Gordon
60ddb74cfe video: rework how we prepare a texture framebuffer.
Now we see if we can create an SDL_Renderer, and if that renderer reports
itself as "accelerated," and added some initial heuristics to the OpenGL
renderer to make better decisions about what qualifies as "accelerated."

This adds some FIXMEs that might be merely hypothetical, and removes the
old OpenGL checks from the video subsystem that probably weren't meaningful
in modern times. This will definitely need to improve the existing list
in the GL renderer, to catch things like llvmpipe, etc.

Reference issue #4624.
2022-02-23 09:36:06 -05:00
Wohlstand
08d27dfd7b SDL_openslES.c: Detect float support in runtime and use it
Allow using of the float output type on newer Android devices, but keep PCM16 output on older

Closes #5358
2022-02-22 08:31:14 -08:00
Ryan C. Gordon
293a0aa80e opengl: If GL version >= 2.0, NPOT textures are supported, so favor them.
Fixes #5041.
2022-02-22 10:54:21 -05:00
Sam Lantinga
9299a3e796 Workaround for crash in CoUninitialize() 2022-02-21 16:24:45 -08:00
Sam Lantinga
978fbc3250 Fixed compile warnings 2022-02-21 12:02:44 -08:00
Sam Lantinga
6c531c4334 Correct handling of sentinel events when polling without removing events
Fixes https://github.com/libsdl-org/SDL/issues/5350
2022-02-21 11:35:31 -08:00
Cacodemon345
d90bd261f3 wscons: Make USB keyboard input layout independent 2022-02-18 09:30:04 -08:00
Sylvain
9d86ec8573 Palette format: software Render Jitter in rotation (see #5143)
- same fix applied for rotation with palette surfaces
- allow other 8bits format (eg 332)
2022-02-18 09:57:10 +01:00
Sylvain
ceb09ee740 Fixed #5143 - software Render Jitter in rotation
better precision calculating rotated coordinates and interpolation
2022-02-17 23:11:02 +01:00
Sam Lantinga
18032979d8 Added the hint SDL_HINT_JOYSTICK_ROG_CHAKRAM to control whether ROG Chakram mice show up as joysticks
This hint defaults off, but when it is enabled the mice will have a game controller mapping set up for Profile 3 (set in the Armoury Crate software)
2022-02-15 13:07:51 -08:00
Sylvain
75ffa24e3a Software Render Jitter in rotation (bug #5143)
The output surface doesn't necessarily to have even width and height.
2022-02-15 13:35:59 +01:00
Sylvain
61abc4e5b6 PSP: SDL_RenderCopyEx rotation and global scaling around the wrong way (see #bug 3070) 2022-02-15 11:34:50 +01:00
Sylvain
18b76fcc5d Fixed bug #3070 - SDL_RenderCopyEx rotation and global scaling around the wrong way (software renderer) 2022-02-15 11:33:56 +01:00
Sylvain
e366ad1288 Fixed bug #2308: SDL_RenderCopyEx rotation center precision (software renderer) 2022-02-15 10:02:34 +01:00
Wouter Wijsman
66ee79bd68 [PSP] Don't swizzle streaming textures
It was causing issues in the teststreaming demo and unswizzling
later is inefficient and causes issues.
2022-02-14 10:59:25 +01:00
Sam Lantinga
f97a29f6e1 Use the real device VID/PID when seeing the Steam virtual controller 2022-02-11 22:10:33 -08:00
Sylvain
85e6500065 X11 Segmentation fault with multiple windows and renderers (see #5256) 2022-02-11 11:08:08 +01:00
Wouter Wijsman
4cb6181808 Do not build loadso test eboot for PSP 2022-02-10 19:01:15 +01:00
Sylvain
a75041e8dd Fixed bug #2140: basic support to convert 16 colors palette PIXELFORMAT_INDEX4, to allow conversion to SDL_Texture 2022-02-10 13:44:59 +01:00
Wouter Wijsman
abc8198a1f Render all sides when drawing rect on PSP 2022-02-09 09:36:19 -08:00
Sylvain
5b41844c75 Fixed bug #5322 - register virtual input devices as SDL_Touch device, fix compilation 2022-02-09 09:50:41 +01:00
Sylvain
3a9bbf604e Fixed bug #5322 - register virtual input devices as SDL_Touch device because
they can send SOURCE_TOUCHSCREEN events even if getSources() doesn't declare them.
2022-02-09 09:37:36 +01:00
Sylvain
59f1e2875a Android: add debug function to display class/sources 2022-02-08 21:50:19 +01:00
Frank Praznik
228db35287 audio: pipewire: Tidy up formatting 2022-02-08 14:33:34 -05:00
Frank Praznik
9da9e85cba audio: pipewire: Reset all hotplug values and pointers on shutdown
Ensure that all hotplug variables and pointers are reset to NULL or their original value when shutting down.
2022-02-08 14:33:34 -05:00
Frank Praznik
5b36a527ed audio: pipewire: Remove redundant locks
The io_list_check_add() and io_list_remove() functions are only ever called from within the Pipewire thread loop, so the locks are redundant.  io_list_sort() is called from within a lock in the device detection function, so those additional locks are redundant as well.
2022-02-08 14:33:34 -05:00
Frank Praznik
48b4d1c412 audio: pipewire: Convert atomic hotplug conditional variables to SDL_bool
The hotplug loop condition variables are always guarded by the loop mutex while the loop is running, so they don't need to be atomic.
2022-02-08 14:33:34 -05:00
Ozkan Sezer
67f12ede3b move bug #5333 fix to headers 2022-02-08 21:32:50 +03:00
Wouter Wijsman
54304b971d Fix rotation direction and center point on PSP 2022-02-08 09:47:10 -08:00
Wouter Wijsman
2b572dff88 Make RenderCopyEx rotate around center
This still isn't perfect. The rotation is the wrong way around and the
images are upside down.
2022-02-08 09:47:10 -08:00
Sylvain
2df2da11f6 Android: handleMotionEvent() is checking for SOURCE_JOYSTICK. So don't handle DPAD GAMEPAD (see #5322, #2718) 2022-02-08 17:51:40 +01:00
Sylvain
1fc5dba3d5 Android: test for SOURCE_KEYBOARD / SOURCE_MOUSE. Don't compare to 0, since there are several bits (see #5322, #2718) 2022-02-08 17:41:17 +01:00
Ozkan Sezer
7935cfacc5 SDL_mfijoystick.m: use __typeof instead of typeof.
Fixes https://github.com/libsdl-org/SDL/issues/5319
2022-02-08 18:55:10 +03:00
Ozkan Sezer
9b817248c5 SDL_spinlock.c: define HAVE_GCC_ATOMICS for windows/clang builds,
... if not already defined.
Fixes https://github.com/libsdl-org/SDL/issues/5333

diff --git a/src/atomic/SDL_spinlock.c b/src/atomic/SDL_spinlock.c
index bdd347e..4f10741 100644
--- a/src/atomic/SDL_spinlock.c
+++ b/src/atomic/SDL_spinlock.c
@@ -28,6 +28,12 @@
 #include "SDL_mutex.h"
 #include "SDL_timer.h"

+#if defined(__WIN32__) && defined(__clang__)
+# ifndef HAVE_GCC_ATOMICS
+# define HAVE_GCC_ATOMICS 1
+# endif
+#endif
+
 #if !defined(HAVE_GCC_ATOMICS) && defined(__SOLARIS__)
 #include <atomic.h>
 #endif
2022-02-08 18:50:02 +03:00
Sylvain
f185711203 Fixed bug #5310: Android, Undefined reference to AAssetManager_fromJava 2022-02-08 16:18:01 +01:00
Sylvain
68dd84f1de Android: TouchDevice -1 is reserved for SDL synthetic devce (See #5322) 2022-02-08 11:42:24 +01:00
Sylvain
94e5c3f30e testgesture: display device name with SDL_GetTouchName() 2022-02-08 11:40:39 +01:00
SDL Wiki Bot
580d231822 Sync wiki -> header 2022-02-08 10:37:04 +00:00
Sylvain
e7e44df039 Dynapi: add SDL_GetTouchName() entry 2022-02-08 11:34:41 +01:00
Sylvain
34d4f5b14e Fixed bug #2032: add SDL_GetTouchName to expose the driver name of the device (Thanks @mgerhardy!) 2022-02-08 11:32:20 +01:00
Ivan Epifanov
8ce003a42c Vita: credit cpasjuste 2022-02-07 15:36:42 -08:00
Sylvain
14bc3bf4ec Android: fix typo to register TOUCHSCREEN device (see #5322, #2718) 2022-02-07 22:20:05 +01:00
Frank Praznik
53091e36a3 audio: pipewire: Remove the hard upper bound on rates and buffer sizes
Remove the hard upper limit of 8192 samples and instead use the buffer sizes provided by Pipewire to determine the size of the intermediate input buffer and whether double buffering is required for output streams. This allows for higher latency streams to potentially avoid double-buffering in the output case, and we can guarantee that the intermediate input buffer will always be large enough to handle whatever Pipewire may deliver.

As the buffer size calculations occur in a callback in the Pipewire processing thread itself, the stream readiness check has been modified to wait on two distinct flags set when the buffers have been configured and when the stream is ready and running.
2022-02-07 15:11:31 -05:00
Frank Praznik
66866249a2 audio: pipewire: Condition variable doesn't need to be atomic
The condition variable is guarded by a mutex, so no need for it to be atomic.
2022-02-07 15:11:31 -05:00
Luke Street
0cb39ed468 cmake: Fix SDL_LIBUSB_DYNAMIC soname 2022-02-07 14:22:31 -05:00
Sylvain
b0dd4c7d36 SDL_Render OpenGL: do batching like in the GLES2 backend (with no VBO) 2022-02-07 14:02:20 -05:00
Sylvain
90f0d2ce49 Revert OpenGL point drawing performance, do to proper batching 2022-02-07 14:02:20 -05:00
waddlesplash
423feac69b haiku: Actually remove BDirectWindow and fix OpenGL handling.
This provides the other half of 05c72b113c.
2022-02-06 19:19:21 -05:00
Ozkan Sezer
9403543671 cmake: enable_language(OBJC) only for APPLE 2022-02-05 18:50:00 +03:00
Ozkan Sezer
3c9ac4489e cmake: enable_language(OBJC) to fix check_objc_source_compiles(). 2022-02-05 18:45:50 +03:00
Ozkan Sezer
686a0f3456 cmake: include CheckOBJCSourceCompiles for cmake >= 3.16
c.f. bugs #5011 and #3912
2022-02-05 18:28:24 +03:00
pionere
6d5592a201 minor cleanup of SDL_CreateRenderer 2022-02-05 10:05:25 -05:00
Ozkan Sezer
e8c48981f9 pthread/SDL_systhread.c: always include errno.h
fixes build for several targets after commit 87b02d3 for bug #5283.
2022-02-05 08:56:56 +03:00
Sam Lantinga
5c4fff7f63 Don't fail to get battery status if the upower refresh call fails 2022-02-04 14:02:44 -08:00
Ozkan Sezer
c8cee0b8ca OS2_HasClipboardText: store the boolean result before closing clipboard.
just in case..
2022-02-04 23:28:56 +03:00
Ozkan Sezer
b5614d0c6e cmake: fix UWP joystick.
from: https://github.com/microsoft/vcpkg/blob/master/ports/sdl2/0005-Fix-uwp-joystick.patch
2022-02-04 20:05:14 +03:00
Ozkan Sezer
c93e552068 minor update to winrt/SDL_sysurl.cpp
from: https://github.com/microsoft/vcpkg/blob/master/ports/sdl2/0006-Update-SDL_sysurl.cpp.patch
2022-02-04 20:03:50 +03:00
Ozkan Sezer
050a5e1a15 removed unused SDL_config_wiz.h 2022-02-04 20:02:20 +03:00
Ozkan Sezer
c459eceee1 removed unused Makefile.wiz 2022-02-04 19:50:50 +03:00
Ozkan Sezer
3b9e6c1cec SDL_os2video.c: fixed HasClipboardText() semantics.
Empty string in clipboard is expected to give FALSE by SDL_HasClipboardText.
Noticed in a commit by josch1710 in bitwiseworks' os/2 fork.
2022-02-04 19:50:20 +03:00
Joshua Ashton
86b7a0642f Add additional VID/PIDs for Anne Pro II
This thing changes its VID/PID on firmware revisions...
2022-02-04 08:45:19 -08:00
Sam Lantinga
dd69c28d6f Added a mapping for the Xbox Series X controller, firmware version 5.11.3118.0, connected to Linux via Bluetooth 2022-02-03 18:01:34 -08:00
Temdog007
b59e75c259 Handle menu button press from controller 2022-02-02 21:21:44 -08:00
Ravbug
2005dd9595 UWP build (#5299)
* Add UWP-x64 action

* Fix formatting

* Fix missing -
2022-02-02 14:06:52 -08:00
pionere
2cfc83eab7 sync D3D_RenderReadPixels with D3D11_RenderReadPixels
- use the result of SDL_ConvertPixels to propagate error
- get rid of the verbose error message of D3D11_RenderReadPixels in case SDL_ConvertPixels failed
2022-02-02 14:56:38 -05:00
pionere
3bef4a5da6 cleanup error-handling in SDL_egl.c
- always set error message in SDL_EGL_ChooseConfig / SDL_EGL_CreateContext
- assume SDL_EGL_DeleteContext does not alter the error message
- sync generic error message of SDL_EGL_MakeCurrent with SDL_EGL_Get/SetSwapInterval
- do not overwrite error message of SDL_EGL_ChooseConfig in WINRT_CreateWindow
2022-02-02 14:56:21 -05:00
pionere
b5c5052608 cleanup error-handling in SDL_bmp.c
- add missing error-message in SDL_LoadBMP_RW
- check return value of SDL_RWtell in SDL_LoadBMP_RW
- use standard SDL_EFREAD error instead of custom strings
+ adjust return type of readRlePixels
2022-02-02 14:55:36 -05:00
pionere
19df4af2aa simplify SDL_DUMMY/OFFSCREEN_CreateWindowFramebuffer 2022-02-02 14:45:48 -05:00
SonicMastr
ecd922b5cf Fix touch holding detection after #5244 changes 2022-02-02 08:55:26 -08:00
Sylvain
df0d696a62 RISCOS: attempt to fix compilation ERANGE 2022-02-02 15:22:14 +01:00
Sylvain
87b02d3795 Linux thread name limitation: test for ERANGE (see bug #5283) 2022-02-02 15:09:29 +01:00
Francisco Javier Trujillo Mata
daea9fa19e Remove SDL_config_psp and references 2022-02-02 08:36:39 -05:00
Francisco Javier Trujillo Mata
ff5f5d0ef4 Updating Readme-psp info 2022-02-02 08:36:39 -05:00
Francisco Javier Trujillo Mata
ec632aba15 Remove legacy and unused Makefile.psp 2022-02-02 08:36:39 -05:00
Sylvain
220a9596f3 Remove testing instruction (see bug #5283) 2022-02-02 10:01:11 +01:00
Sylvain
9e46a512b1 Fixed bug #5283 - limit thread name to 16 characters when using pthread_setname_np() 2022-02-02 09:58:15 +01:00
Weng Xuetian
b11dfd7611 Only generate key repetition for keys that should repeat on wayland.
This fix repetition on modifier keys, e.g. Control.
2022-02-01 17:56:04 -05:00
Weng Xuetian
a90a2e7582 Fix text_input_v3 preedit string
For every batch of text_input_v3 updates, if there is no preedit in this
batch, preedit should be cleared.
2022-02-01 15:51:26 -05:00
Sam Lantinga
03c4405b3b Fixed D-Bus battery refresh call 2022-02-01 09:33:18 -08:00
SDL Wiki Bot
e1cf8d8748 Sync wiki -> header 2022-02-01 16:58:05 +00:00
SDL Wiki Bot
4fa21dd65b Sync wiki -> header 2022-02-01 10:37:05 +00:00
Sylvain
d46cc18afc Fix function comment 2022-02-01 11:35:26 +01:00
Sylvain
d224a63bda Fix compilation for non Android 2022-02-01 11:34:01 +01:00
SDL Wiki Bot
61b6a2cad4 Sync wiki -> header 2022-02-01 10:33:04 +00:00
Sylvain
fe2ed6cf6f Fixed bug #5221 - Add SDL_AndroidSendMessage() 2022-02-01 11:30:43 +01:00
pionere
97269e143d adjustments to ime_candidates
- allocate ime_candidates on demand
- allow write to the whole allocated memory of ime_candidates
- ensure ime_candcount is set to zero in case the candidates can not be queried for any reason
2022-01-31 22:06:26 -05:00
pionere
6f404d0f04 cleanup IME_GetCandidateList / UILess_GetCandidateList
- move IME_ShowCandidateList, ImmGetContext and ImmReleaseContext to this function
- set ime_candpgsize to MAX_CANDLIST if dwPageSize is zero
- comment out deselection of ime_candsel in case of korean language for the moment (LANG_CHT does not work anyway)
2022-01-31 22:06:26 -05:00
Sam Lantinga
ec8e3104c8 Refresh the battery state before we query it on Linux 2022-01-31 17:01:08 -08:00
Frank Praznik
0b34f18045 audio: pipewire: Don't double free properties on init failure
The context and stream creation functions will destroy the passed properties object on failure, so no need to do it manually.

The pw_properties_free() function pointer is no longer needed, so it can be removed.
2022-01-30 23:23:03 -05:00
Sylvain
f7d3abddba Fixed bug #964 - SDL_RenderCopy stretch loses proportion on viewport.
Handle the case when there is blending
2022-01-29 10:19:08 +01:00
Ozkan Sezer
8b139e26a3 regenerated configure script. 2022-01-29 10:33:50 +03:00
pionere
a5c610b0a3 revert 'Changed to use 0xFE instead of 0xFF for better sound quality.' 2022-01-28 20:40:19 -05:00
Ryan C. Gordon
43f0271b4e Revert "fix compiler warnings in SDL_windows_gaming_input.c"
This reverts commit ca36cdb185.

The older Windows SDK's headers are wrong, and this change would crash if
you hotplug a device.
2022-01-28 20:40:19 -05:00
pionere
a70bb259c7 drop handle parameter of OpenDevice 2022-01-28 20:40:19 -05:00
pionere
47ddb04e17 cleanup/sync the main loop of *_OpenDevice functions to pick audio format II. 2022-01-28 20:40:19 -05:00
pionere
2eafe4340c cleanup/sync the main loop of *_OpenDevice functions to pick audio format 2022-01-28 20:40:19 -05:00
pionere
3939ef72f8 cleanup SDL_GetAudioDeviceSpec
- drop unnecessary hascapture check
- call SDL_InvalidParamError and return -1 in case the index is out of range
- do not zfill SDL_AudioSpec
- adjust documentation to reflect the behavior
2022-01-28 20:40:19 -05:00
pionere
113109f839 cleanup SDL_GetAudioDeviceName
- drop unnecessary hascapture check
- call SDL_InvalidParamError in case the index is out of range
2022-01-28 20:40:19 -05:00
pionere
f91211eb17 cleanup WASAPI_PrepDevice
- reorganize the loop which checks for the right wave-format
- use the return value of UpdateAudioStream
- ensure SetError is called in SDL_NewAudioStream
2022-01-28 20:40:19 -05:00
pionere
c9e8d1573a re-use return value of SDL_SetError/WIN_SetErrorFromHRESULT/SDL_OutOfMemory II. 2022-01-28 20:40:19 -05:00
pionere
1043dd8c0d adjust handling of iscapture
- drop iscapture parameter of OpenDevice
- use SDL_bool for iscapture
2022-01-28 20:40:19 -05:00
pionere
e2f70a2dff cleanup SDL_EventState 2022-01-28 20:40:19 -05:00
pionere
32c7d5d352 cleanup IME_UpdateInputLocale
- do not store the HKL in a static variable
- always set the ime_candvertical value in case the HKL is changed
2022-01-28 20:40:19 -05:00
pionere
25aa7244dc cleanup IME_GetId
- use assert instead of a check (it is a static function with constant parameter)
- assume it is called with 0 first (simplifies the logic)
- reuse dwLang value instead of a new 'call' to LANG()
2022-01-28 20:40:19 -05:00
pionere
60deadba59 re-use return value of SDL_SetError/WIN_SetErrorFromHRESULT/SDL_OutOfMemory 2022-01-28 20:40:19 -05:00
pionere
ebdd536676 use SDL_InvalidParamError or SDL_assert instead of custom SDL_SetError 2022-01-28 20:40:19 -05:00
pionere
4a17612bff get rid of BeginLoopIteration 2022-01-28 20:40:19 -05:00
pionere
0770c5829c get rid of PrepareToClose 2022-01-28 20:40:19 -05:00
Ryan C. Gordon
e0236c02ce audio: Removed an unnecessary commented-out line. 2022-01-28 20:40:19 -05:00
pionere
0dda8a7f4c cleanup init functions of audio
- use SDL_bool if possible
- assume NULL/SDL_FALSE filled impl
- skip zfill of current_audio at the beginning of SDL_AudioInit (done before the init() calls)
2022-01-28 20:40:19 -05:00
pionere
6fcfcc3d6f get rid of SkipMixerLock 2022-01-28 20:40:19 -05:00
pionere
3c85cef46c cleanup SDL_RegisterApp
- fix memory leak when RegisterClassEx fails
- set style according to the documentation
- eliminate duplicated SDL_Instance setter
2022-01-28 20:40:19 -05:00
pionere
0af391cbe9 build with Release config on push and pull_request 2022-01-28 20:40:19 -05:00
pionere
ff2d62d89f dlopen is not a subsystem 2022-01-28 20:40:19 -05:00
pionere
a633a3c33e add audio/video dummies if nothing else available II. 2022-01-28 20:40:19 -05:00
pionere
398f9a0e40 fix have_audio/video flags, add uikit to SUMMARY_video in configure 2022-01-28 20:40:19 -05:00
pionere
fa8075c4fc add audio/video dummies if nothing else available 2022-01-28 20:40:19 -05:00
pionere
39c723fc9c fix HAVE_SDL_VIDEO flag of CMakeLists.txt [IOS OR TVOS] 2022-01-28 20:40:19 -05:00
pionere
3dba2a73f1 fix HAVE_SDL_AUDIO flag of CMakeLists.txt II. 2022-01-28 20:40:19 -05:00
pionere
014e2bbdb2 use SDL_COMPILE_TIME_ASSERT instead of SDL_STATIC_ASSERT 2022-01-28 20:40:19 -05:00
pionere
3936af99d8 fix HAVE_SDL_AUDIO flag of CMakeLists.txt 2022-01-28 20:40:19 -05:00
pionere
21510387cf fix CMakeLists.txt vs. configure inconsistencies
- atomic subsystem is disabled by default (changed in configure)
- SDL_WAYLAND_LIBDECOR is disabled by default if SDL_WAYLAND is not set (changed in CMakeLists.txt)
2022-01-28 20:40:19 -05:00
pionere
95f30c7a48 fix compiler warnings in video/uikit 2022-01-28 20:40:19 -05:00
pionere
11cdde01f3 fix MacOS build with disabled SDL_SENSOR
+ get rid of the double-check (SDL_HAPTIC depends on SDL_JOYSTICK)
2022-01-28 20:40:19 -05:00
pionere
176941a4fb allow MacOS build without SDL_FILE 2022-01-28 20:40:19 -05:00
pionere
b1b2ad725c sync handling of subsystems II. (+) 2022-01-28 20:40:19 -05:00
pionere
eb80f2c65a sync handling of subsystems II. 2022-01-28 20:40:19 -05:00
pionere
65e9415b98 sync handling of subsystems
- add DUMMY-define in case the subsystem is enabled but not available (filesystem/misc/locale)
- add missing PSP/VITA-filesystem defines
- sync the order of filesystems in SDL_config.h.cmake/in
- add option to disable locale subsystem in configure
2022-01-28 20:40:19 -05:00
pionere
ea8cf4bd0f add 'Misc' subsystem II. 2022-01-28 20:40:19 -05:00
pionere
118de86202 more conform vulkan/metal configuration 2022-01-28 20:40:19 -05:00
pionere
606d2ea87f bugfix for "add 'Misc' subsystem" 2022-01-28 20:40:19 -05:00
pionere
998117b3ff add 'Misc' subsystem 2022-01-28 20:40:19 -05:00
pionere
942b01a54c do not use RWOps in WIN_SetWindowIcon 2022-01-28 20:40:19 -05:00
pionere
739f350f45 add SDL_LOCALE_DISABLED to SDL_config.h 2022-01-28 20:40:19 -05:00
pionere
bf66720a4d fix mixing of U16 audio 2022-01-28 20:40:19 -05:00
pionere
905e2e22ef cleanup of SDL_MixAudioFormat 2022-01-28 20:40:19 -05:00
pionere
d7110b4490 fix compiler warnings in SDL_windows_gaming_input.c 2022-01-28 20:40:19 -05:00
pionere
e11ba0f5d9 do not load/unload opengl library when SDL_WINDOW_METAL flag is changed 2022-01-28 20:40:19 -05:00
Sylvain
f5911bdc59 GLES2: disable texcoord when not using it (see bug #5235)
similar to opengl backend code:
- glDisableVertexAttribArray doesn't need to depend on 'drawstate.texture' value
- move binding code to SetCopyState()
2022-01-28 19:25:40 +01:00
Sylvain
096fe37bb2 GLES2: revert 7bf8c5a388 2022-01-28 19:25:40 +01:00
Sylvain
a988ce5544 Fixed bug #964 - SDL_RenderCopy stretch loses proportion on viewport boundaries 2022-01-28 17:24:59 +01:00
Sylvain
7bf8c5a388 GLES2: disable texcoord when not using it (see bug #5235) 2022-01-27 21:49:05 -05:00
Vitaliy Zhmurikov
5b74459255 Update SDL_joystick.c
Add Logitech Momo Racing Wheel VID & PID  to SDL_IsJoystickProductWheel function
2022-01-27 12:30:41 -08:00
Ryan C. Gordon
19ae71b2db video: Don't add SDL_WINDOW_(METAL|OPENGL) to new windows if unsupported.
Fixes #4656.

(Better than the previous fix in 3044310518dbb2d4814b32c6521f332b8d69aae5.)
2022-01-27 11:49:15 -05:00
Ivan Epifanov
d7e0c54dde PSVita: send initial SDL_JOYDEVICEADDED events 2022-01-27 08:47:53 -08:00
Cameron Gutman
cc40f732f9 wayland: Round the refresh rate rather than truncating it
A 59999 mHz monitor should be reported as 60 Hz, not 59 Hz.
2022-01-26 21:27:13 -06:00
Ryan C. Gordon
3044310518 video: Don't add SDL_WINDOW_METAL to new windows if not using Cocoa or UIKit.
Fixes #4656.
2022-01-26 21:10:15 -05:00
Cameron Gutman
77a9ca6ba0 wayland: Fix SDL_SetWindowSize() being dropped right after exiting fullscreen
If we get a SDL_SetWindowSize() call right after SDL_SetWindowFullscreen() but
before we've gotten a new configure event from the compositor, the attempt to
set our window size will silently fail (when libdecor is enabled).

Fix this by remembering that we need to commit a new size, so we can do that
in decoration_frame_configure().
2022-01-26 19:48:16 -05:00
Cameron Gutman
c6ec5a07f1 d3d11: Respect SDL_HINT_RENDER_DIRECT3D_THREADSAFE when creating device 2022-01-26 18:44:29 -06:00
Ryan C. Gordon
f37e4a94d3 video: Don't check if we can use a "texture framebuffer" until needed.
This prevents SDL from making an OpenGL context and maybe throwing it away
immediately by default. It will now only do it when trying to request a
window framebuffer directly, or creating an SDL_Renderer with the "software"
backend, which makes that request itself.

The way SDL decides if it should use a "texture framebuffer" needs dramatic
updating, but this solves the immediate problem.

Reference Issue #4624.
2022-01-26 17:06:25 -05:00
Eric Wasylishen
71e06a536a cmake: fix Metal detection
Confirmed to work on:
macOS 10.15.7
XCode Version 12.4 (12D4e)
2022-01-26 12:33:16 -05:00
Ethan Lee
8ceba27d62 video: Prefer Wayland over X11 2022-01-26 12:32:45 -05:00
Ethan Lee
68a71f91c6 wayland: Try to avoid committing before the window is shown 2022-01-25 17:19:19 -05:00
Sam Lantinga
84320266f2 Fixed the queue filling up with sentinel events when the WaitEvent call is passed NULL for the event
The use case is an application that waits for events on the main thread and dispatches them on a separate thread.
2022-01-25 12:37:43 -08:00
Ethan Lee
f0e768da43 wayland: Call SetFullscreen directly in ShowWindow.
This cuts out an extra flush when getting the first configure event.
2022-01-25 13:07:00 -05:00
Sylvain
8c660ccb6f Fixed bug #5256: X11 Segmentation fault with multiple windows and renderers
First window is created and it triggers and 'EnterNotify' event
which calls SDL_SetMouseFocus() and X11_ShowCursor() while the second
windows hasn't finished to be created  (eg window->driverdata isn't set)
Just check for a valid 'driverdata'
2022-01-25 17:18:40 +01:00
Ethan Lee
e2d74bcbe5 wayland: Detach hidden surfaces in HideWindow, not ShowWindow 2022-01-25 11:16:09 -05:00
Ryan C. Gordon
ca22b30e46 testgles2: Use vertex buffer objects instead of client-side arrays.
GLES2 always has them, and they work without hacks on Emscripten, unlike
client-side arrays.

I cleaned it up slightly, but this patch was mostly written by @bing2008.

Fixes #5258.
2022-01-24 22:41:41 -05:00
ulatekh
57bc90403e Add hint to optionally forcibly raise the window under MS Windows. 2022-01-24 11:10:57 -08:00
ulatekh
d7873e656b Disable tablet flicks under MS Windows. 2022-01-22 08:52:46 -08:00
Charlie Birks
15ebad6e7d emscripten: Implement SDL_OpenURL 2022-01-22 13:31:11 +00:00
Charlie Birks
99af3281ee timer: Fix Emscripten declaration-after-statement error 2022-01-22 12:27:54 +00:00
ulatekh
53df0e6619 Fix the erroneous generation of mouse-down events from touch-move events.
The issue is that MS Windows synthesizes a mouse-move event in response
to touch-move events, and those mouse-move events are NOT labeled as
coming from a touch (e.g. GetMouseMessageSource() will not return
SDL_MOUSE_EVENT_SOURCE_TOUCH for those synthesized mouse-move events).

In addition, there seems to be no way to prevent this from happening;
https://gist.github.com/vbfox/1339671 claims to demonstrate a technique
to prevent it, but in my experience, it doesn't work.

Because of this, the "fallthrough" case can't test that the synthesized
mouse-move came from a touch-move, and starts erroneously pressing down
the mouse-button, leading to massive confusion in the client
application.
2022-01-21 17:23:59 -08:00
ulatekh
8f8b14cbb6 Synthesize a missing touch-up event.
If a touch-down event is received for an existing touch-ID, that
probably means the operating system lost it, and that the missing
touch-up should be synthesized, to keep the client state coherent.
2022-01-21 17:23:11 -08:00
Ozkan Sezer
d2456b6e4c os2, geniconv: default functions pointers to Uni*() API,
In case they get accessed before SDL_Init() was called.
2022-01-21 11:50:40 +03:00
Sam Lantinga
67cb548bef Fixed build error with C90 compilers 2022-01-20 19:31:54 -08:00
Carl Glave
a23b3c767f Add support for correlating trigger input 2022-01-20 17:43:35 -08:00
Ethan Lee
e1b4761c62 wayland: Avoid calling SetFullscreen in libdecor ShowWindow.
This caused some weird stuff to happen in the libdecor path, probably because
the window hasn't actually been mapped yet. It ends up calling stuff that
should not yet apply, and so fullscreen in particular would have a really
messed up titlebar.

The good news is, libdecor is good about tracking fullscreen state, so we can
let the callback do this for us. Keep this for xdg_shell because we actually
map the window ourselves, so we know this call is valid for that path.
2022-01-20 14:10:58 -05:00
Ethan Lee
ed3442d7a5 wayland: Fix building with SDL_OPENGL=OFF 2022-01-19 15:47:52 -05:00
Ryan C. Gordon
426c1f4b85 opengles2: fix comment about client-side arrays. 2022-01-19 14:28:30 -05:00
Frank Praznik
b3984df1c6 audio: pipewire: Use client config files instead of module names
Pipewire, as of 0.3.22, uses client config files to load modules instead of explicitly specifying them (PW_KEY_CONTEXT_PROFILE_MODULES is deprecated).  Use the new method to load the realtime module to boost the audio thread priority.
2022-01-19 14:20:19 -05:00
Ozkan Sezer
381520ad92 updates for watcom optimization flags 2022-01-18 14:32:24 +03:00
Sam Lantinga
a0e3c884d4 Updated to version 2.0.21 for development 2022-01-17 15:32:27 -08:00
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
Sam Lantinga
4b71962031 Prevent overdraw with connected line segments 2022-01-08 12:02:30 -08:00
Ozkan Sezer
63d10a0ac2 updates to config.guess and config.sub from mainstream. 2022-01-08 23:00:32 +03:00
Sam Lantinga
09ece861d1 Added the hint SDL_HINT_RENDER_LINE_METHOD to select the line rendering method 2022-01-08 11:36:52 -08:00
Ozkan Sezer
836a4ec7b1 updates to os/2 build 2022-01-08 22:35:02 +03:00
Sam Lantinga
c1e6079836 As an optimization, draw horizontal and vertical lines using rectangles 2022-01-08 11:09:11 -08:00
Sam Lantinga
3da7c6305a Assert that we have drawn the expected number of points 2022-01-08 11:07:03 -08:00
Sam Lantinga
9f56faeedc Added line drawing using Bresenham's line algorithm (thanks @rtrussell!) 2022-01-08 10:59:31 -08:00
Sam Lantinga
fe3a33a092 Use RenderGeometry for drawing lines at all scales 2022-01-08 10:10:18 -08:00
Neal Gompa
0696fc0134 cmake: Split SDL2-static and SDL2main into their own target exports
This makes it so that the generated targets are not interdependent,
which allows Linux distributions to split libraries into the
appropriate subpackages as needed.
2022-01-08 09:50:14 -08:00
Sam Lantinga
1694782b2a Remove redundant work when render scale is 1.0 2022-01-08 09:32:23 -08:00
Sam Lantinga
2026a78dc2 Don't flush in RenderDraw*WithRects()
This allows these functions to be reused in the future for other primitives
2022-01-08 09:23:58 -08:00
Sam Lantinga
18e4d9fed1 Re-enable line drawing path in render drivers
This is still used for scaled line drawing in RenderDrawLinesWithRects()
2022-01-08 09:02:25 -08:00
Sam Lantinga
dca281e810 Fixed getting different results for SDL_PollEvent(NULL) and SDL_PollEvent(&event) 2022-01-08 08:49:34 -08:00
Ozkan Sezer
93cab32db3 minor update to test/Makefile.os2 2022-01-08 14:40:20 +03:00
Ozkan Sezer
4472b83129 PSP_RunCommandQueue: fix argument to PSP_SetBlendState()
src/render/psp/SDL_render_psp.c: In function 'PSP_RunCommandQueue':
src/render/psp/SDL_render_psp.c:1200: warning: passing argument 1 of 'PSP_SetBlendState' from incompatible pointer type
2022-01-08 11:56:56 +03:00
Ozkan Sezer
df1474b46e psp/SDL_sysfilesystem.c: fixed a minor compiler warning.
src/filesystem/psp/SDL_sysfilesystem.c: In function 'SDL_GetPrefPath':
src/filesystem/psp/SDL_sysfilesystem.c:71: warning: passing argument 1 of 'free' discards qualifiers from pointer target type
2022-01-08 11:55:10 +03:00
Ozkan Sezer
21914b4e2f updated Makefile.psp and SDL_config_psp.h 2022-01-08 11:55:10 +03:00
Ryan C. Gordon
f62b807174 wikiheaders.pl: Put the manpages in man/man3 2022-01-07 21:39:10 -05:00
Sam Lantinga
9294634840 Updated to version 2.0.20 for release 2022-01-07 18:29:40 -08:00
Ryan C. Gordon
cc2013378d render: Fixed some compiler warnings.
Fixes #5197.
2022-01-07 20:22:51 -05:00
Sam Lantinga
289c3fbb64 Revert "We only need to add the sentinel at the top of SDL_WaitEventTimeout()"
This reverts commit c477768e6f.

We want to add the sentinel anytime we pump inside SDL_WaitEventTimeout() to avoid pumping again the next time through, as a performance optimization.
2022-01-07 17:07:22 -08:00
Sam Lantinga
1085c317a5 Use the requested cursor size instead of the default cursor size
CopyImage() will scale based on the system accessibility settings automatically.

Fixes https://github.com/libsdl-org/SDL/issues/5198
2022-01-07 16:45:18 -08:00
Ryan C. Gordon
6d3b5d66cd psp: draw lines with RenderGeometry, same as with the other renderers. 2022-01-07 18:18:53 -05:00
Sylvain
9cb2c549fa Remove QueueDrawLines from D3D, D3D11 2022-01-07 14:10:23 -08:00
Sylvain
b88b6b3c23 Remove QueueDrawLines from METAL 2022-01-07 14:10:23 -08:00
Sylvain
9aac55317d Remove QueueDrawLines from GL, GLES, GLES2 2022-01-07 14:10:23 -08:00
Sylvain
8ea8b2e697 Use QueueDrawLine if provided, otherwise use RenderGeometry 2022-01-07 14:10:23 -08:00
Sylvain Becker
c498727471 render: Use RenderGeometry to draw lines
This patch is from @1bsyl

Fixes #5061.
2022-01-07 16:14:28 -05:00
Sam Lantinga
4b38d4c96b Leave the Metal view active on the window when recreating the Metal renderer
Fixes https://github.com/libsdl-org/SDL/issues/5140

Also move the metal tag definition to SDL_syswm.h so it can be used by applications
2022-01-07 12:38:45 -08:00
Ryan C. Gordon
88ac517df0 opengles2: Fix point drawing. 2022-01-07 15:04:04 -05:00
Sam Lantinga
957c48b4c7 Fixed detecting focus change to child dialogs
Fixes https://github.com/libsdl-org/SDL/issues/5157
2022-01-07 10:58:04 -08:00
Sam Lantinga
c477768e6f We only need to add the sentinel at the top of SDL_WaitEventTimeout() 2022-01-06 18:58:30 -08:00
Cameron Gutman
e9134b045a events: Only add sentinels for pumping done inside SDL_WaitEventTimeout()
We don't want to catch explicit SDL_PumpEvents() calls by the application with
our polling check to avoid stale data. If the call to SDL_PumpEvents() produced
no events, there will be a sentinel sitting in the queue that will cause
SDL_PollEvent() to immediately return 0 next time it is called.

Our SDL_WaitEventTimeout() implementation avoids this issue by always popping
an event after calling SDL_PumpEvents(). This will remove the new sentinel if
we didn't get any new events.
2022-01-06 18:35:23 -08:00
Sam Lantinga
954858846d Move special sentinel handling inside SDL_PeepEvents() 2022-01-06 14:05:22 -08:00
Sam Lantinga
2592e6219b Clarify that timeout == 0 is handled at the top of SDL_WaitEventTimeout() 2022-01-06 14:05:22 -08:00
Sam Lantinga
8ff2166855 Only return from SDL_PollEvent() if the last sentinel is consumed 2022-01-06 14:05:22 -08:00
Sam Lantinga
c9ff90b949 Clarify comment
Co-authored-by: Simon McVittie <smcv@debian.org>
2022-01-06 14:05:22 -08:00
Sam Lantinga
31f8c3ef44 Fixed event pump starvation if the application frequently pushes its own events 2022-01-06 14:05:22 -08:00
Wouter Wijsman
e0c5399119 Don't make psp eboot for testoffscreen 2022-01-06 13:33:17 -08:00
Ryan C. Gordon
5d3f6b0215 wikiheaders.pl: Added support for export to Unix manpages.
This mostly works, but likely needs some tweaking as we examine the output
of various pages.

Fixes #5163.
2022-01-06 15:37:05 -05:00
Ozkan Sezer
75ac944b9c check for tpcshrd.h and define HAVE_TPCSHRD_H if it's available. 2022-01-06 22:24:00 +03:00
Wouter Wijsman
515b5f2a39 Fix build errors in PSP port 2022-01-06 10:17:05 -08:00
Wouter Wijsman
34e34ad5a5 Remove debug code from PSP renderer 2022-01-06 10:17:05 -08:00
stdgregwar
520c89a00a cleaning 2022-01-06 10:17:05 -08:00
stdgregwar
09f4711f40 Fix LRU when destroying texture. 2022-01-06 10:17:05 -08:00
stdgregwar
c3ec62d6a6 PSP lazier blend states, display mode report with 16bit option 2022-01-06 10:17:05 -08:00
stdgregwar
0f5368fe11 PSP cached blending and texturing state, ABGR1555 stencil hack 2022-01-06 10:17:05 -08:00
stdgregwar
fe405eb27b fixed LRU cache code 2022-01-06 10:17:05 -08:00
stdgregwar
c1f152292b Spill render targets to ram on PSP 2022-01-06 10:17:05 -08:00
stdgregwar
77d874e3c0 Attempt to make render to texture work on PSP 2022-01-06 10:17:05 -08:00
Ryan C. Gordon
7967c97618 cmake: Do a more thorough test for the old bcm Raspberry Pi libraries.
Fixes #5132.
2022-01-05 21:02:38 -05:00
Francisco Javier Trujillo Mata
f3255df9c0 Improve audio compatibility in PSP. Now it supports more formats and frequencies 2022-01-05 19:15:41 -05:00
Sam Lantinga
16f5b9e3c3 Filter jitter on Xbox One controllers when using raw input reports 2022-01-05 11:07:52 -08:00
Wouter Wijsman
eca198d519 Don't build an eboot for testgesture for PSP 2022-01-05 08:30:28 -08:00
Wouter Wijsman
cd6cb959c0 Only copy resources to PSP eboot directory if it exists 2022-01-05 08:30:28 -08:00
Wouter Wijsman
9d0b4d85fc Don't build EBOOT files for all tests for PSP 2022-01-05 08:30:28 -08:00
Wouter Wijsman
b2ca62f23a Make sure all tests have the resources they need 2022-01-05 08:30:28 -08:00
Wouter Wijsman
6d46e30fed Remove extra / in PSP GetPrefPath 2022-01-05 08:29:35 -08:00
Wouter Wijsman
33dccbb381 Make sure GetPrefPath also works without org 2022-01-05 08:29:35 -08:00
Cameron Gutman
419ae29d90 joystick: Move WGI driver initialization after Windows driver
WGI calls SDL_DINPUT_JoystickPresent() so we need to be sure DInput remains
initialized for the lifetime of the WGI driver to avoid a crash or duplicated
joysticks between DInput and WGI.
2022-01-04 15:53:39 -08:00
Cameron Gutman
d73bd0d2f6 dinput: Don't crash in SDL_DINPUT_JoystickPresent if DInput init failed
The WGI driver will call this regardless of whether our init succeeded.
2022-01-04 15:53:39 -08:00
ulatekh
3ea82eaaff Under MSVC, build project-sources in parallel. 2022-01-04 15:24:31 -08:00
Ozkan Sezer
565ef63873 SDL_rwops.c: simplify foo <= 0 checks to !foo with unsigned types. 2022-01-04 11:40:04 +03:00
Ryan C. Gordon
30f895a5f3 Update os2.yml
Specify the WATCOM environment variable in the "run" command line directly, so the home directory gets correct shell expansion.
2022-01-03 21:55:10 -05:00
Ryan C. Gordon
1d918a283c Update os2.yml
Whoops, forgot the `-R` on the chmod command.
2022-01-03 21:52:47 -05:00
Ryan C. Gordon
39fc1e87e5 os2.yml: OpenWatcom install fixes
Make everything in Open Watcom install executable (because none of it is, and this is good enough), and make wget less verbose.
2022-01-03 21:51:12 -05:00
Ryan C. Gordon
eb3639d3c5 os2.yml: Fix wget command line
It's a capital O, not lowercase.  :/
2022-01-03 21:47:04 -05:00
Ryan C. Gordon
56813d0203 Create os2.yml
This is a quick test to see if we can cache an OpenWatcom install on a GitHub Actions instance and build for OS/2 with it.
2022-01-03 21:44:17 -05:00
Cameron Gutman
8f924b82d9 kmsdrm: Remove gbm_bo_get_offset()
It is not present on some older libgbm versions that we still
support and has been unused since 85e8adf.
2022-01-03 16:41:03 -06:00
Wouter Wijsman
a201c94833 Build tests for PSP in CI 2022-01-03 13:04:52 -08:00
Wouter Wijsman
fcb638ff90 Copy test resources to correct directory on PSP 2022-01-03 10:39:15 -08:00
Wouter Wijsman
5e84f6384f Rename test directories for PSP and only build PRX if asked 2022-01-03 10:39:15 -08:00
Wouter Wijsman
bf2336078c Make tests build for PSP and make them able to launch 2022-01-03 10:39:15 -08:00
Wouter Wijsman
cd1f24a998 Add forgotten psppower library to link 2022-01-03 10:39:15 -08:00
Sam Lantinga
120c76c84b Updated copyright for 2022 2022-01-03 09:40:21 -08:00
Sylvain
8622eda9e9 SDL_RenderGeometry / software: TRIANGLE_GET_TEXTCOORD interpolates up to the max values included, so reduce by 1 2022-01-02 22:34:56 +01:00
Ozkan Sezer
4b112620a3 SDL_cocoamodes.m (Cocoa_GetDisplayDPI): fix build using older toolchains
Fixes https://github.com/libsdl-org/SDL/issues/5162
2022-01-02 19:11:50 +03:00
Francisco Javier Trujillo Mata
13a9cd4797 Adding sysfilesystem driver to PSP 2022-01-02 08:06:04 -08:00
rohlem
0403fa8aa6 X11_WaitEventTimeout: remove unreachable return
If that condition was reachable, the return value should be negative to indicate that waiting for the timeout failed.
Otherwise, SDL_WaitEventTimeout would incorrectly return early.
2022-01-02 08:04:13 -08:00
e
d0de4c625a Android: fixes build NDK 21d 2021-12-31 11:12:21 -08:00
Sam Lantinga
8f81699868 Only clear IME display options if SDL_HINT_IME_SHOW_UI is off (thanks opxdo!)
Fixes https://github.com/libsdl-org/SDL/issues/5153
2021-12-31 08:49:28 -08:00
Ryan C. Gordon
e4000c0284 video: SDL_GL_GetAttribute needs to operate on FBO 0.
If a different FBO is bound, this would return incorrect results.

Fixes #5082.
2021-12-31 10:32:39 -05:00
Sam Lantinga
2363ddc330 Fixed crash on Windows Subsystem for Android, which doesn't have a USB manager.
Fixes https://github.com/libsdl-org/SDL/issues/5133
2021-12-28 17:30:36 -08:00
Sam Lantinga
ab6d0d4d50 Fixed undefined behavior in SDL_memset() (thanks andrewrk!)
Fixes https://github.com/libsdl-org/SDL/issues/5147
2021-12-28 15:58:15 -08:00
shinyquagsire23
6a7b63802c Fix macOS cursor jumping to corner on first titlebar click 2021-12-28 13:38:23 -08:00
Edward Li
a35a7d2507 Fix SigSegV from displayInfoInvalidate when changing resolution 2021-12-28 09:33:44 -08:00
Edward Li
1c41b53551 macOS: Calculate correct DPI by not using backingScaleFactor 2021-12-28 09:33:44 -08:00
Alex Szpakowski
724468ae2c GL renderer uses glDrawArrays instead of glBegin/glEnd.
Also change internal colors sent to GL to use unorm8 components instead of float, for improved performance.
2021-12-27 10:52:47 -05:00
Sylvain
a1e992b110 Fixed bug #5118 - [Android] PointerIcon leak in Cursor API 2021-12-21 22:07:17 +01:00
Ozkan Sezer
5ca0926d8d fixes to visual test MSVC project files.
-- based on a patch by Cameron Cawley
2021-12-21 20:12:20 +03:00
Ozkan Sezer
b8d839c0c0 remove all unnecessary stuff from visualtest configury. 2021-12-21 20:01:02 +03:00
Ozkan Sezer
8a355116d1 silence -Wwrite-strings in visualtest 2021-12-21 20:01:02 +03:00
Ozkan Sezer
71c497a3a3 visualtest windows build fixes 2021-12-21 14:50:00 +03:00
Ozkan Sezer
449ef08dcc minimal fixes to visual test, so that it actually builds w/o warnings:
- linux_process.c: add an SDLVisualTest_ScreenshotProcess() stub for
  linux builds succeed.
- action_configparser.c: fixes -Wswitch warnings.
- testharness.c: fixes 'is used uninitialized' warnings for userevents.
- testharness.c: fixes format string argument to 'Force killing...'
- testquit.c: fix type of options array in main().
- windows_screenshot.c: lowercase windows.h header name.
- ran dos2unix on all sources and add missing newlines at files' ends.
- minor adjustments to autotools build system (which actually seems to
  need more surgery for unnecessary stuff...)
2021-12-21 14:24:20 +03:00
Cameron Gutman
505df1a99b autotools: Fix typo in libgbm print 2021-12-19 20:43:48 -06:00
Ozkan Sezer
0673e448f0 autotools: improved detection of windows.gaming.input.h
similar to cmake commit 83583dc49d
2021-12-20 01:03:56 +03:00
Cameron Gutman
83583dc49d cmake: Fix WGI detection with older SDKs 2021-12-19 15:07:37 -06:00
Ozkan Sezer
398c0fdff0 cmake: simplify wayland-scanner 1.15 detection. 2021-12-18 23:56:10 +03:00
Wohlstand
54d2451069 sdlchecks.cmake: Small tune by @sezero 2021-12-18 20:32:20 +03:00
Wohlstand
6c9907dd0e Fixed build on CMake older than 3.7
I found this accidentally when I tried to use CMake 3.0 to build this.
2021-12-18 06:28:22 -08:00
Wohlstand
3861afacf5 Fixed build on CMake older than 3.13
Fixes #5096
2021-12-18 06:28:22 -08:00
Ozkan Sezer
840339c49d SDL_utf8strlcpy: store trailing_bytes explicity as unsigned type. 2021-12-18 14:01:02 +03:00
Ozkan Sezer
507d4bcd68 SDL_utf8strlen: run bit-test explicitly on unsigned char 2021-12-18 14:01:02 +03:00
Ozkan Sezer
82fc67ae4d SDL_joystick.c: cast the arguments to nibble() to unsigned char. 2021-12-18 14:01:02 +03:00
Ozkan Sezer
47d3e96b43 SDL_joystick.c: (unsigned char) cast to SDL_tolower() parameters. 2021-12-18 14:01:02 +03:00
Sam Lantinga
881feca1f2 CMAKE: fixed cflags check for build type
Martin Gerhardy wrote:

If there is a variable named test, then cmake does variable-value comparison:
if (test STREQUAL "")
is equivalent to:
if ("${test}" STREQUAL "")

If there is no variable named test, then cmake does string literal comparison:
if (test STREQUAL "")
is equivalent to:
if ("test" STREQUAL "")

That means basically - the current stuff works - but is not how it should be done.

Fixes https://github.com/libsdl-org/SDL/issues/2100
2021-12-17 19:14:34 -08:00
Sam Lantinga
c31a40246d Fix audio memory leaks due to invalid init (thanks Janiszewski!)
SDL_Init(SDL_INIT_AUDIO) did not take into account that functions like
SDL_AddAudioDevice do register events, which will need final cleanup
and only gets fired when events were actually initialised.

Sample call stack of a malloc missing its free (Linux + PA):
    SDL_malloc_REAL (SDL_malloc.c:5328)
    SDL_AddEvent (SDL_events.c:445)
    SDL_PeepEvents_REAL (SDL_events.c:531)
    SDL_PushEvent_REAL (SDL_events.c:762)
    SDL_AddAudioDevice (SDL_audio.c:443)
    SourceInfoCallback (SDL_pulseaudio.c:681)
    context_get_source_info_callback (introspect.c:534)
    run_action (pdispatch.c:288)
    pa_pdispatch_run (pdispatch.c:341)
    pstream_packet_callback (context.c:349)
    do_read (pstream.c:1012)

Fixes https://github.com/libsdl-org/SDL/issues/3005
2021-12-17 19:04:39 -08:00
Erik Soma
71e3998d6c Make SDL_VideoInit cleanup when errors occur before video driver creation. 2021-12-17 18:55:49 -08:00
Francisco Javier Trujillo Mata
8ed0cc4300 Fix wrong value for thread priorities following official PSP Docs 2021-12-17 13:57:22 -08:00
Sylvain
44c84c0d8e GLES2/Big-endian: don´t swap datas for yuv textures (Thanks 0x1F9F1 !) 2021-12-17 17:44:34 +01:00
Sylvain
3a69828e87 Fixed GLES2 back-end on Big Endian Platform (see #5093) 2021-12-17 13:15:39 +01:00
Ozkan Sezer
61107494a1 SDL_gamecontroller.c: (unsigned char) cast to SDL_isdigit() parameters. 2021-12-17 07:40:02 +03:00
Ozkan Sezer
ced442cd38 SDL_test_common.c: (unsigned char) cast to SDL_isdigit() parameter. 2021-12-17 07:33:10 +03:00
Ozkan Sezer
48d1ef8fad another unsigned char cast in os2cp.c. code clean-up in os/2 geniconv. 2021-12-17 07:33:10 +03:00
Ozkan Sezer
dac6516057 os2iconv.c (_createUconvObj): cast to unsigned char, to be safe. 2021-12-17 02:50:40 +03:00
Ozkan Sezer
2052b5bc3e os2messagebox: use proper UCHAR* typecast in assignment, just in case. 2021-12-17 01:10:10 +03:00
Sam Lantinga
ca18bf11ee Don't compare raw mouse button state with windows message button state
When mouse buttons are swapped, right mouse button down is the same value as raw mouse button up, and conceptually the two systems use different button masks, so never cache state between the two.

Fixes https://github.com/libsdl-org/SDL/issues/5108
2021-12-16 12:01:18 -08:00
Sylvain
3d5fcb5da6 Fix warning 2021-12-16 09:19:53 -08:00
Sylvain
4342e6bd21 SDL_render.c: lighten the cast syntax 2021-12-16 09:19:53 -08:00
Sylvain
50d49c63ed GLES2 backend: cast with SDL_Vertex and SDL_VertexSolid 2021-12-16 09:19:53 -08:00
Ethan Lee
4c9966eed6 wayland: Add a note for why we check 0,0 for fullscreen configurations 2021-12-16 10:22:27 -05:00
Sylvain
6101499c7c BigEndian: fix code that generates illegal instruction with gcc-4.9.2 on powerpc
Program received signal SIGILL, Illegal instruction.
X11_InitKeyboard (_this=0x1001f8f0)
    at /home/sdl/SDL_git/src/video/x11/SDL_x11keyboard.c:273
273	    XKeyboardState values = { .global_auto_repeat = AutoRepeatModeOff };
2021-12-16 09:07:31 +01:00
stdgregwar
0b7b0977fc fix PSP texure artifacts 2021-12-15 18:00:28 -08:00
Francisco Javier Trujillo Mata
996f30b0e4 Use lightweight mutex 2021-12-15 13:59:08 -08:00
Francisco Javier Trujillo Mata
0341ec93fe Improve performance when vsync is enabled and the game is not reaching the 60 FPS 2021-12-15 11:29:49 -08:00
Sam Lantinga
67c4b99639 Fixed enabling udev hotplug detection on Linux 2021-12-15 10:39:42 -08:00
Ivan Epifanov
60c3ca49b4 Vita: disable arm asm blitters and add missing pvr dep 2021-12-15 01:32:56 +03:00
Sam Lantinga
c326ff7c6f Re-enabled the O_CLOEXEC definition so config headers can be fixed 2021-12-14 12:42:39 -08:00
Alex Szpakowski
7f5339e6c4 Document the packed integer formats SDL_Color is bit-compatible with. 2021-12-14 12:19:16 -08:00
Alex Szpakowski
3a5e148b13 Renderer backends use SDL_Color instead of int for geometry colors. 2021-12-14 12:19:16 -08:00
Sam Lantinga
086c74556d Fixed build warning on iOS 2021-12-14 12:08:36 -08:00
Sam Lantinga
b08e57e926 Don't try to create a vbo if we aren't using any vertices 2021-12-14 09:32:05 -08:00
Sylvain
b7885abc44 Fixed bug #5087: SDL_RenderGeometryRaw() passes colors as int* instead of SDL_Color* 2021-12-14 10:31:55 +01:00
Alex Szpakowski
323ba6c008 d3d11 renderer: reduce vertex bandwidth and calculations. 2021-12-13 15:14:33 -08:00
thfrwn
2b6b69fb12 fix assertion failure in sndio audio caused by the recent hotplugging support 2021-12-13 11:26:35 -08:00
Sylvain
8927d73b1c RenderGeometry: simplify casting (Thanks Daniel Gibson) 2021-12-12 09:55:23 +01:00
Sylvain
d7f66ba1ec Remove strict aliasing warning in opengles2 backend 2021-12-11 20:04:53 +01:00
Sylvain
3e43d6e34b SDL_RenderGeometry: remove some warning "dereferencing type-punned pointer might break strict-aliasing" 2021-12-11 17:19:00 +01:00
David Redondo
e2ade2bfc4 Fix build against wayland 1.20
Fixes #5088
2021-12-10 08:59:20 -08:00
David Gow
9da93d074b video: x11: Set XImage's byte_order field (fix #5081)
If the X server's byte order is different from the client, things might
display in the wrong colour.

Apparently we can just set the byte_order field to the client's byte
order, and the X server will adjust everything automatically:
https://xorg.freedesktop.narkive.com/GbSD1aPq/ximage-s-byte-order-field
2021-12-09 20:40:12 -08:00
Hanseul Jun
e7f84c20bc Fix a typo in comment. 2021-12-09 11:05:23 -08:00
Hanseul Jun
66fbf00e7d Temporarily ignore gl_config.driver_loaded check in Cocoa_GLES_SetupWindow. 2021-12-09 11:05:23 -08:00
Valentin Hăloiu
cb8fa5f9c3 wayland: fix keycodes of swapped xkb modifier keys 2021-12-09 09:30:58 -08:00
Ozkan Sezer
615f7b4453 more updates to os2 makefile for libiconv 2021-12-08 23:51:56 +03:00
Ozkan Sezer
b6d40b29a9 minor update to os2 makefile. 2021-12-08 21:15:24 +03:00
Ozkan Sezer
8d14e6ea44 replaced use of _MAX_PATH with CCHMAXPATH in os/2 code,
it now compiles without HAVE_LIBC
2021-12-08 14:01:02 +03:00
Sylvain
1940d289bf SW Renderer: fix invalid read if VSYNC hint is initially set with an empty value (eg "")
because:
- GeHint return a value pointer.
- SetHint free internally the pointer
- The -now invalid- pointer is re-read

==9363== Invalid read of size 1
==9363==    at 0x4946860: SW_CreateRenderer (SDL_render_sw.c:1044)
==9363==    by 0x48F0EC3: SDL_CreateRenderer_REAL (SDL_render.c:938)
==9363==    by 0x48C5921: SDL_CreateRenderer (SDL_dynapi_procs.h:332)
==9363==    by 0x401584: main (main.c:421)
==9363==  Address 0x9c24040 is 0 bytes inside a block of size 1 free'd
==9363==    at 0x484621F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==9363==    by 0x494E403: SDL_free_REAL (SDL_malloc.c:5432)
==9363==    by 0x48A6153: SDL_SetHintWithPriority_REAL (SDL_hints.c:76)
==9363==    by 0x48A6254: SDL_SetHint_REAL (SDL_hints.c:101)
2021-12-08 09:41:33 +01:00
Ozkan Sezer
9409642e08 fix some warnings from vita builds (missing includes)
also some tidy-up to whitespace.
2021-12-07 21:24:24 +03:00
stdgregwar
21d46b7e0c PSP renderer fixed 2021-12-07 20:55:04 +03:00
Sergio Padrino
6f6382f8d0 Fix SDL_GameController API for PSP (#3)
- Add missing mapping
- Make sure the only window has the keyboard focus (so no `SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS` is needed)
2021-12-07 09:04:05 -08:00
Cameron Gutman
da0f76de6d cocoa: Don't round scroll deltas from trackpads
Rounding the scroll deltas from trackpads causes jerky scrolling behavior
by artificially amplifying the effects of very small scroll movements.

We should only round events from devices with discrete scroll wheels,
because we know the smallest unit of movement there is a single tick.
2021-12-07 09:02:35 -08:00
Ozkan Sezer
8cee50eea5 removed stdlib.h from SDL_psp_main.c now that exit() is gone. 2021-12-07 19:32:56 +03:00
Ozkan Sezer
4facca0bff made Makefile.psp to build libSDL2main.a 2021-12-07 19:32:56 +03:00
Ozkan Sezer
00014dc2ac fix some warnings from psp builds (missing includes.) 2021-12-07 18:47:10 +03:00
Wouter Wijsman
da5dbb4763 Fix SDL2main on PSP (#5076)
- Fix SDL2main on PSP
  SDL2main was not working for PSP, because it wasn't being activated and
  it wasn't unsetting the main. Besides that a debug screen being started
  was causing issues with joystick input and the sceKernelExitGame calli
  is no longer needed with the current PSPDEV SDK.
- Clean up imports in PSP main
- Set PSP GPU and user modes in main
- Fix exit callback in PSP main
2021-12-07 18:43:50 +03:00
Cameron Gutman
2d673e5b56 evdev: Add support for REL_WHEEL_HI_RES and REL_HWHEEL_HI_RES
If supported, these come alongside the regular REL_WHEEL and REL_HWHEEL
events so it's important that we only process one or the other.
2021-12-07 07:00:31 -08:00
Ozkan Sezer
493d45f00f minor tidy-up in cmake script. 2021-12-07 14:24:32 +03:00
Ozkan Sezer
f266d92286 psp/SDL_sysjoystick.c: fix -Wshadow warnings. 2021-12-07 14:04:32 +03:00
Ozkan Sezer
801dcbc5ef SDL_render_sw.c: fix -Wshadow warnings. 2021-12-07 14:04:10 +03:00
Wouter Wijsman
e17a3154ed Fix build issue 2021-12-07 14:03:00 +03:00
Wouter Wijsman
7266cf66c7 Clean up PSP render code to fit C standard used better 2021-12-07 14:03:00 +03:00
Wouter Wijsman
07608bf45f Fix ISO C90 violations in psp render code 2021-12-07 14:03:00 +03:00
Wouter Wijsman
897c7cfa8b Make sure SDL_VIDEO_RENDER_PSP is set 2021-12-07 14:03:00 +03:00
Wouter Wijsman
bfbdf8969e Add automated build for PSP 2021-12-07 14:03:00 +03:00
Wouter Wijsman
a79b642638 Make SDL2 able to build or PSP with cmake 2021-12-07 14:03:00 +03:00
Wouter Wijsman
21fd0047e3 Initial for building PSP version with CMake 2021-12-07 14:03:00 +03:00
Sylvain
d09f80ef18 SDL_DrawPointsF: fix error message typo 2021-12-07 11:31:57 +01:00
Sylvain
6dafc85017 SDL_DrawLines: minor simpification:
- scale is  1.0f, don't need to multiply
- typo in error message
- remap SDL_DrawLines to SDL_DrawLinesF
2021-12-07 10:44:12 +01:00
Sylvain
a0818a63e3 Fixed bug #5071 - Float conversion warnings in SDL_render.c (see also #5003) 2021-12-07 10:07:15 +01:00
Cameron Gutman
9ae56cb353 events: Add logging for SDL_MOUSEWHEEL preciseX/Y fields 2021-12-06 21:18:23 -06:00
Ozkan Sezer
03019c912a autotools, cmake: tighten Xfixes check && explicitly test BarrierEventID
Apparently the older versions of libXi doesn't have it.  Fixes the build
break issue reported at:
4b42c05ba1 (commitcomment-61427659)
2021-12-06 20:37:52 +03:00
David Gow
a709b5b602 video: wayland: Handle 0x0 xdg_toplevel_configure in fullscreen
The xdg_shell spec seems to state[1] that xdg_toplevel_configure events can
always provide a 0×0 width/height to signal that the compositor doesn't
care. SDL previously assumed the provided width/height was always valid
for fullscreen windows, and so applied it as-is.

This broke SDL applications on KDE/KWin 5.23, which now sends 0×0
configure events (and, in 5.23.3, 1×1 events for some reason), breaking
all SDL applications in fullscreen[2].

[1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/6
[2]: https://bugs.kde.org/show_bug.cgi?id=444962#c6
2021-12-06 09:09:37 -08:00
ALittleDruid
2f0edc2906 IAudioClient::SetEventHandle Parameter eventHandle Should not be NULL 2021-12-06 09:02:31 -08:00
Cameron Gutman
b7a0200aab Update 2.0.18 release notes with CMake prefix change 2021-12-03 09:35:47 -08:00
Ozkan Sezer
a887b8e28b SDL_test_common.c: replaced all printf() calls with SDL_Log()
Otherwise, if one builds libSDL2_test using a new mingw but builds
the test programs using an older mingw, a link failure happens:

/opt/local/x86_64-w64-mingw32/lib/libSDL2_test.a(SDL_test_common.o): In function `printf':
/opt/local/x86_64-w64-mingw32/include/stdio.h:372: undefined reference to `__imp___acrt_iob_func'
collect2: ld returned 1 exit status
2021-12-03 20:03:10 +03:00
Weng Xuetian
5056b29b0f Fix the wrong int size for fcitx capability. 2021-12-03 04:31:24 -08:00
Anders Jenbo
d68b429cfb [ios] Fix failing to link iconv when build using CMake 2021-12-03 04:30:53 -08:00
Ozkan Sezer
514f5858e4 autotools: disable static builds on os/2 2021-12-02 20:11:40 +03:00
Sylvain
e14d10263c Change viewport and cliprect to float version: from SDL_Rect to SDL_FRect 2021-12-02 10:01:50 +01:00
Sylvain
7828362da9 SDL_Renderer software, D3D11: don't use "renderer->viewport" in back-ends, but use the one from SETVIEWPORT cmd 2021-12-02 10:01:50 +01:00
Ozkan Sezer
a2b13e585c SDL_iconv_string: avoid memory leak if realloc() fails. 2021-12-02 02:28:24 +03:00
Ozkan Sezer
f14a8bfa4e fix whitespace. 2021-12-01 21:33:02 +03:00
Ozkan Sezer
b71bfdaafb SDL_iconv.c (encodings): mark "WCHAR_T" as ENCODING_UTF16LE for OS/2 too
whcar_t is unsigned short in os/2, like windows
2021-12-01 20:50:40 +03:00
Sam Lantinga
cbe97cbf7f Added a step necessary for running on a real device 2021-11-30 21:25:40 -08:00
Davis Mosenkovs
66b0a6ee15 workaround for libmali gbm_device_get_fd()
gbm_device_get_fd() in at least some libmali versions duplicates handle.
Other implementations do not do duplication. To prevent handle leak save
drm_fd in SDL_DisplayData.
2021-11-30 16:20:24 -08:00
Simon McVittie
0c7c4bfcf9 docs: Don't let Doxygen expand HOME environment variable
Otherwise, the API documentation will encode the home directory of the
user or autobuilder that built SDL, instead of telling the user to use
the literal string $(HOME) as intended.

See also <https://github.com/doxygen/doxygen/issues/7073>.

Signed-off-by: Simon McVittie <smcv@debian.org>
2021-12-01 02:37:40 +03:00
Ozkan Sezer
339f0d4097 configure.ac: adjust os2 section for system iconv() use. 2021-12-01 02:32:10 +03:00
Ozkan Sezer
563ef2aeb2 regenerated configure scripts. 2021-12-01 01:56:50 +03:00
Ozkan Sezer
efa1aa9a8f initial attempt at adding os2 support to autotools 2021-12-01 01:55:56 +03:00
Ozkan Sezer
3355464079 libtool upgrade to 2.4.6 - 18/n: SDL customizations
removed os/2 versioning support.
2021-12-01 01:55:40 +03:00
Ozkan Sezer
5ae2f0fd19 libtool upgrade to 2.4.6 - 17/n: SDL customizations
fixes Windows linkage and the DLL name convention.
2021-12-01 01:55:32 +03:00
Ozkan Sezer
6a5aeaf948 libtool upgrade to 2.4.6 - 16/n: Fedora ABI-specific directories patch:
https://src.fedoraproject.org/rpms/libtool/blob/master/f/libtool-2.4.5-rpath.patch
2021-12-01 01:51:24 +03:00
Ozkan Sezer
792d7c9f6d libtool upgrade to 2.4.6 - 15/n: -Xassembler and -Wa,* support :
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commitdiff;h=86d71e869d998fb09bee543a2aaef7beb6d6f591
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commitdiff;h=1b74d78401d7e09d5c31f4d479109d9b52984a32
2021-12-01 01:50:10 +03:00
Ozkan Sezer
8c44e0e0f8 libtool upgrade to 2.4.6 - 14/n: support for MidnightBSD
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commitdiff;h=5df7dd49d5e68ea45118a0687ef2d4dd00399f1e
2021-12-01 01:50:10 +03:00
Ozkan Sezer
a6df1f7be1 libtool upgrade to 2.4.6 - 13/n: add mingw to systems not needing libm.
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=46559
2021-12-01 01:50:10 +03:00
Ozkan Sezer
897efe1837 libtool upgrade to 2.4.6 - 12/n: fix preloading symbols on Solaris 11.3
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22373
2021-12-01 01:50:10 +03:00
Ozkan Sezer
b5dc1eedb8 libtool upgrade to 2.4.6 - 11/n: FreeBSD elftoolchain strip support
http://savannah.gnu.org/patch/?8675
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commitdiff;h=d7c8d3b43fef8641f4354edaa0429d157259bf56
2021-12-01 01:50:10 +03:00
Ozkan Sezer
3cbd561690 libtool upgrade to 2.4.6 - 10/n: export AIX TLS symbols fix
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commitdiff_plain;h=d15b321427c8b7dca0347ac56525cb64bde07ddc
2021-12-01 01:50:10 +03:00
Ozkan Sezer
27666089b9 libtool upgrade to 2.4.6 - 9/n: fix func_fatal_error function name typo
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commitdiff;h=350082b6aa89f9ef603fcebbb4cf33f15a743f2f
2021-12-01 01:50:10 +03:00
Ozkan Sezer
4be6ab2692 libtool upgrade to 2.4.6 - 8/n: set file_list_spec to '@' on OS/2
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commitdiff;h=a938703c462bd2ba0e520808d45186020ea600be
2021-12-01 01:50:10 +03:00
Ozkan Sezer
83a22d059c libtool upgrade to 2.4.6 - 7/n: fix an os/2 typo
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=38305
2021-12-01 01:50:10 +03:00
Ozkan Sezer
e8881b0d3e libtool upgrade to 2.4.6 - 6/n: fix typo introduced in libtool-2.4.3
i.e. wrong -L/-R detection. see:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21137 | 22895 | 31900 | 36762
2021-12-01 01:50:10 +03:00
Ozkan Sezer
8b13673c19 libtool upgrade to 2.4.6 - 5/n: fix linker error for powerpc64le
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23348
2021-12-01 01:50:10 +03:00
Ozkan Sezer
8e62063811 libtool upgrade to 2.4.6 - 4/n: fix m4 quoting bug
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=41837
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commitdiff;h=0904164dd5b57b3230dce04207738ce961591762
2021-12-01 01:50:10 +03:00
Ozkan Sezer
df40268254 libtool upgrade to 2.4.6 - 3/n: fixes for gcc/clang linkage
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commitdiff;h=702a97fbb09bd7088a50f2b239016d1e32843c24
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commitdiff;h=a5c6466528c060cc4660ad0319c00740db0e42ba
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commitdiff;h=f9970d99293faf908fdc153a653fa5781095fb7a
2021-12-01 01:50:10 +03:00
Ozkan Sezer
647514a5d0 libtool upgrade to 2.4.6 - 2/n: support macOS 11
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commitdiff;h=9e8c882517082fe5755f2524d23efb02f1522490
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commitdiff;h=8f4bdbda0a0c85cf6375a4c7546b83eb3fb596d3
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44605
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44684
2021-12-01 01:50:10 +03:00
Ozkan Sezer
c8ddccdef4 libtool upgrade to 2.4.6 - 1/n 2021-12-01 01:50:02 +03:00
Ozkan Sezer
662ea5abe4 minor correction after previous patch and minor tidy-up. 2021-12-01 01:40:24 +03:00
Ozkan Sezer
70c5e91d0f os/2 optionally builds against libiconv. 2021-12-01 01:20:10 +03:00
Ozkan Sezer
b20484e803 minor os/2 reorganization for iconv 2021-12-01 01:20:02 +03:00
Sam Lantinga
8c91cf7dba Always create a full 256-entry map in case color values are out of range
Fixes https://github.com/libsdl-org/SDL/issues/5042
2021-11-30 12:37:39 -08:00
Sam Lantinga
056c09942d Updated iOS build instructions 2021-11-30 12:19:26 -08:00
Sam Lantinga
a4c04ad230 Fixed building with iOS SDK prior to 13.0
Fixes https://github.com/libsdl-org/SDL/pull/5045
2021-11-30 10:32:39 -08:00
Sam Lantinga
8589134f16 Fixed potential buffer overflow in YUV conversion
Fixes https://github.com/libsdl-org/SDL/issues/5043
2021-11-30 10:23:21 -08:00
Ozkan Sezer
09465a9083 hidapi, windows: replace a strncpy() with plain memcpy()
mainstream has a similar change, already.
2021-11-30 21:10:10 +03:00
Sam Lantinga
5fc901d4f3 Updated to version 2.0.19 for development 2021-11-30 09:58:21 -08:00
1092 changed files with 23681 additions and 14993 deletions

View File

@@ -15,11 +15,6 @@ jobs:
fail-fast: false
matrix:
platform:
- { name: Windows (x64), os: windows-latest, shell: pwsh, flags: -A x64 }
- { name: Windows (x86), os: windows-latest, shell: pwsh, flags: -A Win32 }
- { name: Windows (clang-cl x64), os: windows-latest, shell: pwsh, flags: -T ClangCL -A x64 }
- { name: Windows (clang-cl x86), os: windows-latest, shell: pwsh, flags: -T ClangCL -A Win32 }
- { name: Windows (ARM64), os: windows-latest, shell: pwsh, flags: -A ARM64 }
- { name: Windows (mingw32), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686 }
- { name: Windows (mingw64), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64 }
- { name: Linux, os: ubuntu-20.04, shell: sh, flags: -GNinja }
@@ -84,5 +79,5 @@ jobs:
- name: Configure CMake
run: cmake -B build -DSDL_TEST=ON ${{ matrix.platform.flags }}
- name: Build
run: cmake --build build/
run: cmake --build build/ --config Release

33
.github/workflows/msvc.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Build (MSVC)
on: [push, pull_request]
jobs:
Build:
name: ${{ matrix.platform.name }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
platform:
- { name: Windows (x64), flags: -A x64, project: VisualC/SDL.sln, projectflags: '/p:Platform=x64' }
- { name: Windows (x86), flags: -A Win32, project: VisualC/SDL.sln, projectflags: '/p:Platform=Win32' }
- { name: Windows (clang-cl x64), flags: -T ClangCL -A x64 }
- { name: Windows (clang-cl x86), flags: -T ClangCL -A Win32 }
- { name: Windows (ARM64), flags: -A ARM64 }
- { name: UWP (x64), flags: -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0" -DSDL_TEST=OFF, project: VisualC-WinRT/SDL-UWP.sln, projectflags: '/p:Platform=x64 /p:WindowsTargetPlatformVersion=10.0.17763.0' }
steps:
- uses: actions/checkout@v2
- name: Configure CMake
run: cmake -B build -DSDL_TEST=ON ${{ matrix.platform.flags }}
- name: Build CMake
run: cmake --build build/ --config Release --parallel
- name: Add msbuild to PATH
if: ${{ matrix.platform.project != '' }}
uses: microsoft/setup-msbuild@v1.0.2
- name: Build msbuild
if: ${{ matrix.platform.project != '' }}
run: msbuild ${{ matrix.platform.project }} /m /p:BuildInParallel=true /p:Configuration=Release ${{ matrix.platform.projectflags }}

22
.github/workflows/os2.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
name: Build (OS/2)
on: [push, pull_request]
jobs:
os2:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: open-watcom/setup-watcom@v0
- name: Build SDL2
run: |
wmake -f Makefile.os2
- name: Build tests
run: |
cd test && wmake -f Makefile.os2
cd ..
- name: distclean
run: |
wmake -f Makefile.os2 distclean
cd test && wmake -f Makefile.os2 distclean
cd ..

18
.github/workflows/psp.yaml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: Build (Sony Playstation Portable)
on: [push, pull_request]
jobs:
psp:
runs-on: ubuntu-latest
container: pspdev/pspdev:latest
steps:
- uses: actions/checkout@v2
- name: Setup dependencies
run: |
apk update
apk add cmake gmp mpc1 mpfr4 make
- name: Configure CMake
run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake -DSDL_TEST=ON
- name: Build
run: cmake --build build

File diff suppressed because it is too large Load Diff

View File

@@ -8,10 +8,10 @@ To compile and install SDL:
* Read the FAQ at https://wiki.libsdl.org/FAQWindows
* Run './configure; make; make install'
Mac OS X with Xcode:
macOS with Xcode:
* Read docs/README-macosx.md
Mac OS X from the command line:
macOS from the command line:
* Run './configure; make; make install'
Linux and other UNIX systems:

View File

@@ -1,4 +1,4 @@
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

View File

@@ -19,6 +19,7 @@ distfile = $(distdir).tar.gz
@SET_MAKE@
SHELL = @SHELL@
CC = @CC@
CXX = @CXX@
INCLUDE = @INCLUDE@
CFLAGS = @BUILD_CFLAGS@
EXTRA_CFLAGS = @EXTRA_CFLAGS@
@@ -49,7 +50,7 @@ WAYLAND_SCANNER_CODE_MODE = @WAYLAND_SCANNER_CODE_MODE@
INSTALL_SDL2_CONFIG = @INSTALL_SDL2_CONFIG@
SRC_DIST = *.md *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac debian docs include Makefile.* sdl2-config.cmake.in sdl2-config-version.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake src test VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
SRC_DIST = *.md *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac docs include Makefile.* sdl2-config.cmake.in sdl2-config-version.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake src test VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
GEN_DIST = SDL2.spec
ifneq ($V,1)

View File

@@ -1,10 +1,22 @@
# Open Watcom makefile to build SDL2.dll for OS/2
# wmake -f Makefile.os2
#
# If you have GNU libiconv installed (iconv2.dll), you
# can compile against it by specifying LIBICONV=1, e.g.:
# wmake -f Makefile.os2 LIBICONV=1
#
# If you have libusb-1.0 installed (usb100.dll, libusb.h), you
# can compile hidapi joystick support against it (experimental)
# by specifying HIDAPI=1, e.g.:
# wmake -f Makefile.os2 HIDAPI=1
LIBNAME = SDL2
VERSION = 2.0.18
VERSION = 2.0.22
DESCRIPTION = Simple DirectMedia Layer 2
LIBICONV=0
ICONVLIB=$(LIBICONV_LIB)
LIBHOME = .
DLLFILE = $(LIBHOME)/$(LIBNAME).dll
LIBFILE = $(LIBHOME)/$(LIBNAME).lib
@@ -12,34 +24,43 @@ LNKFILE = $(LIBNAME).lnk
INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h"
INCPATH+= -Iinclude
INCPATH+= -I"src/core/os2" -I"src/core/os2/geniconv"
LIBM = libm.lib
LIBS = mmpm2.lib libuls.lib libconv.lib $(LIBM)
CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
# max warnings:
CFLAGS+= -wx
# newer OpenWatcom versions enable W303 by default
CFLAGS+= -wcd=303
# building dll:
CFLAGS+= -bd
# the include paths :
CFLAGS+= $(INCPATH)
# building SDL itself (for DECLSPEC):
CFLAGS+= -DBUILD_SDL
LIBM = SDL2libm.lib
TLIB = SDL2test.lib
LIBS = mmpm2.lib $(LIBM)
CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oeatxhn -ei
# Debug options:
# - debug messages from OS/2 related code to stdout:
#CFLAGS+= -DOS2DEBUG
# - debug messages from OS/2 code via SDL_LogDebug():
#CFLAGS+= -DOS2DEBUG=2
MSRCS= e_atan2.c e_exp.c e_fmod.c e_log10.c e_log.c e_pow.c e_rem_pio2.c e_sqrt.c &
k_cos.c k_rem_pio2.c k_sin.c k_tan.c &
s_atan.c s_copysign.c s_cos.c s_fabs.c s_floor.c s_scalbn.c s_sin.c s_tan.c
# max warnings:
CFLAGS+= -wx
# newer OpenWatcom versions enable W303 by default
CFLAGS+= -wcd=303
# the include paths :
CFLAGS+= $(INCPATH)
CFLAGS_STATIC=$(CFLAGS)
# building dll:
CFLAGS_DLL =$(CFLAGS)
CFLAGS_DLL+= -bd
# iconv:
LIBICONV_LIB=iconv2.lib
!ifeq LIBICONV 1
CFLAGS_DLL+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1
LIBS+= $(ICONVLIB)
!else
LIBS+= libuls.lib libconv.lib
!endif
# hidapi (libusb):
!ifeq HIDAPI 1
CFLAGS_DLL+= -DHAVE_LIBUSB_H=1
!endif
# building SDL itself (for DECLSPEC):
CFLAGS_DLL+= -DBUILD_SDL
SRCS = SDL.c SDL_assert.c SDL_error.c SDL_log.c SDL_dataqueue.c SDL_hints.c
SRCS = SDL.c SDL_assert.c SDL_error.c SDL_log.c SDL_dataqueue.c SDL_hints.c SDL_list.c
SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c SDL_strtokr.c SDL_crc32.c
SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.c
SRCS+= SDL_rwops.c SDL_power.c
@@ -68,7 +89,10 @@ SRCS+= SDL_dummysensor.c
SRCS+= SDL_locale.c SDL_syslocale.c
SRCS+= SDL_url.c SDL_sysurl.c
SRCS+= SDL_os2.c geniconv.c os2cp.c os2iconv.c sys2utf8.c
SRCS+= SDL_os2.c
!ifeq LIBICONV 0
SRCS+= geniconv.c os2cp.c os2iconv.c sys2utf8.c
!endif
SRCS+= SDL_os2audio.c
SRCS+= SDL_os2video.c SDL_os2util.c SDL_os2dive.c SDL_os2vman.c &
SDL_os2mouse.c SDL_os2messagebox.c
@@ -76,19 +100,22 @@ SRCS+= SDL_os2video.c SDL_os2util.c SDL_os2dive.c SDL_os2vman.c &
SRCS+= SDL_dynapi.c
OBJS = $(SRCS:.c=.obj)
MOBJS= $(MSRCS:.c=.obj)
.extensions:
.extensions: .lib .dll .obj .c .asm
.c: ./src;./src/dynapi;./src/audio;./src/cpuinfo;./src/events;./src/file;./src/haptic;./src/joystick;./src/power;./src/render;./src/render/software;./src/sensor;./src/stdlib;./src/thread;./src/timer;./src/video;./src/video/yuv2rgb;./src/atomic;./src/audio/disk;
.c: ./src/haptic/dummy;./src/joystick/dummy;./src/joystick/virtual;./src/audio/dummy;./src/video/dummy;./src/sensor/dummy;
.c: ./src/core/os2;./src/core/os2/geniconv;./src/audio/os2;./src/loadso/os2;./src/filesystem/os2;./src/joystick/os2;./src/thread/os2;./src/timer/os2;./src/video/os2;
.c: ./src/core/os2;./src/audio/os2;./src/loadso/os2;./src/filesystem/os2;./src/joystick/os2;./src/thread/os2;./src/timer/os2;./src/video/os2;
.c: ./src/core/os2/geniconv;
.c: ./src/locale/;./src/locale/unix;./src/misc;./src/misc/dummy;./src/joystick/hidapi;./src/hidapi
all: $(DLLFILE) $(LIBFILE) .symbolic
all: $(DLLFILE) $(LIBFILE) $(TLIB) .symbolic
$(DLLFILE): $(OBJS) $(LIBM) $(LNKFILE)
build_dll: .symbolic
@echo * Compiling dll objects
$(DLLFILE): build_dll $(OBJS) $(LIBM) $(LIBICONV_LIB) $(LNKFILE)
@echo * Linking: $@
wlink @$(LNKFILE)
@@ -97,40 +124,134 @@ $(LIBFILE): $(DLLFILE)
wlib -q -b -n -c -pa -s -t -zld -ii -io $* $(DLLFILE)
.c.obj:
wcc386 $(CFLAGS) -fo=$^@ $<
wcc386 $(CFLAGS_DLL) -fo=$^@ $<
SDL_syscond.obj: "src/thread/generic/SDL_syscond.c"
wcc386 $(CFLAGS) -fo=$^@ $<
wcc386 $(CFLAGS_DLL) -fo=$^@ $<
SDL_cpuinfo.obj: SDL_cpuinfo.c
wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
SDL_rwops.obj: SDL_rwops.c
wcc386 $(CFLAGS) -wcd=136 -fo=$^@ $<
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
SDL_wave.obj: SDL_wave.c
wcc386 $(CFLAGS) -wcd=124 -fo=$^@ $<
wcc386 $(CFLAGS_DLL) -wcd=124 -fo=$^@ $<
SDL_blendfillrect.obj: SDL_blendfillrect.c
wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
SDL_blendline.obj: SDL_blendline.c
wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
SDL_blendpoint.obj: SDL_blendpoint.c
wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
SDL_RLEaccel.obj: SDL_RLEaccel.c
wcc386 $(CFLAGS) -wcd=201 -fo=$^@ $<
wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
!ifeq HIDAPI 1
# c99 mode needed because of structs with flexible array members in libusb.h
SDL_hidapi.obj: SDL_hidapi.c
wcc386 $(CFLAGS) -za99 -fo=$^@ $<
wcc386 $(CFLAGS_DLL) -za99 -fo=$^@ $<
!endif
$(LIBICONV_LIB): "src/core/os2/iconv2.lbc"
@echo * Creating: $@
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ @$<
# SDL2libm
MSRCS= e_atan2.c e_exp.c e_fmod.c e_log10.c e_log.c e_pow.c e_rem_pio2.c e_sqrt.c &
k_cos.c k_rem_pio2.c k_sin.c k_tan.c &
s_atan.c s_copysign.c s_cos.c s_fabs.c s_floor.c s_scalbn.c s_sin.c s_tan.c
MOBJS= $(MSRCS:.c=.obj)
.c: ./src/libm;
$(LIBM): $(MOBJS)
e_atan2.obj: e_atan2.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
e_exp.obj: e_exp.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
e_fmod.obj: e_fmod.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
e_log10.obj: e_log10.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
e_log.obj: e_log.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
e_pow.obj: e_pow.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
e_rem_pio2.obj: e_rem_pio2.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
e_sqrt.obj: e_sqrt.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
k_cos.obj: k_cos.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
k_rem_pio2.obj: k_rem_pio2.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
k_sin.obj: k_sin.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
k_tan.obj: k_tan.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_atan.obj: s_atan.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_copysign.obj: s_copysign.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_cos.obj: s_cos.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_fabs.obj: s_fabs.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_floor.obj: s_floor.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_scalbn.obj: s_scalbn.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_sin.obj: s_sin.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_tan.obj: s_tan.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
build_libm: .symbolic
@echo * Compiling libm objects
$(LIBM): build_libm $(MOBJS)
@echo * Creating: $@
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(MOBJS)
# SDL2test
TSRCS = SDL_test_assert.c SDL_test_common.c SDL_test_compare.c &
SDL_test_crc32.c SDL_test_font.c SDL_test_fuzzer.c SDL_test_harness.c &
SDL_test_imageBlit.c SDL_test_imageBlitBlend.c SDL_test_imageFace.c &
SDL_test_imagePrimitives.c SDL_test_imagePrimitivesBlend.c &
SDL_test_log.c SDL_test_md5.c SDL_test_random.c SDL_test_memory.c
TOBJS= $(TSRCS:.c=.obj)
.c: ./src/test;
SDL_test_assert.obj: SDL_test_assert.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_common.obj: SDL_test_common.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_compare.obj: SDL_test_compare.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_crc32.obj: SDL_test_crc32.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_font.obj: SDL_test_font.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_fuzzer.obj: SDL_test_fuzzer.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_harness.obj: SDL_test_harness.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_imageBlit.obj: SDL_test_imageBlit.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_imageBlitBlend.obj: SDL_test_imageBlitBlend.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_imageFace.obj: SDL_test_imageFace.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_imagePrimitives.obj: SDL_test_imagePrimitives.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_imagePrimitivesBlend.obj: SDL_test_imagePrimitivesBlend.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_log.obj: SDL_test_log.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_md5.obj: SDL_test_md5.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_random.obj: SDL_test_random.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_memory.obj: SDL_test_memory.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
build_tlib: .symbolic
@echo * Compiling testlib objects
$(TLIB): build_tlib $(TOBJS)
@echo * Creating: $@
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(TOBJS)
$(LNKFILE):
@echo * Creating linker file: $@
@%create $@
@@ -153,9 +274,11 @@ clean: .SYMBOLIC
@if exist *.err rm *.err
@if exist $(LNKFILE) rm $(LNKFILE)
@if exist $(LIBM) rm $(LIBM)
@if exist $(LIBICONV_LIB) rm $(LIBICONV_LIB)
distclean: .SYMBOLIC clean
@if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp
@if exist $(LIBHOME)/*.map rm $(LIBHOME)/*.map
@if exist $(LIBFILE) rm $(LIBFILE)
@if exist $(DLLFILE) rm $(DLLFILE)
@if exist $(TLIB) rm $(TLIB)

View File

@@ -1,107 +0,0 @@
TARGET_LIB = libSDL2.a
OBJS= src/SDL.o \
src/SDL_assert.o \
src/SDL_dataqueue.o \
src/SDL_error.o \
src/SDL_hints.o \
src/SDL_log.o \
src/atomic/SDL_atomic.o \
src/atomic/SDL_spinlock.o \
src/audio/SDL_audio.o \
src/audio/SDL_audiocvt.o \
src/audio/SDL_audiodev.o \
src/audio/SDL_audiotypecvt.o \
src/audio/SDL_mixer.o \
src/audio/SDL_wave.o \
src/audio/psp/SDL_pspaudio.o \
src/cpuinfo/SDL_cpuinfo.o \
src/events/SDL_clipboardevents.o \
src/events/SDL_displayevents.o \
src/events/SDL_dropevents.o \
src/events/SDL_events.o \
src/events/SDL_gesture.o \
src/events/SDL_keyboard.o \
src/events/SDL_mouse.o \
src/events/SDL_quit.o \
src/events/SDL_touch.o \
src/events/SDL_windowevents.o \
src/file/SDL_rwops.o \
src/haptic/SDL_haptic.o \
src/haptic/dummy/SDL_syshaptic.o \
src/hidapi/SDL_hidapi.o \
src/joystick/SDL_joystick.o \
src/joystick/SDL_gamecontroller.o \
src/joystick/psp/SDL_sysjoystick.o \
src/joystick/virtual/SDL_virtualjoystick.o \
src/power/SDL_power.o \
src/power/psp/SDL_syspower.o \
src/filesystem/dummy/SDL_sysfilesystem.o \
src/locale/SDL_locale.o \
src/locale/dummy/SDL_syslocale.o \
src/misc/SDL_url.o \
src/misc/dummy/SDL_sysurl.o \
src/render/SDL_render.o \
src/render/SDL_yuv_sw.o \
src/render/psp/SDL_render_psp.o \
src/render/software/SDL_blendfillrect.o \
src/render/software/SDL_blendline.o \
src/render/software/SDL_blendpoint.o \
src/render/software/SDL_drawline.o \
src/render/software/SDL_drawpoint.o \
src/render/software/SDL_render_sw.o \
src/render/software/SDL_rotate.o \
src/render/software/SDL_triangle.o \
src/sensor/SDL_sensor.o \
src/sensor/dummy/SDL_dummysensor.o \
src/stdlib/SDL_getenv.o \
src/stdlib/SDL_iconv.o \
src/stdlib/SDL_malloc.o \
src/stdlib/SDL_qsort.o \
src/stdlib/SDL_stdlib.o \
src/stdlib/SDL_string.o \
src/stdlib/SDL_strtokr.o \
src/thread/SDL_thread.o \
src/thread/generic/SDL_systls.o \
src/thread/psp/SDL_syssem.o \
src/thread/psp/SDL_systhread.o \
src/thread/psp/SDL_sysmutex.o \
src/thread/psp/SDL_syscond.o \
src/timer/SDL_timer.o \
src/timer/psp/SDL_systimer.o \
src/video/SDL_RLEaccel.o \
src/video/SDL_blit.o \
src/video/SDL_blit_0.o \
src/video/SDL_blit_1.o \
src/video/SDL_blit_A.o \
src/video/SDL_blit_N.o \
src/video/SDL_blit_auto.o \
src/video/SDL_blit_copy.o \
src/video/SDL_blit_slow.o \
src/video/SDL_bmp.o \
src/video/SDL_clipboard.o \
src/video/SDL_fillrect.o \
src/video/SDL_pixels.o \
src/video/SDL_rect.o \
src/video/SDL_stretch.o \
src/video/SDL_surface.o \
src/video/SDL_video.o \
src/video/SDL_yuv.o \
src/video/psp/SDL_pspevents.o \
src/video/psp/SDL_pspvideo.o \
src/video/psp/SDL_pspgl.o \
src/video/psp/SDL_pspmouse.o \
src/video/yuv2rgb/yuv_rgb.o
INCDIR = ./include
CFLAGS = -g -O2 -G0 -Wall -D__PSP__ -DHAVE_OPENGL
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LIBS = -lGL -lGLU -lglut -lz \
-lpspvfpu -lpsphprm -lpspsdk -lpspctrl -lpspumd -lpsprtc -lpsppower -lpspgum -lpspgu -lpspaudiolib -lpspaudio -lpsphttp -lpspssl -lpspwlan \
-lpspnet_adhocmatching -lpspnet_adhoc -lpspnet_adhocctl -lm -lpspvram
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak

View File

@@ -1,88 +0,0 @@
# Makefile to build the pandora SDL library
WIZSDK = /mythtv/media/devel/toolchains/openwiz/arm-openwiz-linux-gnu
AR = $(WIZSDK)/bin/arm-openwiz-linux-gnu-ar
RANLIB = $(WIZSDK)/bin/arm-openwiz-linux-gnu-ranlib
CC = $(WIZSDK)/bin/arm-openwiz-linux-gnu-gcc
CXX = $(WIZSDK)/bin/arm-openwiz-linux-gnu-g++
STRIP = $(WIZSDK)/bin/arm-openwiz-linux-gnu-strip
CFLAGS = -Wall -fPIC -I./include -I$(WIZSDK)/include -DWIZ_GLES_LITE
TARGET_STATIC = libSDL2.a
TARGET_SHARED = libSDL2.so
SOURCES = \
./src/*.c \
./src/atomic/*.c \
./src/audio/*.c \
./src/audio/disk/*.c \
./src/audio/dsp/*.c \
./src/audio/dummy/*.c \
./src/cpuinfo/*.c \
./src/events/*.c \
./src/file/*.c \
./src/filesystem/unix/*.c \
./src/haptic/*.c \
./src/haptic/linux/*.c \
./src/hidapi/*.c \
./src/joystick/*.c \
./src/joystick/linux/*.c \
./src/loadso/dlopen/*.c \
./src/locale/*.c \
./src/locale/unix/*.c \
./src/misc/*.c \
./src/misc/unix/*.c \
./src/power/*.c \
./src/sensor/*.c \
./src/sensor/dummy/*.c \
./src/stdlib/*.c \
./src/thread/*.c \
./src/thread/pthread/SDL_syscond.c \
./src/thread/pthread/SDL_sysmutex.c \
./src/thread/pthread/SDL_syssem.c \
./src/thread/pthread/SDL_systhread.c \
./src/timer/*.c \
./src/timer/unix/*.c \
./src/video/*.c \
./src/video/yuv2rgb/*.c \
./src/video/dummy/*.c \
./src/video/pandora/*.c
OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
all: config_copy $(TARGET_STATIC) $(TARGET_SHARED)
$(TARGET_STATIC): $(OBJECTS)
$(AR) crv $@ $^
$(RANLIB) $@
$(TARGET_SHARED):
$(CC) -shared -Wl,-soname,$(TARGET_SHARED).0 -o $(TARGET_SHARED).0.0.1 $(OBJECTS)
ln -s $(TARGET_SHARED).0.0.1 $(TARGET_SHARED).0
ln -s $(TARGET_SHARED).0 $(TARGET_SHARED)
config_copy:
cp include/SDL_config_wiz.h include/SDL_config.h
clean:
rm -f $(TARGET_STATIC) $(TARGET_SHARED)* $(OBJECTS)
install:
mkdir -p $(WIZSDK)/lib
mkdir -p $(WIZSDK)/include/SDL2
cp -f $(TARGET_STATIC) $(WIZSDK)/lib
cp -f $(TARGET_SHARED).0.0.1 $(WIZSDK)/lib
rm -f $(WIZSDK)/lib/$(TARGET_SHARED).0 $(WIZSDK)/lib/$(TARGET_SHARED)
ln -s $(WIZSDK)/lib/$(TARGET_SHARED).0.0.1 $(WIZSDK)/lib/$(TARGET_SHARED).0
ln -s $(WIZSDK)/lib/$(TARGET_SHARED).0 $(WIZSDK)/lib/$(TARGET_SHARED)
cp $(TARGET_STATIC) ../../toolchain/libs
cp $(TARGET_SHARED).0.0.1 ../../toolchain/libs
rm -f ../../toolchain/libs/$(TARGET_SHARED).0 ../../toolchain/libs/$(TARGET_SHARED)
ln -s ../../toolchain/libs/$(TARGET_SHARED).0.0.1 ../../toolchain/libs/$(TARGET_SHARED).0
ln -s ../../toolchain/libs/$(TARGET_SHARED).0 ../../toolchain/libs/$(TARGET_SHARED)
cp $(TARGET_SHARED).0.0.1 ../nehe_demos/build/$(TARGET_SHARED).0
cp -f include/*.h $(WIZSDK)/include/SDL2/
cp -f include/*.h ../../toolchain/include/SDL2/

View File

@@ -1,4 +1,12 @@
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake")
endif()
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2mainTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/SDL2mainTargets.cmake")
endif()
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2staticTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/SDL2staticTargets.cmake")
endif()
# on static-only builds create an alias
if(NOT TARGET SDL2::SDL2 AND TARGET SDL2::SDL2-static)

View File

@@ -144,6 +144,7 @@
<ClInclude Include="..\src\SDL_fatal.h" />
<ClInclude Include="..\src\SDL_hints_c.h" />
<ClInclude Include="..\src\SDL_internal.h" />
<ClInclude Include="..\src\SDL_list.h" />
<ClInclude Include="..\src\sensor\dummy\SDL_dummysensor.h" />
<ClInclude Include="..\src\sensor\SDL_sensor_c.h" />
<ClInclude Include="..\src\sensor\SDL_syssensor.h" />
@@ -295,6 +296,7 @@
<ClCompile Include="..\src\SDL.c" />
<ClCompile Include="..\src\SDL_assert.c" />
<ClCompile Include="..\src\SDL_dataqueue.c" />
<ClCompile Include="..\src\SDL_list.c" />
<ClCompile Include="..\src\SDL_error.c" />
<ClCompile Include="..\src\SDL_hints.c" />
<ClCompile Include="..\src\SDL_log.c" />
@@ -414,10 +416,10 @@
<AppContainerApplication>true</AppContainerApplication>
<ApplicationType>Windows Store</ApplicationType>
<ApplicationTypeRevision>8.2</ApplicationTypeRevision>
<TargetPlatformVersion>10.0.10069.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10069.0</TargetPlatformMinVersion>
<WindowsTargetPlatformVersion>10.0.10240.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.10240.0</WindowsTargetPlatformMinVersion>
<TargetPlatformVersion>10.0.16299.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.16299.0</WindowsTargetPlatformMinVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

View File

@@ -411,6 +411,9 @@
<ClInclude Include="..\src\SDL_dataqueue.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\SDL_list.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\src\haptic\windows\SDL_xinputhaptic_c.h">
<Filter>Source Files</Filter>
</ClInclude>
@@ -780,6 +783,9 @@
<ClCompile Include="..\src\SDL_dataqueue.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\SDL_list.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\haptic\windows\SDL_dinputhaptic.c">
<Filter>Source Files</Filter>
</ClCompile>

View File

@@ -369,6 +369,7 @@
<ClInclude Include="..\..\src\SDL_error_c.h" />
<ClInclude Include="..\..\src\SDL_hints_c.h" />
<ClInclude Include="..\..\src\SDL_internal.h" />
<ClInclude Include="..\..\src\SDL_list.h" />
<ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h" />
<ClInclude Include="..\..\src\sensor\SDL_sensor_c.h" />
<ClInclude Include="..\..\src\sensor\SDL_syssensor.h" />
@@ -543,6 +544,7 @@
<ClCompile Include="..\..\src\SDL.c" />
<ClCompile Include="..\..\src\SDL_assert.c" />
<ClCompile Include="..\..\src\SDL_dataqueue.c" />
<ClCompile Include="..\..\src\SDL_list.c" />
<ClCompile Include="..\..\src\SDL_error.c" />
<ClCompile Include="..\..\src\SDL_hints.c" />
<ClCompile Include="..\..\src\SDL_log.c" />

View File

@@ -401,6 +401,7 @@
</ClInclude>
<ClInclude Include="..\..\src\SDL_dataqueue.h" />
<ClInclude Include="..\..\src\SDL_error_c.h" />
<ClInclude Include="..\..\src\SDL_list.h" />
<ClInclude Include="..\..\include\SDL_metal.h">
<Filter>API Headers</Filter>
</ClInclude>
@@ -832,6 +833,7 @@
<ClCompile Include="..\..\src\SDL_dataqueue.c" />
<ClCompile Include="..\..\src\SDL_error.c" />
<ClCompile Include="..\..\src\SDL_hints.c" />
<ClCompile Include="..\..\src\SDL_list.c" />
<ClCompile Include="..\..\src\audio\SDL_audio.c">
<Filter>audio</Filter>
</ClCompile>

View File

@@ -22,28 +22,29 @@
<ProjectName>testquit</ProjectName>
<RootNamespace>testquit</RootNamespace>
<ProjectGuid>{1D12C737-7C71-45CE-AE2C-AAB47B690BC8}</ProjectGuid>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<PlatformToolset>v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<PlatformToolset>v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<PlatformToolset>v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -200,13 +201,13 @@
<ClCompile Include="..\..\..\..\visualtest\unittest\testquit.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\SDLmain\SDLmain_VS2012.vcxproj">
<ProjectReference Include="..\..\..\SDLmain\SDLmain.vcxproj">
<Project>{da956fd3-e142-46f2-9dd5-c78bebb56b7a}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\SDLtest\SDLtest_VS2012.vcxproj">
<ProjectReference Include="..\..\..\SDLtest\SDLtest.vcxproj">
<Project>{da956fd3-e143-46f2-9fe5-c77bebc56b1a}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\SDL\SDL_VS2012.vcxproj">
<ProjectReference Include="..\..\..\SDL\SDL.vcxproj">
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
</ProjectReference>
</ItemGroup>

View File

@@ -22,28 +22,29 @@
<ProjectName>visualtest</ProjectName>
<RootNamespace>visualtest</RootNamespace>
<ProjectGuid>{13DDF23A-4A8F-4AF9-9734-CC09D9157924}</ProjectGuid>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<PlatformToolset>v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<PlatformToolset>v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<PlatformToolset>v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -110,6 +111,7 @@
<Link>
<SuppressStartupBanner>true</SuppressStartupBanner>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)..\test\icon.bmp" "$(ProjectDir)icon.bmp"
@@ -152,6 +154,7 @@ copy /y "$(SolutionDir)..\visualtest\unittest\*.actions" "$(ProjectDir)"</Comman
<Link>
<SuppressStartupBanner>true</SuppressStartupBanner>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)..\test\icon.bmp" "$(ProjectDir)icon.bmp"
@@ -196,7 +199,7 @@ copy /y "$(SolutionDir)..\visualtest\unittest\*.actions" "$(ProjectDir)"</Comman
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<PostBuildEvent>
@@ -241,6 +244,7 @@ copy /y "$(SolutionDir)..\visualtest\unittest\*.actions" "$(ProjectDir)"</Comman
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)..\test\icon.bmp" "$(ProjectDir)icon.bmp"
@@ -288,13 +292,13 @@ copy /y "$(SolutionDir)..\visualtest\unittest\*.actions" "$(ProjectDir)"</Comman
<ClCompile Include="..\..\visualtest\src\windows\windows_screenshot.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SDLmain\SDLmain_VS2012.vcxproj">
<ProjectReference Include="..\SDLmain\SDLmain.vcxproj">
<Project>{da956fd3-e142-46f2-9dd5-c78bebb56b7a}</Project>
</ProjectReference>
<ProjectReference Include="..\SDLtest\SDLtest_VS2012.vcxproj">
<ProjectReference Include="..\SDLtest\SDLtest.vcxproj">
<Project>{da956fd3-e143-46f2-9fe5-c77bebc56b1a}</Project>
</ProjectReference>
<ProjectReference Include="..\SDL\SDL_VS2012.vcxproj">
<ProjectReference Include="..\SDL\SDL.vcxproj">
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
</ProjectReference>
</ItemGroup>

View File

@@ -1,6 +1,60 @@
This is a list of major changes in SDL's version history.
---------------------------------------------------------------------------
2.0.22:
---------------------------------------------------------------------------
General:
* Added SDL_RenderGetWindow() to get the window associated with a renderer
* Added floating point rectangle functions:
* SDL_PointInFRect()
* SDL_FRectEmpty()
* SDL_FRectEquals()
* SDL_FRectEqualsEpsilon()
* SDL_HasIntersectionF()
* SDL_IntersectFRect()
* SDL_UnionFRect()
* SDL_EncloseFPoints()
* SDL_IntersectFRectAndLine()
* Added SDL_IsTextInputShown() which returns whether the IME window is currently shown
* Added SDL_ClearComposition() to dismiss the composition window without disabling IME input
* Added SDL_TEXTEDITING_EXT event for handling long composition text, and a hint SDL_HINT_IME_SUPPORT_EXTENDED_TEXT to enable it
* Added the hint SDL_HINT_MOUSE_RELATIVE_MODE_CENTER to control whether the mouse should be constrained to the whole window or the center of the window when relative mode is enabled
* The mouse is now automatically captured when mouse buttons are pressed, and the hint SDL_HINT_MOUSE_AUTO_CAPTURE allows you to control this behavior
* Added the hint SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL to let SDL know that a foreign window will be used with OpenGL
* Added the hint SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN to let SDL know that a foreign window will be used with Vulkan
* Added the hint SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE to specify whether an SDL_QUIT event will be delivered when the last application window is closed
* Added the hint SDL_HINT_JOYSTICK_ROG_CHAKRAM to control whether ROG Chakram mice show up as joysticks
Windows:
* Added support for SDL_BLENDOPERATION_MINIMUM and SDL_BLENDOPERATION_MAXIMUM to the D3D9 renderer
Linux:
* Compiling with Wayland support requires libwayland-client version 1.18.0 or later
* Added the hint SDL_HINT_X11_WINDOW_TYPE to specify the _NET_WM_WINDOW_TYPE of SDL windows
* Added the hint SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR to allow using libdecor with compositors that support xdg-decoration
Android:
* Added SDL_AndroidSendMessage() to send a custom command to the SDL java activity
---------------------------------------------------------------------------
2.0.20:
---------------------------------------------------------------------------
General:
* SDL_RenderGeometryRaw() takes a pointer to SDL_Color, not int. You can cast color data in SDL_PIXELFORMAT_RGBA32 format (SDL_PIXELFORMAT_ABGR8888 on little endian systems) for this parameter.
* Improved accuracy of horizontal and vertical line drawing when using OpenGL or OpenGLES
* Added the hint SDL_HINT_RENDER_LINE_METHOD to control the method of line drawing used, to select speed, correctness, and compatibility.
Windows:
* Fixed size of custom cursors
Linux:
* Fixed hotplug controller detection, broken in 2.0.18
---------------------------------------------------------------------------
2.0.18:
---------------------------------------------------------------------------
@@ -8,6 +62,7 @@ This is a list of major changes in SDL's version history.
General:
* The SDL wiki documentation and development headers are automatically kept in sync
* Each function has information about in which version of SDL it was introduced
* SDL-specific CMake options are now prefixed with 'SDL_'. Be sure to update your CMake build scripts accordingly!
* Added the hint SDL_HINT_APP_NAME to let SDL know the name of your application for various places it might show up in system information
* Added SDL_RenderGeometry() and SDL_RenderGeometryRaw() to allow rendering of arbitrary shapes using the SDL 2D render API
* Added SDL_SetTextureUserData() and SDL_GetTextureUserData() to associate application data with an SDL texture

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string>Icon</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.${PRODUCT_NAME:identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<false/>
</dict>
</plist>

View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Description</key>
<string>This project builds an SDL based project for iPhone OS using C or Objective-C. It includes everything you need to get up and running with SDL on iPhone.</string>
<key>CFBundleIconFile</key>
<string>Icon.png</string>
</dict>
</plist>

View File

@@ -1,500 +0,0 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; };
28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; };
945C4F53195AF17F00DBBF61 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 945C4F52195AF17F00DBBF61 /* Default-568h@2x.png */; };
F3A497AC2555F0BD00E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497AB2555F0BD00E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
F3A497AD2555F0C000E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A4978F2555F07100E92A8B /* libSDL2.a */; };
F3A497B02555F0FF00E92A8B /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497AF2555F0FF00E92A8B /* Metal.framework */; };
F3A497B32555F11600E92A8B /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497B22555F11600E92A8B /* AVFoundation.framework */; };
FA8B4B97196703B400F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4B96196703B400F8EB7C /* CoreMotion.framework */; };
FAE0E9651BAF967F0098DFA4 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FAE0E9641BAF967F0098DFA4 /* GameController.framework */; };
FD779EDE0E26BA1200F39101 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FD779EDD0E26BA1200F39101 /* CoreAudio.framework */; };
FD77A07D0E26BD8C00F39101 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = FD77A07C0E26BD8C00F39101 /* Icon.png */; };
FD77A07F0E26BDA900F39101 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = FD77A07E0E26BDA900F39101 /* Default.png */; };
FD77A0850E26BDB800F39101 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FD77A0840E26BDB800F39101 /* AudioToolbox.framework */; };
FD77A09D0E26BDE500F39101 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A09C0E26BDE500F39101 /* main.c */; };
FDB8BFC60E5A0F6A00980157 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB8BFC50E5A0F6A00980157 /* CoreGraphics.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
F3A497862555F07100E92A8B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = BECDF66C0761BA81005FE872;
remoteInfo = Framework;
};
F3A497882555F07100E92A8B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = A7D88B5423E2437C00DCD162;
remoteInfo = "Framework-iOS";
};
F3A4978A2555F07100E92A8B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = A7D88D1523E24BED00DCD162;
remoteInfo = "Framework-tvOS";
};
F3A4978C2555F07100E92A8B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = BECDF6B30761BA81005FE872;
remoteInfo = "Static Library";
};
F3A4978E2555F07100E92A8B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = A7D88E5423E24D3B00DCD162;
remoteInfo = "Static Library-iOS";
};
F3A497902555F07100E92A8B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = A769B23D23E259AE00872273;
remoteInfo = "Static Library-tvOS";
};
F3A497922555F07100E92A8B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = DB31407717554B71006C0E22;
remoteInfo = "Shared Library";
};
F3A497942555F07100E92A8B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = A75FCEB323E25AB700529352;
remoteInfo = "Shared Library-iOS";
};
F3A497962555F07100E92A8B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = A75FD06C23E25AC700529352;
remoteInfo = "Shared Library-tvOS";
};
F3A497982555F07100E92A8B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = BECDF6BE0761BA81005FE872;
remoteInfo = "Standard DMG";
};
F3A4979A2555F07100E92A8B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = A75FDB8C23E4C74400529352;
remoteInfo = hidapi;
};
F3A4979C2555F07100E92A8B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = A75FDB4923E399AC00529352;
remoteInfo = "hidapi-iOS";
};
F3A4979E2555F07100E92A8B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = A75FDB6E23E3A2C900529352;
remoteInfo = "hidapi-tvOS";
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "___PROJECTNAME___.app"; sourceTree = BUILT_PRODUCTS_DIR; };
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
28FD14FF0DC6FC520079059D /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
28FD15070DC6FC5B0079059D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
944A65681957463F0094A81E /* SDL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL.xcodeproj; path = ../../../Xcode/SDL/SDL.xcodeproj; sourceTree = "<group>"; };
945C4F52195AF17F00DBBF61 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
F3A497AB2555F0BD00E92A8B /* CoreHaptics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreHaptics.framework; path = System/Library/Frameworks/CoreHaptics.framework; sourceTree = SDKROOT; };
F3A497AF2555F0FF00E92A8B /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
F3A497B22555F11600E92A8B /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
FA8B4B96196703B400F8EB7C /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
FAE0E9641BAF967F0098DFA4 /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = System/Library/Frameworks/GameController.framework; sourceTree = SDKROOT; };
FD779EDD0E26BA1200F39101 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
FD77A07C0E26BD8C00F39101 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = "<group>"; };
FD77A07E0E26BDA900F39101 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
FD77A0840E26BDB800F39101 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
FD77A09C0E26BDE500F39101 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = "<group>"; };
FDB8BFC50E5A0F6A00980157 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
1D60588F0D05DD3D006BFB54 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F3A497AD2555F0C000E92A8B /* libSDL2.a in Frameworks */,
FD77A0850E26BDB800F39101 /* AudioToolbox.framework in Frameworks */,
F3A497B32555F11600E92A8B /* AVFoundation.framework in Frameworks */,
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
FD779EDE0E26BA1200F39101 /* CoreAudio.framework in Frameworks */,
FDB8BFC60E5A0F6A00980157 /* CoreGraphics.framework in Frameworks */,
F3A497AC2555F0BD00E92A8B /* CoreHaptics.framework in Frameworks */,
FA8B4B97196703B400F8EB7C /* CoreMotion.framework in Frameworks */,
FAE0E9651BAF967F0098DFA4 /* GameController.framework in Frameworks */,
F3A497B02555F0FF00E92A8B /* Metal.framework in Frameworks */,
28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */,
28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */,
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
19C28FACFE9D520D11CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */,
);
name = Products;
sourceTree = "<group>";
};
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
isa = PBXGroup;
children = (
945C4F52195AF17F00DBBF61 /* Default-568h@2x.png */,
29B97315FDCFA39411CA2CEA /* Sources */,
29B97317FDCFA39411CA2CEA /* Resources */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
19C28FACFE9D520D11CA2CBB /* Products */,
);
name = CustomTemplate;
sourceTree = "<group>";
};
29B97315FDCFA39411CA2CEA /* Sources */ = {
isa = PBXGroup;
children = (
944A65681957463F0094A81E /* SDL.xcodeproj */,
FD77A09C0E26BDE500F39101 /* main.c */,
);
name = Sources;
sourceTree = "<group>";
};
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
FD77A07E0E26BDA900F39101 /* Default.png */,
FD77A07C0E26BD8C00F39101 /* Icon.png */,
8D1107310486CEB800E47090 /* Info.plist */,
);
name = Resources;
sourceTree = "<group>";
};
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
F3A497B22555F11600E92A8B /* AVFoundation.framework */,
F3A497AF2555F0FF00E92A8B /* Metal.framework */,
F3A497AB2555F0BD00E92A8B /* CoreHaptics.framework */,
FAE0E9641BAF967F0098DFA4 /* GameController.framework */,
FA8B4B96196703B400F8EB7C /* CoreMotion.framework */,
FDB8BFC50E5A0F6A00980157 /* CoreGraphics.framework */,
FD77A0840E26BDB800F39101 /* AudioToolbox.framework */,
FD779EDD0E26BA1200F39101 /* CoreAudio.framework */,
28FD15070DC6FC5B0079059D /* QuartzCore.framework */,
28FD14FF0DC6FC520079059D /* OpenGLES.framework */,
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
1D30AB110D05D00D00671497 /* Foundation.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
F3A497772555F07100E92A8B /* Products */ = {
isa = PBXGroup;
children = (
F3A497872555F07100E92A8B /* SDL2.framework */,
F3A497892555F07100E92A8B /* SDL2.framework */,
F3A4978B2555F07100E92A8B /* SDL2.framework */,
F3A4978D2555F07100E92A8B /* libSDL2.a */,
F3A4978F2555F07100E92A8B /* libSDL2.a */,
F3A497912555F07100E92A8B /* libSDL2.a */,
F3A497932555F07100E92A8B /* libSDL2.dylib */,
F3A497952555F07100E92A8B /* libSDL2.dylib */,
F3A497972555F07100E92A8B /* libSDL2.dylib */,
F3A497992555F07100E92A8B /* SDL2 */,
F3A4979B2555F07100E92A8B /* hidapi.framework */,
F3A4979D2555F07100E92A8B /* hidapi.framework */,
F3A4979F2555F07100E92A8B /* hidapi.framework */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
1D6058900D05DD3D006BFB54 /* ___PROJECTNAME___ */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */;
buildPhases = (
1D60588D0D05DD3D006BFB54 /* Resources */,
1D60588E0D05DD3D006BFB54 /* Sources */,
1D60588F0D05DD3D006BFB54 /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = "___PROJECTNAME___";
productName = "___PROJECTNAME___";
productReference = 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0510;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
Japanese,
French,
German,
);
mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = F3A497772555F07100E92A8B /* Products */;
ProjectRef = 944A65681957463F0094A81E /* SDL.xcodeproj */;
},
);
projectRoot = "";
targets = (
1D6058900D05DD3D006BFB54 /* ___PROJECTNAME___ */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
F3A497872555F07100E92A8B /* SDL2.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = SDL2.framework;
remoteRef = F3A497862555F07100E92A8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3A497892555F07100E92A8B /* SDL2.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = SDL2.framework;
remoteRef = F3A497882555F07100E92A8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3A4978B2555F07100E92A8B /* SDL2.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = SDL2.framework;
remoteRef = F3A4978A2555F07100E92A8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3A4978D2555F07100E92A8B /* libSDL2.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libSDL2.a;
remoteRef = F3A4978C2555F07100E92A8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3A4978F2555F07100E92A8B /* libSDL2.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libSDL2.a;
remoteRef = F3A4978E2555F07100E92A8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3A497912555F07100E92A8B /* libSDL2.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libSDL2.a;
remoteRef = F3A497902555F07100E92A8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3A497932555F07100E92A8B /* libSDL2.dylib */ = {
isa = PBXReferenceProxy;
fileType = "compiled.mach-o.dylib";
path = libSDL2.dylib;
remoteRef = F3A497922555F07100E92A8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3A497952555F07100E92A8B /* libSDL2.dylib */ = {
isa = PBXReferenceProxy;
fileType = "compiled.mach-o.dylib";
path = libSDL2.dylib;
remoteRef = F3A497942555F07100E92A8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3A497972555F07100E92A8B /* libSDL2.dylib */ = {
isa = PBXReferenceProxy;
fileType = "compiled.mach-o.dylib";
path = libSDL2.dylib;
remoteRef = F3A497962555F07100E92A8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3A497992555F07100E92A8B /* SDL2 */ = {
isa = PBXReferenceProxy;
fileType = "compiled.mach-o.executable";
path = SDL2;
remoteRef = F3A497982555F07100E92A8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3A4979B2555F07100E92A8B /* hidapi.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = hidapi.framework;
remoteRef = F3A4979A2555F07100E92A8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3A4979D2555F07100E92A8B /* hidapi.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = hidapi.framework;
remoteRef = F3A4979C2555F07100E92A8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3A4979F2555F07100E92A8B /* hidapi.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = hidapi.framework;
remoteRef = F3A4979E2555F07100E92A8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
1D60588D0D05DD3D006BFB54 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
FD77A07D0E26BD8C00F39101 /* Icon.png in Resources */,
FD77A07F0E26BDA900F39101 /* Default.png in Resources */,
945C4F53195AF17F00DBBF61 /* Default-568h@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
1D60588E0D05DD3D006BFB54 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
FD77A09D0E26BDE500F39101 /* main.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
1D6058940D05DD3E006BFB54 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "";
INFOPLIST_FILE = Info.plist;
LIBRARY_SEARCH_PATHS = "$(inherited)";
PRODUCT_NAME = "___PROJECTNAME___";
USER_HEADER_SEARCH_PATHS = ../../../include;
};
name = Debug;
};
1D6058950D05DD3E006BFB54 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "";
INFOPLIST_FILE = Info.plist;
LIBRARY_SEARCH_PATHS = "$(inherited)";
PRODUCT_NAME = "___PROJECTNAME___";
USER_HEADER_SEARCH_PATHS = ../../../include;
};
name = Release;
};
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "";
PREBINDING = NO;
SDKROOT = iphoneos;
};
name = Debug;
};
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_CFLAGS = "";
PREBINDING = NO;
SDKROOT = iphoneos;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1D6058940D05DD3E006BFB54 /* Debug */,
1D6058950D05DD3E006BFB54 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C01FCF4F08A954540054247B /* Debug */,
C01FCF5008A954540054247B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
}

View File

@@ -1,100 +0,0 @@
/*
* rectangles.c
* written by Holmes Futrell
* use however you want
*/
#include "SDL.h"
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define SCREEN_WIDTH 320
#define SCREEN_HEIGHT 480
int
randomInt(int min, int max)
{
return min + rand() % (max - min + 1);
}
void
render(SDL_Renderer *renderer)
{
SDL_Rect rect;
Uint8 r, g, b;
/* Clear the screen */
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
SDL_RenderClear(renderer);
/* Come up with a random rectangle */
rect.w = randomInt(64, 128);
rect.h = randomInt(64, 128);
rect.x = randomInt(0, SCREEN_WIDTH);
rect.y = randomInt(0, SCREEN_HEIGHT);
/* Come up with a random color */
r = randomInt(50, 255);
g = randomInt(50, 255);
b = randomInt(50, 255);
SDL_SetRenderDrawColor(renderer, r, g, b, 255);
/* Fill the rectangle in the color */
SDL_RenderFillRect(renderer, &rect);
/* update screen */
SDL_RenderPresent(renderer);
}
int
main(int argc, char *argv[])
{
SDL_Window *window;
SDL_Renderer *renderer;
int done;
SDL_Event event;
/* initialize SDL */
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
printf("Could not initialize SDL\n");
return 1;
}
/* seed random number generator */
srand(time(NULL));
/* create window and renderer */
window =
SDL_CreateWindow(NULL, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT,
SDL_WINDOW_OPENGL);
if (!window) {
printf("Could not initialize Window\n");
return 1;
}
renderer = SDL_CreateRenderer(window, -1, 0);
if (!renderer) {
printf("Could not create renderer\n");
return 1;
}
/* Enter render loop, waiting for user to quit */
done = 0;
while (!done) {
while (SDL_PollEvent(&event)) {
if (event.type == SDL_QUIT) {
done = 1;
}
}
render(renderer);
SDL_Delay(1);
}
/* shutdown SDL */
SDL_Quit();
return 0;
}

View File

@@ -19,10 +19,10 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.0.18</string>
<string>2.0.22</string>
<key>CFBundleSignature</key>
<string>SDLX</string>
<key>CFBundleVersion</key>
<string>2.0.18</string>
<string>2.0.22</string>
</dict>
</plist>

View File

@@ -111,6 +111,24 @@
A1626A582617008D003F1973 /* SDL_triangle.h in Headers */ = {isa = PBXBuildFile; fileRef = A1626A512617008C003F1973 /* SDL_triangle.h */; };
A1626A592617008D003F1973 /* SDL_triangle.h in Headers */ = {isa = PBXBuildFile; fileRef = A1626A512617008C003F1973 /* SDL_triangle.h */; };
A1626A5A2617008D003F1973 /* SDL_triangle.h in Headers */ = {isa = PBXBuildFile; fileRef = A1626A512617008C003F1973 /* SDL_triangle.h */; };
A1BB8B6327F6CF330057CFA8 /* SDL_list.c in Sources */ = {isa = PBXBuildFile; fileRef = A1BB8B6127F6CF320057CFA8 /* SDL_list.c */; };
A1BB8B6427F6CF330057CFA8 /* SDL_list.c in Sources */ = {isa = PBXBuildFile; fileRef = A1BB8B6127F6CF320057CFA8 /* SDL_list.c */; };
A1BB8B6527F6CF330057CFA8 /* SDL_list.c in Sources */ = {isa = PBXBuildFile; fileRef = A1BB8B6127F6CF320057CFA8 /* SDL_list.c */; };
A1BB8B6627F6CF330057CFA8 /* SDL_list.c in Sources */ = {isa = PBXBuildFile; fileRef = A1BB8B6127F6CF320057CFA8 /* SDL_list.c */; };
A1BB8B6727F6CF330057CFA8 /* SDL_list.c in Sources */ = {isa = PBXBuildFile; fileRef = A1BB8B6127F6CF320057CFA8 /* SDL_list.c */; };
A1BB8B6827F6CF330057CFA8 /* SDL_list.c in Sources */ = {isa = PBXBuildFile; fileRef = A1BB8B6127F6CF320057CFA8 /* SDL_list.c */; };
A1BB8B6927F6CF330057CFA8 /* SDL_list.c in Sources */ = {isa = PBXBuildFile; fileRef = A1BB8B6127F6CF320057CFA8 /* SDL_list.c */; };
A1BB8B6A27F6CF330057CFA8 /* SDL_list.c in Sources */ = {isa = PBXBuildFile; fileRef = A1BB8B6127F6CF320057CFA8 /* SDL_list.c */; };
A1BB8B6B27F6CF330057CFA8 /* SDL_list.c in Sources */ = {isa = PBXBuildFile; fileRef = A1BB8B6127F6CF320057CFA8 /* SDL_list.c */; };
A1BB8B6C27F6CF330057CFA8 /* SDL_list.h in Headers */ = {isa = PBXBuildFile; fileRef = A1BB8B6227F6CF330057CFA8 /* SDL_list.h */; };
A1BB8B6D27F6CF330057CFA8 /* SDL_list.h in Headers */ = {isa = PBXBuildFile; fileRef = A1BB8B6227F6CF330057CFA8 /* SDL_list.h */; };
A1BB8B6E27F6CF330057CFA8 /* SDL_list.h in Headers */ = {isa = PBXBuildFile; fileRef = A1BB8B6227F6CF330057CFA8 /* SDL_list.h */; };
A1BB8B6F27F6CF330057CFA8 /* SDL_list.h in Headers */ = {isa = PBXBuildFile; fileRef = A1BB8B6227F6CF330057CFA8 /* SDL_list.h */; };
A1BB8B7027F6CF330057CFA8 /* SDL_list.h in Headers */ = {isa = PBXBuildFile; fileRef = A1BB8B6227F6CF330057CFA8 /* SDL_list.h */; };
A1BB8B7127F6CF330057CFA8 /* SDL_list.h in Headers */ = {isa = PBXBuildFile; fileRef = A1BB8B6227F6CF330057CFA8 /* SDL_list.h */; };
A1BB8B7227F6CF330057CFA8 /* SDL_list.h in Headers */ = {isa = PBXBuildFile; fileRef = A1BB8B6227F6CF330057CFA8 /* SDL_list.h */; };
A1BB8B7327F6CF330057CFA8 /* SDL_list.h in Headers */ = {isa = PBXBuildFile; fileRef = A1BB8B6227F6CF330057CFA8 /* SDL_list.h */; };
A1BB8B7427F6CF330057CFA8 /* SDL_list.h in Headers */ = {isa = PBXBuildFile; fileRef = A1BB8B6227F6CF330057CFA8 /* SDL_list.h */; };
A7381E961D8B69D600B177DD /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7381E951D8B69D600B177DD /* CoreAudio.framework */; };
A7381E971D8B6A0300B177DD /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7381E931D8B69C300B177DD /* AudioToolbox.framework */; };
A75FCCFD23E25AB700529352 /* SDL_shaders_metal_tvos.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8E323E2514000DCD162 /* SDL_shaders_metal_tvos.h */; };
@@ -3493,8 +3511,6 @@
F3ADAB912576F0B400A6B1D9 /* SDL_sysurl.m in Sources */ = {isa = PBXBuildFile; fileRef = F3ADAB8D2576F0B300A6B1D9 /* SDL_sysurl.m */; };
F3ADAB922576F0B400A6B1D9 /* SDL_sysurl.m in Sources */ = {isa = PBXBuildFile; fileRef = F3ADAB8D2576F0B300A6B1D9 /* SDL_sysurl.m */; };
F3ADAB932576F0B400A6B1D9 /* SDL_sysurl.m in Sources */ = {isa = PBXBuildFile; fileRef = F3ADAB8D2576F0B300A6B1D9 /* SDL_sysurl.m */; };
F3CB963A26B5E10A00B9C980 /* SDL_uikit_main.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A5B023E2513D00DCD162 /* SDL_uikit_main.c */; };
F3CB963B26B5E14400B9C980 /* SDL_uikit_main.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A5B023E2513D00DCD162 /* SDL_uikit_main.c */; };
F3F07D5A269640160074468B /* SDL_hidapi_luna.c in Sources */ = {isa = PBXBuildFile; fileRef = F3F07D59269640160074468B /* SDL_hidapi_luna.c */; };
F3F07D5B269640160074468B /* SDL_hidapi_luna.c in Sources */ = {isa = PBXBuildFile; fileRef = F3F07D59269640160074468B /* SDL_hidapi_luna.c */; };
F3F07D5C269640160074468B /* SDL_hidapi_luna.c in Sources */ = {isa = PBXBuildFile; fileRef = F3F07D59269640160074468B /* SDL_hidapi_luna.c */; };
@@ -3576,6 +3592,8 @@
75E09159241EA924004729E1 /* SDL_virtualjoystick_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_virtualjoystick_c.h; sourceTree = "<group>"; };
A1626A3D2617006A003F1973 /* SDL_triangle.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_triangle.c; sourceTree = "<group>"; };
A1626A512617008C003F1973 /* SDL_triangle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_triangle.h; sourceTree = "<group>"; };
A1BB8B6127F6CF320057CFA8 /* SDL_list.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_list.c; sourceTree = "<group>"; };
A1BB8B6227F6CF330057CFA8 /* SDL_list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_list.h; sourceTree = "<group>"; };
A7381E931D8B69C300B177DD /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
A7381E951D8B69D600B177DD /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
A75FCEB323E25AB700529352 /* libSDL2.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libSDL2.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -4006,8 +4024,6 @@
F3984CCF25BCC92800374F43 /* SDL_hidapi_stadia.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_stadia.c; sourceTree = "<group>"; };
F3A4909D2554D38500E92A8B /* SDL_hidapi_ps5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_ps5.c; sourceTree = "<group>"; };
F3ADAB8D2576F0B300A6B1D9 /* SDL_sysurl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_sysurl.m; sourceTree = "<group>"; };
F3CB94BA26B5E0A400B9C980 /* libSDLmain.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDLmain.a; sourceTree = BUILT_PRODUCTS_DIR; };
F3CB963826B5E0A600B9C980 /* libSDLmain.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDLmain.a; sourceTree = BUILT_PRODUCTS_DIR; };
F3F07D59269640160074468B /* SDL_hidapi_luna.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_luna.c; sourceTree = "<group>"; };
F59C710300D5CB5801000001 /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ReadMe.txt; sourceTree = "<group>"; };
F59C710600D5CB5801000001 /* SDL.info */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SDL.info; sourceTree = "<group>"; };
@@ -4160,20 +4176,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
F3CB94B526B5E0A400B9C980 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
F3CB963326B5E0A600B9C980 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
@@ -4265,8 +4267,6 @@
A769B23D23E259AE00872273 /* libSDL2.a */,
A75FCEB323E25AB700529352 /* libSDL2.dylib */,
A75FD06C23E25AC700529352 /* libSDL2.dylib */,
F3CB94BA26B5E0A400B9C980 /* libSDLmain.a */,
F3CB963826B5E0A600B9C980 /* libSDLmain.a */,
);
name = Products;
sourceTree = "<group>";
@@ -4324,6 +4324,8 @@
A7D8A5AB23E2513D00DCD162 /* SDL_hints.c */,
A7D8A58323E2513D00DCD162 /* SDL_internal.h */,
A7D8A5DD23E2513D00DCD162 /* SDL_log.c */,
A1BB8B6127F6CF320057CFA8 /* SDL_list.c */,
A1BB8B6227F6CF330057CFA8 /* SDL_list.h */,
A7D8A57123E2513D00DCD162 /* SDL.c */,
);
name = "Library Source";
@@ -5304,6 +5306,7 @@
A75FCD4523E25AB700529352 /* SDL_gesture_c.h in Headers */,
A75FCD4623E25AB700529352 /* SDL_shaders_gl.h in Headers */,
A75FCD4723E25AB700529352 /* SDL_systhread_c.h in Headers */,
A1BB8B7327F6CF330057CFA8 /* SDL_list.h in Headers */,
A75FCD4823E25AB700529352 /* SDL_keycode.h in Headers */,
5616CA63252BB35F005D5928 /* SDL_sysurl.h in Headers */,
A75FCD4A23E25AB700529352 /* SDL_cocoakeyboard.h in Headers */,
@@ -5529,6 +5532,7 @@
A75FCEFE23E25AC700529352 /* SDL_gesture_c.h in Headers */,
A75FCEFF23E25AC700529352 /* SDL_shaders_gl.h in Headers */,
A75FCF0023E25AC700529352 /* SDL_systhread_c.h in Headers */,
A1BB8B7427F6CF330057CFA8 /* SDL_list.h in Headers */,
A75FCF0123E25AC700529352 /* SDL_keycode.h in Headers */,
5616CA66252BB361005D5928 /* SDL_sysurl.h in Headers */,
A75FCF0323E25AC700529352 /* SDL_cocoakeyboard.h in Headers */,
@@ -5727,6 +5731,7 @@
A769B0C623E259AE00872273 /* SDL_windowevents_c.h in Headers */,
A769B0C823E259AE00872273 /* SDL_cocoavideo.h in Headers */,
5605721C2473688D00B46B66 /* SDL_syslocale.h in Headers */,
A1BB8B7127F6CF330057CFA8 /* SDL_list.h in Headers */,
A769B0CA23E259AE00872273 /* SDL_uikitevents.h in Headers */,
A769B0CB23E259AE00872273 /* SDL_gesture_c.h in Headers */,
A769B0CC23E259AE00872273 /* SDL_shaders_gl.h in Headers */,
@@ -5975,6 +5980,7 @@
A7D8A98E23E2514000DCD162 /* SDL_sensor_c.h in Headers */,
A7D8BA7423E2514400DCD162 /* SDL_shaders_gl.h in Headers */,
A7D8BA5023E2514400DCD162 /* SDL_shaders_gles2.h in Headers */,
A1BB8B6D27F6CF330057CFA8 /* SDL_list.h in Headers */,
A7D8B98D23E2514400DCD162 /* SDL_shaders_metal_ios.h in Headers */,
A7D8B99C23E2514400DCD162 /* SDL_shaders_metal_osx.h in Headers */,
A7D8B9A223E2514400DCD162 /* SDL_shaders_metal_tvos.h in Headers */,
@@ -6205,6 +6211,7 @@
A7D8A98F23E2514000DCD162 /* SDL_sensor_c.h in Headers */,
A7D8BA7523E2514400DCD162 /* SDL_shaders_gl.h in Headers */,
A7D8BA5123E2514400DCD162 /* SDL_shaders_gles2.h in Headers */,
A1BB8B6E27F6CF330057CFA8 /* SDL_list.h in Headers */,
A7D8B98E23E2514400DCD162 /* SDL_shaders_metal_ios.h in Headers */,
A7D8B99D23E2514400DCD162 /* SDL_shaders_metal_osx.h in Headers */,
A7D8B9A323E2514400DCD162 /* SDL_shaders_metal_tvos.h in Headers */,
@@ -6352,6 +6359,7 @@
A7D8BBAF23E2514500DCD162 /* SDL_windowevents_c.h in Headers */,
A7D8AF0423E2514100DCD162 /* SDL_cocoavideo.h in Headers */,
5605721A2473688C00B46B66 /* SDL_syslocale.h in Headers */,
A1BB8B7027F6CF330057CFA8 /* SDL_list.h in Headers */,
A7D8ACC123E2514100DCD162 /* SDL_uikitevents.h in Headers */,
A7D8BB3D23E2514500DCD162 /* SDL_gesture_c.h in Headers */,
A7D8BA7723E2514400DCD162 /* SDL_shaders_gl.h in Headers */,
@@ -6600,6 +6608,7 @@
A7D8A98D23E2514000DCD162 /* SDL_sensor_c.h in Headers */,
A7D8BA7323E2514400DCD162 /* SDL_shaders_gl.h in Headers */,
A7D8BA4F23E2514400DCD162 /* SDL_shaders_gles2.h in Headers */,
A1BB8B6C27F6CF330057CFA8 /* SDL_list.h in Headers */,
A7D8B98C23E2514400DCD162 /* SDL_shaders_metal_ios.h in Headers */,
A7D8B99B23E2514400DCD162 /* SDL_shaders_metal_osx.h in Headers */,
A7D8B9A123E2514400DCD162 /* SDL_shaders_metal_tvos.h in Headers */,
@@ -6816,6 +6825,7 @@
A7D8B29F23E2514200DCD162 /* vulkan_xlib.h in Headers */,
A7D8B25D23E2514200DCD162 /* vulkan_vi.h in Headers */,
A7D8B29923E2514200DCD162 /* vulkan_mir.h in Headers */,
A1BB8B6F27F6CF330057CFA8 /* SDL_list.h in Headers */,
A7D8BB4E23E2514500DCD162 /* default_cursor.h in Headers */,
A7D8B9FE23E2514400DCD162 /* SDL_render_sw_c.h in Headers */,
A7D8BBED23E2574800DCD162 /* SDL_uikitappdelegate.h in Headers */,
@@ -6938,6 +6948,7 @@
A7D8BB3E23E2514500DCD162 /* SDL_gesture_c.h in Headers */,
A7D8BA7823E2514400DCD162 /* SDL_shaders_gl.h in Headers */,
A7D8B42D23E2514300DCD162 /* SDL_systhread_c.h in Headers */,
A1BB8B7227F6CF330057CFA8 /* SDL_list.h in Headers */,
DB313FDB17554B71006C0E22 /* SDL_keycode.h in Headers */,
A7D8AE9323E2514100DCD162 /* SDL_cocoakeyboard.h in Headers */,
A7D8ACE623E2514100DCD162 /* SDL_uikitvulkan.h in Headers */,
@@ -7089,20 +7100,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
F3CB933F26B5E0A400B9C980 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
F3CB94BD26B5E0A600B9C980 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
@@ -7306,46 +7303,6 @@
productReference = DB31407717554B71006C0E22 /* libSDL2.dylib */;
productType = "com.apple.product-type.library.dynamic";
};
F3CB933E26B5E0A400B9C980 /* SDLmain-iOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = F3CB94B726B5E0A400B9C980 /* Build configuration list for PBXNativeTarget "SDLmain-iOS" */;
buildPhases = (
F3CB933F26B5E0A400B9C980 /* Headers */,
F3CB93F026B5E0A400B9C980 /* Sources */,
F3CB94B526B5E0A400B9C980 /* Frameworks */,
F3CB94B626B5E0A400B9C980 /* Rez */,
);
buildRules = (
);
comments = "This produces libSDLmain.a, which provides a main() for use with your application";
dependencies = (
);
name = "SDLmain-iOS";
productInstallPath = /usr/local/lib;
productName = "Static Library";
productReference = F3CB94BA26B5E0A400B9C980 /* libSDLmain.a */;
productType = "com.apple.product-type.library.static";
};
F3CB94BC26B5E0A600B9C980 /* SDLmain-tvOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = F3CB963526B5E0A600B9C980 /* Build configuration list for PBXNativeTarget "SDLmain-tvOS" */;
buildPhases = (
F3CB94BD26B5E0A600B9C980 /* Headers */,
F3CB956E26B5E0A600B9C980 /* Sources */,
F3CB963326B5E0A600B9C980 /* Frameworks */,
F3CB963426B5E0A600B9C980 /* Rez */,
);
buildRules = (
);
comments = "This produces libSDLmain.a, which provides a main() for use with your application";
dependencies = (
);
name = "SDLmain-tvOS";
productInstallPath = /usr/local/lib;
productName = "Static Library";
productReference = F3CB963826B5E0A600B9C980 /* libSDLmain.a */;
productType = "com.apple.product-type.library.static";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
@@ -7368,8 +7325,6 @@
projectDirPath = "";
projectRoot = "";
targets = (
F3CB933E26B5E0A400B9C980 /* SDLmain-iOS */,
F3CB94BC26B5E0A600B9C980 /* SDLmain-tvOS */,
BECDF5FE0761BA81005FE872 /* Framework */,
A7D88A1423E2437C00DCD162 /* Framework-iOS */,
A7D88BC923E24BED00DCD162 /* Framework-tvOS */,
@@ -7457,20 +7412,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
F3CB94B626B5E0A400B9C980 /* Rez */ = {
isa = PBXRezBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
F3CB963426B5E0A600B9C980 /* Rez */ = {
isa = PBXRezBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXRezBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
@@ -7644,6 +7585,7 @@
A75FCE8423E25AB700529352 /* e_exp.c in Sources */,
A75FCE8523E25AB700529352 /* SDL_quit.c in Sources */,
A75FCE8623E25AB700529352 /* SDL_cocoawindow.m in Sources */,
A1BB8B6A27F6CF330057CFA8 /* SDL_list.c in Sources */,
A75FCE8723E25AB700529352 /* SDL_sysmutex.c in Sources */,
A75FCE8823E25AB700529352 /* SDL_syshaptic.c in Sources */,
F3F07D61269640160074468B /* SDL_hidapi_luna.c in Sources */,
@@ -7831,6 +7773,7 @@
A75FD03D23E25AC700529352 /* e_exp.c in Sources */,
A75FD03E23E25AC700529352 /* SDL_quit.c in Sources */,
A75FD03F23E25AC700529352 /* SDL_cocoawindow.m in Sources */,
A1BB8B6B27F6CF330057CFA8 /* SDL_list.c in Sources */,
A75FD04023E25AC700529352 /* SDL_sysmutex.c in Sources */,
A75FD04123E25AC700529352 /* SDL_syshaptic.c in Sources */,
F3F07D62269640160074468B /* SDL_hidapi_luna.c in Sources */,
@@ -8017,6 +7960,7 @@
A769B20F23E259AE00872273 /* SDL_syshaptic.c in Sources */,
A769B21023E259AE00872273 /* e_exp.c in Sources */,
F395C1A12569C68F00942BFF /* SDL_iokitjoystick.c in Sources */,
A1BB8B6827F6CF330057CFA8 /* SDL_list.c in Sources */,
A769B21123E259AE00872273 /* SDL_quit.c in Sources */,
A769B21223E259AE00872273 /* SDL_cocoawindow.m in Sources */,
A769B21323E259AE00872273 /* SDL_sysmutex.c in Sources */,
@@ -8206,6 +8150,7 @@
A7D8B43B23E2514300DCD162 /* SDL_sysmutex.c in Sources */,
A7D8AAB123E2514100DCD162 /* SDL_syshaptic.c in Sources */,
A7D8B5CA23E2514300DCD162 /* SDL_rwopsbundlesupport.m in Sources */,
A1BB8B6427F6CF330057CFA8 /* SDL_list.c in Sources */,
A7D8AC1023E2514100DCD162 /* SDL_video.c in Sources */,
560572062473687700B46B66 /* SDL_syslocale.m in Sources */,
F3F07D5B269640160074468B /* SDL_hidapi_luna.c in Sources */,
@@ -8393,6 +8338,7 @@
A7D8B43C23E2514300DCD162 /* SDL_sysmutex.c in Sources */,
A7D8AAB223E2514100DCD162 /* SDL_syshaptic.c in Sources */,
A7D8B5CB23E2514300DCD162 /* SDL_rwopsbundlesupport.m in Sources */,
A1BB8B6527F6CF330057CFA8 /* SDL_list.c in Sources */,
A7D8AC1123E2514100DCD162 /* SDL_video.c in Sources */,
560572072473687800B46B66 /* SDL_syslocale.m in Sources */,
F3F07D5C269640160074468B /* SDL_hidapi_luna.c in Sources */,
@@ -8579,6 +8525,7 @@
A7D8AADE23E2514100DCD162 /* SDL_syshaptic.c in Sources */,
A7D8BAE923E2514500DCD162 /* e_exp.c in Sources */,
F395C1A02569C68F00942BFF /* SDL_iokitjoystick.c in Sources */,
A1BB8B6727F6CF330057CFA8 /* SDL_list.c in Sources */,
A7D8BB8523E2514500DCD162 /* SDL_quit.c in Sources */,
A7D8AEAA23E2514100DCD162 /* SDL_cocoawindow.m in Sources */,
A7D8B43E23E2514300DCD162 /* SDL_sysmutex.c in Sources */,
@@ -8755,6 +8702,7 @@
A7D8B55123E2514300DCD162 /* SDL_hidapi_switch.c in Sources */,
A7D8B96223E2514400DCD162 /* SDL_strtokr.c in Sources */,
A7D8BB7523E2514500DCD162 /* SDL_clipboardevents.c in Sources */,
A1BB8B6327F6CF330057CFA8 /* SDL_list.c in Sources */,
A7D8BAB523E2514400DCD162 /* k_cos.c in Sources */,
A7D8B54523E2514300DCD162 /* SDL_hidapijoystick.c in Sources */,
A7D8B97423E2514400DCD162 /* SDL_malloc.c in Sources */,
@@ -8940,6 +8888,7 @@
A7D8B96523E2514400DCD162 /* SDL_strtokr.c in Sources */,
A7D8BB7823E2514500DCD162 /* SDL_clipboardevents.c in Sources */,
A7D8BAB823E2514400DCD162 /* k_cos.c in Sources */,
A1BB8B6627F6CF330057CFA8 /* SDL_list.c in Sources */,
A7D8B54823E2514300DCD162 /* SDL_hidapijoystick.c in Sources */,
A7D8B97723E2514400DCD162 /* SDL_malloc.c in Sources */,
A7D8BBF023E2574800DCD162 /* SDL_uikitclipboard.m in Sources */,
@@ -9125,6 +9074,7 @@
A7D8B96723E2514400DCD162 /* SDL_strtokr.c in Sources */,
A7D8BB7A23E2514500DCD162 /* SDL_clipboardevents.c in Sources */,
A7D8BABA23E2514400DCD162 /* k_cos.c in Sources */,
A1BB8B6927F6CF330057CFA8 /* SDL_list.c in Sources */,
A7D8B54A23E2514300DCD162 /* SDL_hidapijoystick.c in Sources */,
A7D8B97923E2514400DCD162 /* SDL_malloc.c in Sources */,
A7D8B8CB23E2514400DCD162 /* SDL_audio.c in Sources */,
@@ -9165,22 +9115,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
F3CB93F026B5E0A400B9C980 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F3CB963A26B5E10A00B9C980 /* SDL_uikit_main.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
F3CB956E26B5E0A600B9C980 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F3CB963B26B5E14400B9C980 /* SDL_uikit_main.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
@@ -9217,7 +9151,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEPLOYMENT_POSTPROCESSING = YES;
DYLIB_COMPATIBILITY_VERSION = 1.0.0;
DYLIB_CURRENT_VERSION = 19.0.0;
DYLIB_CURRENT_VERSION = 23.0.0;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_ALTIVEC_EXTENSIONS = YES;
@@ -9301,7 +9235,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_COMPATIBILITY_VERSION = 1.0.0;
DYLIB_CURRENT_VERSION = 19.0.0;
DYLIB_CURRENT_VERSION = 23.0.0;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@@ -9493,6 +9427,7 @@
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_LINK_OBJC_RUNTIME = NO;
GCC_PREPROCESSOR_DEFINITIONS = GLES_SILENCE_DEPRECATION;
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
@@ -9504,6 +9439,7 @@
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_LINK_OBJC_RUNTIME = NO;
GCC_PREPROCESSOR_DEFINITIONS = GLES_SILENCE_DEPRECATION;
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
@@ -9528,54 +9464,6 @@
};
name = Release;
};
F3CB94B826B5E0A400B9C980 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_LINK_OBJC_RUNTIME = NO;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
PRODUCT_NAME = SDLmain;
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
};
name = Debug;
};
F3CB94B926B5E0A400B9C980 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_LINK_OBJC_RUNTIME = NO;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
PRODUCT_NAME = SDLmain;
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
};
name = Release;
};
F3CB963626B5E0A600B9C980 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_LINK_OBJC_RUNTIME = NO;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
PRODUCT_NAME = SDLmain;
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "appletvsimulator appletvos";
};
name = Debug;
};
F3CB963726B5E0A600B9C980 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_LINK_OBJC_RUNTIME = NO;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
PRODUCT_NAME = SDLmain;
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "appletvsimulator appletvos";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@@ -9678,24 +9566,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
};
F3CB94B726B5E0A400B9C980 /* Build configuration list for PBXNativeTarget "SDLmain-iOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F3CB94B826B5E0A400B9C980 /* Debug */,
F3CB94B926B5E0A400B9C980 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
};
F3CB963526B5E0A600B9C980 /* Build configuration list for PBXNativeTarget "SDLmain-tvOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F3CB963626B5E0A600B9C980 /* Debug */,
F3CB963726B5E0A600B9C980 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
};
/* End XCConfigurationList section */
};
rootObject = 0867D690FE84028FC02AAC07 /* Project object */;

View File

@@ -1,6 +1,6 @@
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

2425
acinclude/libtool.m4 vendored

File diff suppressed because it is too large Load Diff

125
acinclude/ltoptions.m4 vendored
View File

@@ -1,14 +1,14 @@
# Helper functions for option handling. -*- Autoconf -*-
#
# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
# Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# serial 7 ltoptions.m4
# serial 8 ltoptions.m4
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
@@ -29,7 +29,7 @@ m4_define([_LT_SET_OPTION],
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
_LT_MANGLE_DEFUN([$1], [$2]),
[m4_warning([Unknown $1 option `$2'])])[]dnl
[m4_warning([Unknown $1 option '$2'])])[]dnl
])
@@ -75,13 +75,15 @@ m4_if([$1],[LT_INIT],[
dnl
dnl If no reference was made to various pairs of opposing options, then
dnl we run the default mode handler for the pair. For example, if neither
dnl `shared' nor `disable-shared' was passed, we enable building of shared
dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
dnl archives by default:
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
[_LT_ENABLE_FAST_INSTALL])
_LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
[_LT_WITH_AIX_SONAME([aix])])
])
])# _LT_SET_OPTIONS
@@ -112,7 +114,7 @@ AU_DEFUN([AC_LIBTOOL_DLOPEN],
[_LT_SET_OPTION([LT_INIT], [dlopen])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `dlopen' option into LT_INIT's first parameter.])
put the 'dlopen' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
@@ -148,7 +150,7 @@ AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
_LT_SET_OPTION([LT_INIT], [win32-dll])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `win32-dll' option into LT_INIT's first parameter.])
put the 'win32-dll' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
@@ -157,9 +159,9 @@ dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
# _LT_ENABLE_SHARED([DEFAULT])
# ----------------------------
# implement the --enable-shared flag, and supports the `shared' and
# `disable-shared' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
# implement the --enable-shared flag, and supports the 'shared' and
# 'disable-shared' LT_INIT options.
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
m4_define([_LT_ENABLE_SHARED],
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([shared],
@@ -172,14 +174,14 @@ AC_ARG_ENABLE([shared],
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
IFS="$lt_save_ifs"
IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
IFS="$lt_save_ifs"
IFS=$lt_save_ifs
;;
esac],
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
@@ -211,9 +213,9 @@ dnl AC_DEFUN([AM_DISABLE_SHARED], [])
# _LT_ENABLE_STATIC([DEFAULT])
# ----------------------------
# implement the --enable-static flag, and support the `static' and
# `disable-static' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
# implement the --enable-static flag, and support the 'static' and
# 'disable-static' LT_INIT options.
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
m4_define([_LT_ENABLE_STATIC],
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([static],
@@ -226,14 +228,14 @@ AC_ARG_ENABLE([static],
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
IFS="$lt_save_ifs"
IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
IFS="$lt_save_ifs"
IFS=$lt_save_ifs
;;
esac],
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
@@ -265,9 +267,9 @@ dnl AC_DEFUN([AM_DISABLE_STATIC], [])
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
# ----------------------------------
# implement the --enable-fast-install flag, and support the `fast-install'
# and `disable-fast-install' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
# implement the --enable-fast-install flag, and support the 'fast-install'
# and 'disable-fast-install' LT_INIT options.
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
m4_define([_LT_ENABLE_FAST_INSTALL],
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([fast-install],
@@ -280,14 +282,14 @@ AC_ARG_ENABLE([fast-install],
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
IFS="$lt_save_ifs"
IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
IFS="$lt_save_ifs"
IFS=$lt_save_ifs
;;
esac],
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
@@ -304,14 +306,14 @@ AU_DEFUN([AC_ENABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
the `fast-install' option into LT_INIT's first parameter.])
the 'fast-install' option into LT_INIT's first parameter.])
])
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
the `disable-fast-install' option into LT_INIT's first parameter.])
the 'disable-fast-install' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
@@ -319,11 +321,64 @@ dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
# _LT_WITH_AIX_SONAME([DEFAULT])
# ----------------------------------
# implement the --with-aix-soname flag, and support the `aix-soname=aix'
# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
m4_define([_LT_WITH_AIX_SONAME],
[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
shared_archive_member_spec=
case $host,$enable_shared in
power*-*-aix[[5-9]]*,yes)
AC_MSG_CHECKING([which variant of shared library versioning to provide])
AC_ARG_WITH([aix-soname],
[AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
[shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
[case $withval in
aix|svr4|both)
;;
*)
AC_MSG_ERROR([Unknown argument to --with-aix-soname])
;;
esac
lt_cv_with_aix_soname=$with_aix_soname],
[AC_CACHE_VAL([lt_cv_with_aix_soname],
[lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
with_aix_soname=$lt_cv_with_aix_soname])
AC_MSG_RESULT([$with_aix_soname])
if test aix != "$with_aix_soname"; then
# For the AIX way of multilib, we name the shared archive member
# based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
# and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
# Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
# the AIX toolchain works better with OBJECT_MODE set (default 32).
if test 64 = "${OBJECT_MODE-32}"; then
shared_archive_member_spec=shr_64
else
shared_archive_member_spec=shr
fi
fi
;;
*)
with_aix_soname=aix
;;
esac
_LT_DECL([], [shared_archive_member_spec], [0],
[Shared archive member basename, for filename based shared library versioning on AIX])dnl
])# _LT_WITH_AIX_SONAME
LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
# _LT_WITH_PIC([MODE])
# --------------------
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
# LT_INIT options.
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
m4_define([_LT_WITH_PIC],
[AC_ARG_WITH([pic],
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
@@ -334,19 +389,17 @@ m4_define([_LT_WITH_PIC],
*)
pic_mode=default
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for lt_pkg in $withval; do
IFS="$lt_save_ifs"
IFS=$lt_save_ifs
if test "X$lt_pkg" = "X$lt_p"; then
pic_mode=yes
fi
done
IFS="$lt_save_ifs"
IFS=$lt_save_ifs
;;
esac],
[pic_mode=default])
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
[pic_mode=m4_default([$1], [default])])
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
])# _LT_WITH_PIC
@@ -359,7 +412,7 @@ AU_DEFUN([AC_LIBTOOL_PICMODE],
[_LT_SET_OPTION([LT_INIT], [pic-only])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `pic-only' option into LT_INIT's first parameter.])
put the 'pic-only' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:

View File

@@ -1,6 +1,7 @@
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
# Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
@@ -33,7 +34,7 @@ m4_define([_lt_join],
# ------------
# Manipulate m4 lists.
# These macros are necessary as long as will still need to support
# Autoconf-2.59 which quotes differently.
# Autoconf-2.59, which quotes differently.
m4_define([lt_car], [[$1]])
m4_define([lt_cdr],
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
@@ -44,7 +45,7 @@ m4_define([lt_unquote], $1)
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
# ------------------------------------------
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
# Note that neither SEPARATOR nor STRING are expanded; they are appended
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
# No SEPARATOR is output if MACRO-NAME was previously undefined (different

View File

@@ -1,6 +1,6 @@
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
# Copyright (C) 2004 Free Software Foundation, Inc.
# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004
#
# This file is free software; the Free Software Foundation gives
@@ -9,15 +9,15 @@
# @configure_input@
# serial 3337 ltversion.m4
# serial 4179 ltversion.m4
# This file is part of GNU Libtool
m4_define([LT_PACKAGE_VERSION], [2.4.2])
m4_define([LT_PACKAGE_REVISION], [1.3337])
m4_define([LT_PACKAGE_VERSION], [2.4.6])
m4_define([LT_PACKAGE_REVISION], [2.4.6])
AC_DEFUN([LTVERSION_VERSION],
[macro_version='2.4.2'
macro_revision='1.3337'
[macro_version='2.4.6'
macro_revision='2.4.6'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])

View File

@@ -1,6 +1,7 @@
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
# Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
# This file is free software; the Free Software Foundation gives
@@ -11,7 +12,7 @@
# These exist entirely to fool aclocal when bootstrapping libtool.
#
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
# which have later been changed to m4_define as they aren't part of the
# exported API, or moved to Autoconf or Automake where they belong.
#

View File

@@ -35,6 +35,10 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
applicationVariants.all { variant ->
tasks["merge${variant.name.capitalize()}Assets"]
.dependsOn("externalNativeBuild${variant.name.capitalize()}")
}
if (!project.hasProperty('EXCLUDE_NATIVE_LIBS')) {
sourceSets.main {
jniLibs.srcDir 'libs'

View File

@@ -13,6 +13,6 @@ LOCAL_SRC_FILES := YourSourceHere.c
LOCAL_SHARED_LIBRARIES := SDL2
LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -llog
LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid
include $(BUILD_SHARED_LIBRARY)

View File

@@ -141,6 +141,9 @@ public class HIDDeviceManager {
private void initializeUSB() {
mUsbManager = (UsbManager)mContext.getSystemService(Context.USB_SERVICE);
if (mUsbManager == null) {
return;
}
/*
// Logging

View File

@@ -63,6 +63,106 @@ import java.util.Locale;
*/
public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener {
private static final String TAG = "SDL";
/*
// Display InputType.SOURCE/CLASS of events and devices
//
// SDLActivity.debugSource(device.getSources(), "device[" + device.getName() + "]");
// SDLActivity.debugSource(event.getSource(), "event");
public static void debugSource(int sources, String prefix) {
int s = sources;
int s_copy = sources;
String cls = "";
String src = "";
int tst = 0;
int FLAG_TAINTED = 0x80000000;
if ((s & InputDevice.SOURCE_CLASS_BUTTON) != 0) cls += " BUTTON";
if ((s & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) cls += " JOYSTICK";
if ((s & InputDevice.SOURCE_CLASS_POINTER) != 0) cls += " POINTER";
if ((s & InputDevice.SOURCE_CLASS_POSITION) != 0) cls += " POSITION";
if ((s & InputDevice.SOURCE_CLASS_TRACKBALL) != 0) cls += " TRACKBALL";
int s2 = s_copy & ~InputDevice.SOURCE_ANY; // keep class bits
s2 &= ~( InputDevice.SOURCE_CLASS_BUTTON
| InputDevice.SOURCE_CLASS_JOYSTICK
| InputDevice.SOURCE_CLASS_POINTER
| InputDevice.SOURCE_CLASS_POSITION
| InputDevice.SOURCE_CLASS_TRACKBALL);
if (s2 != 0) cls += "Some_Unkown";
s2 = s_copy & InputDevice.SOURCE_ANY; // keep source only, no class;
tst = InputDevice.SOURCE_BLUETOOTH_STYLUS;
if ((s & tst) == tst) src += " BLUETOOTH_STYLUS";
s2 &= ~tst;
tst = InputDevice.SOURCE_DPAD;
if ((s & tst) == tst) src += " DPAD";
s2 &= ~tst;
tst = InputDevice.SOURCE_GAMEPAD;
if ((s & tst) == tst) src += " GAMEPAD";
s2 &= ~tst;
tst = InputDevice.SOURCE_HDMI;
if ((s & tst) == tst) src += " HDMI";
s2 &= ~tst;
tst = InputDevice.SOURCE_JOYSTICK;
if ((s & tst) == tst) src += " JOYSTICK";
s2 &= ~tst;
tst = InputDevice.SOURCE_KEYBOARD;
if ((s & tst) == tst) src += " KEYBOARD";
s2 &= ~tst;
tst = InputDevice.SOURCE_MOUSE;
if ((s & tst) == tst) src += " MOUSE";
s2 &= ~tst;
if (Build.VERSION.SDK_INT >= 26) {
tst = InputDevice.SOURCE_MOUSE_RELATIVE;
if ((s & tst) == tst) src += " MOUSE_RELATIVE";
s2 &= ~tst;
tst = InputDevice.SOURCE_ROTARY_ENCODER;
if ((s & tst) == tst) src += " ROTARY_ENCODER";
s2 &= ~tst;
}
tst = InputDevice.SOURCE_STYLUS;
if ((s & tst) == tst) src += " STYLUS";
s2 &= ~tst;
tst = InputDevice.SOURCE_TOUCHPAD;
if ((s & tst) == tst) src += " TOUCHPAD";
s2 &= ~tst;
tst = InputDevice.SOURCE_TOUCHSCREEN;
if ((s & tst) == tst) src += " TOUCHSCREEN";
s2 &= ~tst;
tst = InputDevice.SOURCE_TOUCH_NAVIGATION;
if ((s & tst) == tst) src += " TOUCH_NAVIGATION";
s2 &= ~tst;
tst = InputDevice.SOURCE_TRACKBALL;
if ((s & tst) == tst) src += " TRACKBALL";
s2 &= ~tst;
tst = InputDevice.SOURCE_ANY;
if ((s & tst) == tst) src += " ANY";
s2 &= ~tst;
if (s == FLAG_TAINTED) src += " FLAG_TAINTED";
s2 &= ~FLAG_TAINTED;
if (s2 != 0) src += " Some_Unkown";
Log.v(TAG, prefix + "int=" + s_copy + " CLASS={" + cls + " } source(s):" + src);
}
*/
public static boolean mIsResumedCalled, mHasFocus;
public static final boolean mHasMultiWindow = (Build.VERSION.SDK_INT >= 24);
@@ -1204,8 +1304,21 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
for (int id : ids) {
InputDevice device = InputDevice.getDevice(id);
if (device != null && (device.getSources() & InputDevice.SOURCE_TOUCHSCREEN) != 0) {
nativeAddTouch(device.getId(), device.getName());
/* Allow SOURCE_TOUCHSCREEN and also Virtual InputDevices because they can send TOUCHSCREEN events */
if (device != null && ((device.getSources() & InputDevice.SOURCE_TOUCHSCREEN) == InputDevice.SOURCE_TOUCHSCREEN
|| device.isVirtual())) {
int touchDevId = device.getId();
/*
* Prevent id to be -1, since it's used in SDL internal for synthetic events
* Appears when using Android emulator, eg:
* adb shell input mouse tap 100 100
* adb shell input touchscreen tap 100 100
*/
if (touchDevId < 0) {
touchDevId -= 1;
}
nativeAddTouch(touchDevId, device.getName());
}
}
}
@@ -1479,6 +1592,19 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
return mLastCursorID;
}
/**
* This method is called by SDL using JNI.
*/
public static void destroyCustomCursor(int cursorID) {
if (Build.VERSION.SDK_INT >= 24) {
try {
mCursors.remove(cursorID);
} catch (Exception e) {
}
}
return;
}
/**
* This method is called by SDL using JNI.
*/
@@ -1882,7 +2008,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
}
}
if ((source & InputDevice.SOURCE_KEYBOARD) != 0) {
if ((source & InputDevice.SOURCE_KEYBOARD) == InputDevice.SOURCE_KEYBOARD) {
if (event.getAction() == KeyEvent.ACTION_DOWN) {
if (SDLActivity.isTextInputEvent(event)) {
SDLInputConnection.nativeCommitText(String.valueOf((char) event.getUnicodeChar()), 1);
@@ -1895,7 +2021,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
}
}
if ((source & InputDevice.SOURCE_MOUSE) != 0) {
if ((source & InputDevice.SOURCE_MOUSE) == InputDevice.SOURCE_MOUSE) {
// on some devices key events are sent for mouse BUTTON_BACK/FORWARD presses
// they are ignored here because sending them as mouse input to SDL is messy
if ((keyCode == KeyEvent.KEYCODE_BACK) || (keyCode == KeyEvent.KEYCODE_FORWARD)) {

View File

@@ -255,7 +255,6 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
@Override
public boolean handleMotionEvent(MotionEvent event) {
if ((event.getSource() & InputDevice.SOURCE_JOYSTICK) != 0) {
int actionPointerIndex = event.getActionIndex();
int action = event.getActionMasked();
if (action == MotionEvent.ACTION_MOVE) {
@@ -274,7 +273,6 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
}
}
}
}
return true;
}
@@ -319,6 +317,7 @@ class SDLJoystickHandler_API19 extends SDLJoystickHandler_API16 {
KeyEvent.KEYCODE_BUTTON_X,
KeyEvent.KEYCODE_BUTTON_Y,
KeyEvent.KEYCODE_BACK,
KeyEvent.KEYCODE_MENU,
KeyEvent.KEYCODE_BUTTON_MODE,
KeyEvent.KEYCODE_BUTTON_START,
KeyEvent.KEYCODE_BUTTON_THUMBL,
@@ -360,6 +359,7 @@ class SDLJoystickHandler_API19 extends SDLJoystickHandler_API16 {
(1 << 2), // X -> X
(1 << 3), // Y -> Y
(1 << 4), // BACK -> BACK
(1 << 6), // MENU -> START
(1 << 5), // MODE -> GUIDE
(1 << 6), // START -> START
(1 << 7), // THUMBL -> LEFTSTICK
@@ -560,8 +560,6 @@ class SDLGenericMotionListener_API12 implements View.OnGenericMotionListener {
switch ( event.getSource() ) {
case InputDevice.SOURCE_JOYSTICK:
case InputDevice.SOURCE_GAMEPAD:
case InputDevice.SOURCE_DPAD:
return SDLControllerManager.handleJoystickMotionEvent(event);
case InputDevice.SOURCE_MOUSE:
@@ -691,8 +689,6 @@ class SDLGenericMotionListener_API26 extends SDLGenericMotionListener_API24 {
switch ( event.getSource() ) {
case InputDevice.SOURCE_JOYSTICK:
case InputDevice.SOURCE_GAMEPAD:
case InputDevice.SOURCE_DPAD:
return SDLControllerManager.handleJoystickMotionEvent(event);
case InputDevice.SOURCE_MOUSE:

View File

@@ -1,14 +1,14 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright 1992-2021 Free Software Foundation, Inc.
# Copyright 1992-2022 Free Software Foundation, Inc.
# shellcheck disable=SC2006,SC2268 # see below for rationale
timestamp='2021-06-03'
timestamp='2022-01-03'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@@ -60,7 +60,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright 1992-2021 Free Software Foundation, Inc.
Copyright 1992-2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -437,7 +437,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
# This test works for both compilers.
if test "$CC_FOR_BUILD" != no_compiler_found; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
(CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
SUN_ARCH=x86_64
@@ -1522,6 +1522,9 @@ EOF
i*86:rdos:*:*)
GUESS=$UNAME_MACHINE-pc-rdos
;;
i*86:Fiwix:*:*)
GUESS=$UNAME_MACHINE-pc-fiwix
;;
*:AROS:*:*)
GUESS=$UNAME_MACHINE-unknown-aros
;;

View File

@@ -1,14 +1,14 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright 1992-2021 Free Software Foundation, Inc.
# Copyright 1992-2022 Free Software Foundation, Inc.
# shellcheck disable=SC2006,SC2268 # see below for rationale
timestamp='2021-08-14'
timestamp='2022-01-03'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@@ -76,7 +76,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright 1992-2021 Free Software Foundation, Inc.
Copyright 1992-2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -1020,6 +1020,11 @@ case $cpu-$vendor in
;;
# Here we normalize CPU types with a missing or matching vendor
armh-unknown | armh-alt)
cpu=armv7l
vendor=alt
basic_os=${basic_os:-linux-gnueabihf}
;;
dpx20-unknown | dpx20-bull)
cpu=rs6000
vendor=bull
@@ -1121,7 +1126,7 @@ case $cpu-$vendor in
xscale-* | xscalee[bl]-*)
cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
;;
arm64-*)
arm64-* | aarch64le-*)
cpu=aarch64
;;
@@ -1304,7 +1309,7 @@ esac
if test x$basic_os != x
then
# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just
# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
# set os.
case $basic_os in
gnu/linux*)
@@ -1748,7 +1753,8 @@ case $os in
| skyos* | haiku* | rdos* | toppers* | drops* | es* \
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr*)
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
| fiwix* )
;;
# This one is extra strict with allowed versions
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)

5053
build-scripts/ltmain.sh Executable file → Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,42 +0,0 @@
#!/bin/bash
# This is the script buildbot.libsdl.org uses to cross-compile SDL2 from
# x86 Linux to OS/2, using OpenWatcom.
# The final zipfile can be unpacked on any machine that supports OpenWatcom
# (Windows, Linux, OS/2, etc). Point the compiler at the include directory
# and link against the SDL2.lib file. Ship the SDL2.dll with your app.
if [ -z "$WATCOM" ]; then
echo "This script expects \$WATCOM to be set to the OpenWatcom install dir." 1>&2
echo "This is often something like '/usr/local/share/watcom'" 1>&2
exit 1
fi
export PATH="$WATCOM/binl:$PATH"
ZIPFILE="$1"
if [ -z $1 ]; then
ZIPFILE=sdl-os2.zip
fi
ZIPDIR=buildbot/SDL
set -e
set -x
cd `dirname "$0"`
cd ..
rm -f $ZIPFILE
wmake -f Makefile.os2
rm -rf $ZIPDIR
mkdir -p $ZIPDIR
chmod a+r SDL2.lib SDL2.dll
mv SDL2.lib SDL2.dll $ZIPDIR/
cp -R include $ZIPDIR/
zip -9r "buildbot/$ZIPFILE" $ZIPDIR
wmake -f Makefile.os2 distclean
set +x
echo "All done. Final installable is in $ZIPFILE ...";

View File

@@ -14,6 +14,7 @@ foreach (@ARGV) {
$copy_direction = 1, next if $_ eq '--copy-to-headers';
$copy_direction = 1, next if $_ eq '--copy-to-header';
$copy_direction = -1, next if $_ eq '--copy-to-wiki';
$copy_direction = -2, next if $_ eq '--copy-to-manpages';
$srcpath = $_, next if not defined $srcpath;
$wikipath = $_, next if not defined $wikipath;
}
@@ -199,6 +200,9 @@ sub wikify {
}
my $dewikify_mode = 'md';
my $dewikify_manpage_code_indent = 1;
sub dewikify_chunk {
my $wikitype = shift;
my $str = shift;
@@ -207,6 +211,7 @@ sub dewikify_chunk {
#print("\n\nDEWIKIFY CHUNK:\n\n$str\n\n\n");
if ($dewikify_mode eq 'md') {
if ($wikitype eq 'mediawiki') {
# Doxygen supports Markdown (and it just simply looks better than MediaWiki
# when looking at the raw headers), so do some conversions here as necessary.
@@ -217,13 +222,13 @@ sub dewikify_chunk {
$str =~ s/\<code>(.*?)<\/code>/`$1`/gms;
# bold+italic
$str =~ s/\'''''(.*?)'''''/***$1***/gms;
$str =~ s/'''''(.*?)'''''/***$1***/gms;
# bold
$str =~ s/\'''(.*?)'''/**$1**/gms;
$str =~ s/'''(.*?)'''/**$1**/gms;
# italic
$str =~ s/\''(.*?)''/*$1*/gms;
$str =~ s/''(.*?)''/*$1*/gms;
# bullets
$str =~ s/^\* /- /gm;
@@ -232,6 +237,42 @@ sub dewikify_chunk {
if (defined $code) {
$str .= "```$codelang$code```";
}
} elsif ($dewikify_mode eq 'manpage') {
$str =~ s/\./\\[char46]/gms; # make sure these can't become control codes.
if ($wikitype eq 'mediawiki') {
$str =~ s/\s*\[\[(SDL_[a-zA-Z0-9_]+)\]\]\s*/\n.BR $1\n/gms; # Dump obvious wikilinks.
# <code></code> is also popular. :/
$str =~ s/\s*\<code>(.*?)<\/code>\s*/\n.BR $1\n/gms;
# bold+italic
$str =~ s/\s*'''''(.*?)'''''\s*/\n.BI $1\n/gms;
# bold
$str =~ s/\s*'''(.*?)'''\s*/\n.B $1\n/gms;
# italic
$str =~ s/\s*''(.*?)''\s*/\n.I $1\n/gms;
# bullets
$str =~ s/^\* /\n\\\(bu /gm;
} else {
die("Unexpected wikitype when converting to manpages\n"); # !!! FIXME: need to handle Markdown wiki pages.
}
if (defined $code) {
$code =~ s/\A\n+//gms;
$code =~ s/\n+\Z//gms;
if ($dewikify_manpage_code_indent) {
$str .= "\n.IP\n"
} else {
$str .= "\n.PP\n"
}
$str .= ".EX\n$code\n.EE\n.PP\n";
}
} else {
die("Unexpected dewikify_mode\n");
}
#print("\n\nDEWIKIFY CHUNK DONE:\n\n$str\n\n\n");
@@ -260,7 +301,7 @@ sub dewikify {
}
sub usage {
die("USAGE: $0 <source code git clone path> <wiki git clone path> [--copy-to-headers|--copy-to-wiki] [--warn-about-missing]\n\n");
die("USAGE: $0 <source code git clone path> <wiki git clone path> [--copy-to-headers|--copy-to-wiki|--copy-to-manpages] [--warn-about-missing]\n\n");
}
usage() if not defined $srcpath;
@@ -551,6 +592,7 @@ if ($warn_about_missing) {
if ($copy_direction == 1) { # --copy-to-headers
my %changed_headers = ();
$dewikify_mode = 'md';
$wordwrap_mode = 'md'; # the headers use Markdown format.
foreach (keys %headerfuncs) {
@@ -740,7 +782,7 @@ if ($copy_direction == 1) { # --copy-to-headers
my $fn = $_;
next if not $headerfuncshasdoxygen{$fn};
my $wikitype = defined $wikitypes{$fn} ? $wikitypes{$fn} : 'mediawiki'; # default to MediaWiki for new stuff FOR NOW.
die("Unexpected wikitype '$wikitype'\n") if (($wikitype ne 'mediawiki') and ($wikitype ne 'md'));
die("Unexpected wikitype '$wikitype'\n") if (($wikitype ne 'mediawiki') and ($wikitype ne 'md') and ($wikitype ne 'manpage'));
#print("$fn\n"); next;
@@ -1009,6 +1051,207 @@ if ($copy_direction == 1) { # --copy-to-headers
close(FH);
rename($path, "$wikipath/$_.${wikitype}") or die("Can't rename '$path' to '$wikipath/$_.${wikitype}': $!\n");
}
} elsif ($copy_direction == -2) { # --copy-to-manpages
# This only takes from the wiki data, since it has sections we omit from the headers, like code examples.
my $manpath = "$srcpath/man";
mkdir($manpath);
$manpath .= "/man3";
mkdir($manpath);
$dewikify_mode = 'manpage';
$wordwrap_mode = 'manpage';
my $introtxt = '';
if (0) {
open(FH, '<', "$srcpath/LICENSE.txt") or die("Can't open '$srcpath/LICENSE.txt': $!\n");
while (<FH>) {
chomp;
$introtxt .= ".\\\" $_\n";
}
close(FH);
}
my $gitrev = `cd "$srcpath" ; git rev-list HEAD~..`;
chomp($gitrev);
open(FH, '<', "$srcpath/include/SDL_version.h") or die("Can't open '$srcpath/include/SDL_version.h': $!\n");
my $majorver = 0;
my $minorver = 0;
my $patchver = 0;
while (<FH>) {
chomp;
if (/\A\#define SDL_MAJOR_VERSION\s+(\d+)\Z/) {
$majorver = int($1);
} elsif (/\A\#define SDL_MINOR_VERSION\s+(\d+)\Z/) {
$minorver = int($1);
} elsif (/\A\#define SDL_PATCHLEVEL\s+(\d+)\Z/) {
$patchver = int($1);
}
}
close(FH);
my $sdlversion = "$majorver.$minorver.$patchver";
foreach (keys %headerfuncs) {
my $fn = $_;
next if not defined $wikifuncs{$fn}; # don't have a page for that function, skip it.
my $wikitype = $wikitypes{$fn};
my $sectionsref = $wikifuncs{$fn};
my $remarks = %$sectionsref{'Remarks'};
my $params = %$sectionsref{'Function Parameters'};
my $returns = %$sectionsref{'Return Value'};
my $version = %$sectionsref{'Version'};
my $related = %$sectionsref{'Related Functions'};
my $examples = %$sectionsref{'Code Examples'};
my $deprecated = %$sectionsref{'Deprecated'};
my $brief = %$sectionsref{'[Brief]'};
my $decl = $headerdecls{$fn};
my $str = '';
$brief = "$brief";
$brief =~ s/\A[\s\n]*\= .*? \=\s*?\n+//ms;
$brief =~ s/\A[\s\n]*\=\= .*? \=\=\s*?\n+//ms;
$brief =~ s/\A(.*?\.) /$1\n/; # \brief should only be one sentence, delimited by a period+space. Split if necessary.
my @briefsplit = split /\n/, $brief;
$brief = shift @briefsplit;
$brief = dewikify($wikitype, $brief);
if (defined $remarks) {
$remarks = dewikify($wikitype, join("\n", @briefsplit) . $remarks);
}
$str .= $introtxt;
$str .= ".\\\" This manpage content is licensed under Creative Commons\n";
$str .= ".\\\" Attribution 4.0 International (CC BY 4.0)\n";
$str .= ".\\\" https://creativecommons.org/licenses/by/4.0/\n";
$str .= ".\\\" This manpage was generated from SDL's wiki page for $fn:\n";
$str .= ".\\\" https://wiki.libsdl.org/$fn\n";
$str .= ".\\\" Generated with SDL/build-scripts/wikiheaders.pl\n";
$str .= ".\\\" revision $gitrev\n" if $gitrev ne '';
$str .= ".\\\" Please report issues in this manpage's content at:\n";
$str .= ".\\\" https://github.com/libsdl-org/sdlwiki/issues/new?title=Feedback%20on%20page%20$fn\n";
$str .= ".\\\" Please report issues in the generation of this manpage from the wiki at:\n";
$str .= ".\\\" https://github.com/libsdl-org/SDL/issues/new?title=Misgenerated%20manpage%20for%20$fn\n";
$str .= ".\\\" SDL can be found at https://libsdl.org/\n";
$str .= ".TH $fn 3 \"SDL $sdlversion\" \"Simple Directmedia Layer\" \"SDL$majorver FUNCTIONS\"\n";
$str .= ".SH NAME\n";
$str .= "$fn";
$str .= " \\- $brief" if (defined $brief);
$str .= "\n";
$str .= ".SH SYNOPSIS\n";
$str .= ".nf\n";
$str .= ".B #include \\(dqSDL.h\\(dq\n";
$str .= ".PP\n";
my @decllines = split /\n/, $decl;
foreach (@decllines) {
$str .= ".BI \"$_\n";
}
$str .= ".fi\n";
if (defined $remarks) {
$str .= ".SH DESCRIPTION\n";
$str .= $remarks . "\n";
}
if (defined $deprecated) {
$str .= ".SH DEPRECATED\n";
$str .= dewikify($wikitype, $deprecated) . "\n";
}
if (defined $params) {
$str .= ".SH FUNCTION PARAMETERS\n";
my @lines = split /\n/, $params;
if ($wikitype eq 'mediawiki') {
die("Unexpected data parsing MediaWiki table") if (shift @lines ne '{|'); # Dump the '{|' start
while (scalar(@lines) >= 3) {
my $name = shift @lines;
my $desc = shift @lines;
my $terminator = shift @lines; # the '|-' or '|}' line.
last if ($terminator ne '|-') and ($terminator ne '|}'); # we seem to have run out of table.
$name =~ s/\A\|\s*//;
$name =~ s/\A\*\*(.*?)\*\*/$1/;
$name =~ s/\A\'\'\'(.*?)\'\'\'/$1/;
$desc =~ s/\A\|\s*//;
$desc = dewikify($wikitype, $desc);
#print STDERR "FN: $fn NAME: $name DESC: $desc TERM: $terminator\n";
$str .= ".TP\n";
$str .= ".I $name\n";
$str .= "$desc\n";
}
} else {
die("write me");
}
}
if (defined $returns) {
$str .= ".SH RETURN VALUE\n";
$str .= dewikify($wikitype, $returns) . "\n";
}
if (defined $examples) {
$str .= ".SH CODE EXAMPLES\n";
$dewikify_manpage_code_indent = 0;
$str .= dewikify($wikitype, $examples) . "\n";
$dewikify_manpage_code_indent = 1;
}
if (defined $version) {
$str .= ".SH AVAILABILITY\n";
$str .= dewikify($wikitype, $version) . "\n";
}
if (defined $related) {
$str .= ".SH SEE ALSO\n";
# !!! FIXME: lots of code duplication in all of these.
my $v = dewikify($wikitype, $related);
my @desclines = split /\n/, $v;
my $nextstr = '';
foreach (@desclines) {
s/\A(\:|\* )//;
s/\(\)\Z//; # Convert "SDL_Func()" to "SDL_Func"
s/\A\.BR\s+//; # dewikify added this, but we want to handle it.
s/\A\s+//;
s/\s+\Z//;
next if $_ eq '';
$str .= "$nextstr.BR $_ (3)";
$nextstr = ",\n";
}
$str .= "\n";
}
if (0) {
$str .= ".SH COPYRIGHT\n";
$str .= "This manpage is licensed under\n";
$str .= ".UR https://creativecommons.org/licenses/by/4.0/\n";
$str .= "Creative Commons Attribution 4.0 International (CC BY 4.0)\n";
$str .= ".UE\n";
$str .= ".PP\n";
$str .= "This manpage was generated from\n";
$str .= ".UR https://wiki.libsdl.org/$fn\n";
$str .= "SDL's wiki\n";
$str .= ".UE\n";
$str .= "using SDL/build-scripts/wikiheaders.pl";
$str .= " revision $gitrev" if $gitrev ne '';
$str .= ".\n";
$str .= "Please report issues in this manpage at\n";
$str .= ".UR https://github.com/libsdl-org/sdlwiki/issues/new\n";
$str .= "our bugtracker!\n";
$str .= ".UE\n";
}
my $path = "$manpath/$_.3.tmp";
open(FH, '>', $path) or die("Can't open '$path': $!\n");
print FH $str;
close(FH);
rename($path, "$manpath/$_.3") or die("Can't rename '$path' to '$manpath/$_.3': $!\n");
}
}
# end of wikiheaders.pl ...

View File

@@ -39,7 +39,7 @@
#
# Base version of SDL, used for packaging purposes
$SDLVersion = "2.0.18"
$SDLVersion = "2.0.22"
# Gets the .bat file that sets up an MSBuild environment, given one of
# Visual Studio's, "PlatformToolset"s.

View File

@@ -92,11 +92,22 @@ macro(LISTTOSTRREV _LIST _OUTPUT)
endforeach()
endmacro()
if(${CMAKE_VERSION} VERSION_LESS "3.16.0")
macro(CHECK_OBJC_SOURCE_COMPILES SOURCE VAR)
set(PREV_REQUIRED_DEFS "${CMAKE_REQUIRED_DEFINITIONS}")
set(CMAKE_REQUIRED_DEFINITIONS "-x objective-c ${PREV_REQUIRED_DEFS}")
CHECK_C_SOURCE_COMPILES(${SOURCE} ${VAR})
set(CMAKE_REQUIRED_DEFINITIONS "${PREV_REQUIRED_DEFS}")
endmacro()
else()
include(CheckOBJCSourceCompiles)
if (APPLE)
enable_language(OBJC)
endif()
endif()
if(CMAKE_VERSION VERSION_LESS 3.13.0)
macro(target_link_directories _TARGET _SCOPE)
link_directories(${ARGN})
endmacro()
endif()

View File

@@ -48,6 +48,7 @@ macro(CheckDLOPEN)
int main(int argc, char **argv) {
void *handle = dlopen(\"\", RTLD_NOW);
const char *loaderror = (char *) dlerror();
return 0;
}" HAVE_DLOPEN)
set(CMAKE_REQUIRED_LIBRARIES)
endif()
@@ -57,8 +58,7 @@ macro(CheckO_CLOEXEC)
check_c_source_compiles("
#include <fcntl.h>
int flag = O_CLOEXEC;
int main(void) {
}" HAVE_O_CLOEXEC)
int main(int argc, char **argv) { return 0; }" HAVE_O_CLOEXEC)
endmacro()
# Requires:
@@ -68,12 +68,12 @@ macro(CheckOSS)
set(OSS_HEADER_FILE "sys/soundcard.h")
check_c_source_compiles("
#include <sys/soundcard.h>
int main() { int arg = SNDCTL_DSP_SETFRAGMENT; }" OSS_FOUND)
int main(int argc, char **argv) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }" OSS_FOUND)
if(NOT OSS_FOUND)
set(OSS_HEADER_FILE "soundcard.h")
check_c_source_compiles("
#include <soundcard.h>
int main() { int arg = SNDCTL_DSP_SETFRAGMENT; }" OSS_FOUND)
int main(int argc, char **argv) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }" OSS_FOUND)
endif()
if(OSS_FOUND)
@@ -174,7 +174,7 @@ macro(CheckPulseAudio)
set(SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC "\"${PULSE_SIMPLE_LIB_SONAME}\"")
set(HAVE_PULSEAUDIO_SHARED TRUE)
else()
list(APPEND EXTRA_LDFLAGS ${PKG_sPULSEAUDIO_LDFLAGS})
list(APPEND EXTRA_LDFLAGS ${PKG_PULSEAUDIO_LDFLAGS})
endif()
set(HAVE_SDL_AUDIO TRUE)
endif()
@@ -418,7 +418,7 @@ macro(CheckX11)
check_include_file(X11/extensions/Xinerama.h HAVE_XINERAMA_H)
check_include_file(X11/extensions/XInput2.h HAVE_XINPUT2_H)
check_include_file(X11/extensions/Xrandr.h HAVE_XRANDR_H)
check_include_file(X11/extensions/Xfixes.h HAVE_XFIXES_H)
check_include_file(X11/extensions/Xfixes.h HAVE_XFIXES_H_)
check_include_file(X11/extensions/Xrender.h HAVE_XRENDER_H)
check_include_file(X11/extensions/scrnsaver.h HAVE_XSS_H)
check_include_file(X11/extensions/shape.h HAVE_XSHAPE_H)
@@ -467,6 +467,8 @@ macro(CheckX11)
else()
list(APPEND EXTRA_LIBS ${X11_LIB} ${XEXT_LIB})
endif()
else()
list(APPEND EXTRA_LIBS ${X11_LIB} ${XEXT_LIB})
endif()
set(CMAKE_REQUIRED_LIBRARIES ${X11_LIB} ${X11_LIB})
@@ -479,7 +481,8 @@ macro(CheckX11)
XGenericEventCookie *cookie = &event.xcookie;
XNextEvent(display, &event);
XGetEventData(display, cookie);
XFreeEventData(display, cookie); }" HAVE_XGENERICEVENT)
XFreeEventData(display, cookie);
return 0; }" HAVE_XGENERICEVENT)
if(HAVE_XGENERICEVENT)
set(SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1)
endif()
@@ -527,17 +530,25 @@ macro(CheckX11)
#include <X11/extensions/XInput2.h>
int event_type = XI_TouchBegin;
XITouchClassInfo *t;
Status XIAllowTouchEvents(Display *a,int b,unsigned int c,Window d,int f)
{
Status XIAllowTouchEvents(Display *a,int b,unsigned int c,Window d,int f) {
return (Status)0;
}
int main(int argc, char **argv) {}" HAVE_XINPUT2_MULTITOUCH)
int main(int argc, char **argv) { return 0; }" HAVE_XINPUT2_MULTITOUCH)
if(HAVE_XINPUT2_MULTITOUCH)
set(SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH 1)
endif()
endif()
# check along with XInput2.h because we use Xfixes with XIBarrierReleasePointer
if(SDL_X11_XFIXES AND HAVE_XFIXES_H_ AND HAVE_XINPUT2_H)
check_c_source_compiles("
#include <X11/Xlib.h>
#include <X11/Xproto.h>
#include <X11/extensions/XInput2.h>
#include <X11/extensions/Xfixes.h>
BarrierEventID b;
int main(int argc, char **argv) { return 0; }" HAVE_XFIXES_H)
endif()
if(SDL_X11_XFIXES AND HAVE_XFIXES_H AND HAVE_XINPUT2_H)
if(HAVE_X11_SHARED AND XFIXES_LIB)
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES "\"${XFIXES_LIB_SONAME}\"")
@@ -621,7 +632,7 @@ endmacro()
# - HAVE_SDL_LOADSO opt
macro(CheckWayland)
if(SDL_WAYLAND)
pkg_check_modules(WAYLAND wayland-client wayland-egl wayland-cursor egl "xkbcommon>=0.5.0")
pkg_check_modules(WAYLAND "wayland-client>=1.18" wayland-egl wayland-cursor egl "xkbcommon>=0.5.0")
if(WAYLAND_FOUND)
find_program(WAYLAND_SCANNER NAMES wayland-scanner REQUIRED)
@@ -637,11 +648,11 @@ macro(CheckWayland)
endif()
string(REPLACE "wayland-scanner " "" WAYLAND_SCANNER_VERSION ${WAYLAND_SCANNER_VERSION})
string(COMPARE GREATER_EQUAL ${WAYLAND_SCANNER_VERSION} "1.15.0" WAYLAND_SCANNER_1_15_FOUND)
if(WAYLAND_SCANNER_1_15_FOUND)
set(WAYLAND_SCANNER_CODE_MODE "private-code")
else()
string(COMPARE LESS ${WAYLAND_SCANNER_VERSION} "1.15.0" WAYLAND_SCANNER_PRE_1_15)
if(WAYLAND_SCANNER_PRE_1_15)
set(WAYLAND_SCANNER_CODE_MODE "code")
else()
set(WAYLAND_SCANNER_CODE_MODE "private-code")
endif()
endif()
@@ -766,12 +777,12 @@ macro(CheckVivante)
if(SDL_VIVANTE)
check_c_source_compiles("
#include <gc_vdk.h>
int main(int argc, char** argv) {}" HAVE_VIVANTE_VDK)
int main(int argc, char** argv) { return 0; }" HAVE_VIVANTE_VDK)
check_c_source_compiles("
#define LINUX
#define EGL_API_FB
#include <EGL/eglvivante.h>
int main(int argc, char** argv) {}" HAVE_VIVANTE_EGL_FB)
int main(int argc, char** argv) { return 0; }" HAVE_VIVANTE_EGL_FB)
if(HAVE_VIVANTE_VDK OR HAVE_VIVANTE_EGL_FB)
set(HAVE_VIVANTE TRUE)
set(HAVE_SDL_VIDEO TRUE)
@@ -781,7 +792,9 @@ macro(CheckVivante)
set(SDL_VIDEO_DRIVER_VIVANTE 1)
if(HAVE_VIVANTE_VDK)
set(SDL_VIDEO_DRIVER_VIVANTE_VDK 1)
list(APPEND EXTRA_LIBS VDK VIVANTE)
find_library(VIVANTE_LIBRARY REQUIRED NAMES VIVANTE vivante drm_vivante)
find_library(VIVANTE_VDK_LIBRARY VDK REQUIRED)
list(APPEND EXTRA_LIBS ${VIVANTE_LIBRARY} ${VIVANTE_VDK_LIBRARY})
else()
set(SDL_CFLAGS "${SDL_CFLAGS} -DLINUX -DEGL_API_FB")
list(APPEND EXTRA_LIBS EGL)
@@ -796,7 +809,7 @@ macro(CheckGLX)
if(SDL_OPENGL)
check_c_source_compiles("
#include <GL/glx.h>
int main(int argc, char** argv) {}" HAVE_OPENGL_GLX)
int main(int argc, char** argv) { return 0; }" HAVE_OPENGL_GLX)
if(HAVE_OPENGL_GLX)
set(SDL_VIDEO_OPENGL_GLX 1)
endif()
@@ -808,15 +821,14 @@ endmacro()
macro(CheckEGL)
if (SDL_OPENGL OR SDL_OPENGLES)
pkg_check_modules(EGL egl)
string(REPLACE "-D_THREAD_SAFE;" "-D_THREAD_SAFE=1;" EGL_CFLAGS "${EGL_CFLAGS}")
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${EGL_CFLAGS}")
set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} ${EGL_CFLAGS}")
check_c_source_compiles("
#define EGL_API_FB
#define MESA_EGL_NO_X11_HEADERS
#define EGL_NO_X11
#include <EGL/egl.h>
#include <EGL/eglext.h>
int main (int argc, char** argv) {}" HAVE_OPENGL_EGL)
int main (int argc, char** argv) { return 0; }" HAVE_OPENGL_EGL)
if(HAVE_OPENGL_EGL)
set(SDL_VIDEO_OPENGL_EGL 1)
endif()
@@ -830,7 +842,7 @@ macro(CheckOpenGL)
check_c_source_compiles("
#include <GL/gl.h>
#include <GL/glext.h>
int main(int argc, char** argv) {}" HAVE_OPENGL)
int main(int argc, char** argv) { return 0; }" HAVE_OPENGL)
if(HAVE_OPENGL)
set(SDL_VIDEO_OPENGL 1)
set(SDL_VIDEO_RENDER_OGL 1)
@@ -845,7 +857,7 @@ macro(CheckOpenGLES)
check_c_source_compiles("
#include <GLES/gl.h>
#include <GLES/glext.h>
int main (int argc, char** argv) {}" HAVE_OPENGLES_V1)
int main (int argc, char** argv) { return 0; }" HAVE_OPENGLES_V1)
if(HAVE_OPENGLES_V1)
set(HAVE_OPENGLES TRUE)
set(SDL_VIDEO_OPENGL_ES 1)
@@ -854,7 +866,7 @@ macro(CheckOpenGLES)
check_c_source_compiles("
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
int main (int argc, char** argv) {}" HAVE_OPENGLES_V2)
int main (int argc, char** argv) { return 0; }" HAVE_OPENGLES_V2)
if(HAVE_OPENGLES_V2)
set(HAVE_OPENGLES TRUE)
set(SDL_VIDEO_OPENGL_ES2 1)
@@ -1161,10 +1173,12 @@ macro(CheckHIDAPI)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBUSB_CFLAGS}")
if(HIDAPI_ONLY_LIBUSB)
list(APPEND EXTRA_LIBS ${LIBUSB_LIBS})
elseif(OS2)
set(SDL_LIBUSB_DYNAMIC "\"usb100.dll\"")
else()
# libusb is loaded dynamically, so don't add it to EXTRA_LIBS
FindLibraryAndSONAME("usb-1.0")
set(SDL_LIBUSB_DYNAMIC "\"${USB_LIB_SONAME}\"")
set(SDL_LIBUSB_DYNAMIC "\"${USB_1.0_LIB_SONAME}\"")
endif()
endif()
endif()
@@ -1212,7 +1226,11 @@ macro(CheckRPI)
set(CMAKE_REQUIRED_LIBRARIES "${VIDEO_RPI_LIBRARIES}")
check_c_source_compiles("
#include <bcm_host.h>
int main(int argc, char **argv) {}" HAVE_RPI)
#include <EGL/eglplatform.h>
int main(int argc, char **argv) {
EGL_DISPMANX_WINDOW_T window;
bcm_host_init();
}" HAVE_RPI)
set(CMAKE_REQUIRED_FLAGS "${ORIG_CMAKE_REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_LIBRARIES)

3497
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -22,9 +22,9 @@ dnl Set various version strings - taken gratefully from the GTk sources
#
SDL_MAJOR_VERSION=2
SDL_MINOR_VERSION=0
SDL_MICRO_VERSION=18
SDL_MICRO_VERSION=22
SDL_INTERFACE_AGE=0
SDL_BINARY_AGE=18
SDL_BINARY_AGE=22
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
AC_SUBST(SDL_MAJOR_VERSION)
@@ -244,7 +244,6 @@ case "$host" in
dnl Skip this on platforms where it is just simply busted.
*-*-openbsd*)
;;
*)
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -Wl,--no-undefined"
@@ -319,15 +318,9 @@ if test x$enable_libc = xyes; then
dnl Check for defines
AC_CHECK_DEFINE(M_PI, math.h)
dnl Checks for library functions.
case "$host" in
*-*-cygwin* | *-*-mingw*)
;;
*)
AC_FUNC_ALLOCA
;;
esac
dnl Checks for library functions.
AC_FUNC_MEMCMP
if test x$ac_cv_func_memcmp_working = xyes; then
AC_DEFINE(HAVE_MEMCMP, 1, [ ])
@@ -422,9 +415,18 @@ SOURCES="$SOURCES $srcdir/src/locale/*.c"
dnl Enable/disable various subsystems of the SDL library
case "$host" in
*-*-emscripten*)
default_atomic=no
;;
*)
default_atomic=yes
;;
esac
AC_ARG_ENABLE(atomic,
[AS_HELP_STRING([--enable-atomic], [Enable the atomic operations subsystem [default=yes]])],
, enable_atomic=yes)
, enable_atomic=$default_atomic)
if test x$enable_atomic != xyes; then
AC_DEFINE(SDL_ATOMIC_DISABLED, 1, [ ])
else
@@ -534,6 +536,22 @@ if test x$enable_file != xyes; then
else
SUMMARY_modules="${SUMMARY_modules} file"
fi
AC_ARG_ENABLE(misc,
[AS_HELP_STRING([--enable-misc], [Enable the misc subsystem [default=yes]])],
, enable_misc=yes)
if test x$enable_misc != xyes; then
AC_DEFINE(SDL_MISC_DISABLED, 1, [ ])
else
SUMMARY_modules="${SUMMARY_modules} misc"
fi
AC_ARG_ENABLE(locale,
[AS_HELP_STRING([--enable-locale], [Enable the locale subsystem [default=yes]])],
, enable_locale=yes)
if test x$enable_locale != xyes; then
AC_DEFINE(SDL_LOCALE_DISABLED, 1, [ ])
else
SUMMARY_modules="${SUMMARY_modules} locale"
fi
AC_ARG_ENABLE(loadso,
[AS_HELP_STRING([--enable-loadso], [Enable the shared object loading subsystem [default=yes]])],
, enable_loadso=yes)
@@ -1280,6 +1298,7 @@ CheckDiskAudio()
AC_DEFINE(SDL_AUDIO_DRIVER_DISK, 1, [ ])
SOURCES="$SOURCES $srcdir/src/audio/disk/*.c"
SUMMARY_audio="${SUMMARY_audio} disk"
have_audio=yes
fi
}
@@ -1293,6 +1312,7 @@ CheckDummyAudio()
AC_DEFINE(SDL_AUDIO_DRIVER_DUMMY, 1, [ ])
SOURCES="$SOURCES $srcdir/src/audio/dummy/*.c"
SUMMARY_audio="${SUMMARY_audio} dummy"
have_audio=yes
fi
}
@@ -1535,7 +1555,7 @@ CheckWayland()
video_wayland=no
if test x$video_opengl_egl = xyes && \
test x$video_opengles_v2 = xyes; then
if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-egl wayland-cursor egl 'xkbcommon >= 0.5.0'; then
if $PKG_CONFIG --exists 'wayland-client >= 1.18' wayland-scanner wayland-egl wayland-cursor egl 'xkbcommon >= 0.5.0'; then
WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
@@ -1566,7 +1586,7 @@ dnl FIXME: Do BSD and OS X need special cases?
wayland_client_lib=[`find_lib "libwayland-client.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
wayland_egl_lib=[`find_lib "libwayland-egl.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
if test x$wayland_egl_lib = x; then
dnl This works in Ubuntu 13.10, maybe others
# This works in Ubuntu 13.10, maybe others
wayland_egl_lib=[`find_lib "mesa-egl/libwayland-egl.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
fi
wayland_cursor_lib=[`find_lib "libwayland-cursor.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
@@ -1606,39 +1626,31 @@ dnl FIXME: Do BSD and OS X need special cases?
dnl See if libdecor is available
AC_ARG_ENABLE(libdecor,
[AS_HELP_STRING([--enable-libdecor], [use libdecor for Wayland client-side decorations [default=yes]])],
, enable_libdecor=yes)
[AS_HELP_STRING([--enable-libdecor], [use libdecor for Wayland client-side decorations [default=yes]])],, enable_libdecor=yes)
if test x$enable_libdecor = xyes; then
AC_MSG_CHECKING(for libdecor support)
AS_IF([$PKG_CONFIG --exists libdecor-0],
[video_libdecor=yes],
[video_libdecor=no])
AC_MSG_RESULT($video_libdecor)
PKG_CHECK_MODULES([DECOR], [libdecor-0], video_libdecor=yes, video_libdecor=no)
if test x$video_libdecor = xyes; then
EXTRA_CFLAGS="$EXTRA_CFLAGS `$PKG_CONFIG --cflags libdecor-0`"
EXTRA_CFLAGS="$EXTRA_CFLAGS $DECOR_CFLAGS"
AC_DEFINE(HAVE_LIBDECOR_H, 1, [ ])
AC_ARG_ENABLE(libdecor-shared,
[AS_HELP_STRING([--enable-libdecor-shared], [dynamically load libdecor [default=yes]])],
, enable_libdecor_shared=yes)
[AS_HELP_STRING([--enable-libdecor-shared], [dynamically load libdecor [default=yes]])],, enable_libdecor_shared=yes)
decor_lib=[`find_lib "libdecor-0.so.*" "$DECOR_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
if test x$enable_wayland_shared != xyes; then
enable_libdecor_shared=no
fi
decor_lib=[`find_lib "libdecor-0.so.*" "" | sed 's/.*\/\(.*\)/\1/; q'`]
if test x$have_loadso != xyes && \
test x$enable_libdecor_shared = xyes; then
AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic libdecor loading])
fi
if test x$have_loadso = xyes && \
test x$enable_libdecor_shared = xyes && test x$decor_lib != x; then
echo "-- dynamic libdecor -> $decor_lib"
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR, "$decor_lib", [ ])
else
EXTRA_LDFLAGS="$EXTRA_LDFLAGS `$PKG_CONFIG --libs libdecor-0`"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $DECOR_LIBS"
fi
fi
fi
@@ -1666,8 +1678,10 @@ CheckNativeClient()
SDLMAIN_SOURCES="$srcdir/src/main/nacl/*.c"
SOURCES="$SOURCES $srcdir/src/audio/nacl/*.c"
SUMMARY_audio="${SUMMARY_audio} nacl"
have_audio=yes
SOURCES="$SOURCES $srcdir/src/video/nacl/*.c"
SUMMARY_video="${SUMMARY_video} nacl opengles2"
have_video=yes
],[])
}
@@ -1717,6 +1731,7 @@ CheckRPI()
SOURCES="$SOURCES $srcdir/src/video/raspberry/*.c"
AC_DEFINE(SDL_VIDEO_DRIVER_RPI, 1, [ ])
SUMMARY_video="${SUMMARY_video} rpi"
have_video=yes
fi
fi
}
@@ -1834,7 +1849,6 @@ CheckX11()
fi
have_video=yes
dnl AC_CHECK_LIB(X11, XGetEventData, AC_DEFINE(SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS, 1, [Have XGenericEvent]))
AC_MSG_CHECKING([for XGenericEvent])
have_XGenericEvent=no
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@@ -1973,12 +1987,16 @@ XITouchClassInfo *t;
if test x$enable_video_x11_xfixes = xyes; then
definitely_enable_video_x11_xfixes=no
# check along with XInput2.h because we use Xfixes with XIBarrierReleasePointer
AC_CHECK_HEADER(X11/extensions/Xfixes.h,
have_xfixes_h_hdr=yes,
have_xfixes_h_hdr=no,
[#include <X11/Xlib.h>
AC_MSG_CHECKING(for X11/extensions/Xfixes.h)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <X11/Xlib.h>
#include <X11/Xproto.h>
#include <X11/extensions/XInput2.h>])
#include <X11/extensions/XInput2.h>
#include <X11/extensions/Xfixes.h>]],
[BarrierEventID b;])],
[have_xfixes_h_hdr=yes],
[have_xfixes_h_hdr=no])
AC_MSG_RESULT($have_xfixes_h_hdr)
if test x$have_xfixes_h_hdr = xyes; then
if test x$enable_x11_shared = xyes && test x$xfixes_lib != x ; then
echo "-- dynamic libXfixes -> $xfixes_lib"
@@ -2321,7 +2339,7 @@ CheckKMSDRM()
AC_MSG_RESULT($kmsdrm_shared)
if test x$kmsdrm_shared = xyes; then
echo "-- dynamic libdrm -> $drm_lib"
echo "-- dynamic libgmb -> $gbm_lib"
echo "-- dynamic libgbm -> $gbm_lib"
fi
have_video=yes
fi
@@ -2670,7 +2688,6 @@ CheckInputEvents()
dnl See if we can use the kernel kd.h header
CheckInputKD()
{
AC_MSG_CHECKING(for Linux kd.h)
use_input_kd=no
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@@ -3181,6 +3198,31 @@ CheckWINDOWS()
# This fixes Windows stack alignment with newer GCC
CheckStackBoundary
# headers needed elsewhere
AC_CHECK_HEADER(tpcshrd.h,have_tpcshrd_h=yes)
if test x$have_tpcshrd_h = xyes; then
AC_DEFINE(HAVE_TPCSHRD_H, 1, [ ])
fi
AC_CHECK_HEADER(roapi.h,have_roapi_h=yes)
if test x$have_roapi_h = xyes; then
AC_DEFINE(HAVE_ROAPI_H, 1, [ ])
fi
}
dnl Determine whether the compiler can produce OS/2 executables
CheckOS2()
{
AC_MSG_CHECKING(OS/2 compiler)
have_os2_gcc=no
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <os2.h>]],
[])],[have_os2_gcc=yes],[])
AC_MSG_RESULT($have_os2_gcc)
if test x$have_os2_gcc != xyes; then
AC_MSG_ERROR([
*** Your compiler ($CC) does not produce OS/2 executables!
])
fi
}
dnl Find the DirectX includes and libraries
@@ -3252,7 +3294,14 @@ XINPUT_STATE_EX s1;
fi
fi
AC_CHECK_HEADER(windows.gaming.input.h, have_wgi=yes)
AC_MSG_CHECKING(for windows.gaming.input.h)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define COBJMACROS
#include <windows.gaming.input.h>
__x_ABI_CWindows_CGaming_CInput_CIGamepadStatics2 *s2;
]],[])], [have_wgi=yes],[have_wgi=no])
AC_MSG_RESULT($have_wgi)
if test x$have_wgi = xyes; then
AC_DEFINE(HAVE_WINDOWS_GAMING_INPUT_H, 1, [ ])
fi
@@ -3463,6 +3512,9 @@ CheckHIDAPI()
enable_hidapi_libusb=yes
require_hidapi_libusb=yes
;;
*-*-os2* )
enable_hidapi_libusb=yes
;;
esac
hidapi_support=yes
@@ -3495,6 +3547,9 @@ CheckHIDAPI()
*-*-cygwin* | *-*-mingw* )
libusb_lib="libusb-1.0.dll"
;;
*-*-os2* )
libusb_lib="usb100.dll"
;;
esac
if test x$libusb_lib = x; then
libusb_lib=[`find_lib "libusb-1.0.so.*" "" | sed 's/.*\/\(.*\)/\1/; q'`]
@@ -3611,6 +3666,7 @@ case "$host" in
SOURCES="$SOURCES $srcdir/src/core/android/*.c $srcdir/src/video/android/*.c"
AC_DEFINE(SDL_VIDEO_DRIVER_ANDROID, 1, [ ])
SUMMARY_video="${SUMMARY_video} android"
have_video=yes
fi
;;
*-*-linux*) ARCH=linux ;;
@@ -3692,12 +3748,16 @@ case "$host" in
CheckRPATH
CheckVivanteVideo
# Set up files for the misc library
if test x$enable_misc = xyes; then
SOURCES="$SOURCES $srcdir/src/misc/unix/*.c"
have_misc=yes
fi
# Set up files for the locale library
if test x$enable_locale = xyes; then
SOURCES="$SOURCES $srcdir/src/locale/unix/*.c"
have_locale=yes
fi
# Set up files for the audio library
if test x$enable_audio = xyes; then
case $ARCH in
@@ -3875,12 +3935,16 @@ case "$host" in
# Set up the core platform files
SOURCES="$SOURCES $srcdir/src/core/windows/*.c"
# Set up files for the misc library
if test x$enable_misc = xyes; then
SOURCES="$SOURCES $srcdir/src/misc/windows/*.c"
have_misc=yes
fi
# Use the Windows locale APIs.
if test x$enable_locale = xyes; then
SOURCES="$SOURCES $srcdir/src/locale/windows/*.c"
have_locale=yes
fi
# Set up files for the video library
if test x$enable_video = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_WINDOWS, 1, [ ])
@@ -4009,14 +4073,12 @@ case "$host" in
SDL_LIBS="-lcygwin $SDL_LIBS"
fi
;;
dnl BeOS support removed after SDL 2.0.1. Haiku still works. --ryan.
*-*-beos*)
AC_MSG_ERROR([
*** BeOS support has been removed as of SDL 2.0.2.
])
;;
*-*-haiku*)
ARCH=haiku
ac_default_prefix=/boot/system
@@ -4061,14 +4123,16 @@ case "$host" in
SOURCES="$SOURCES $srcdir/src/filesystem/haiku/*.cc"
have_filesystem=yes
fi
# Set up files for the misc library
if test x$enable_misc = xyes; then
SOURCES="$SOURCES $srcdir/src/misc/haiku/*.cc"
have_misc=yes
fi
# Set up files for the locale library
if test x$enable_locale = xyes; then
SOURCES="$SOURCES $srcdir/src/locale/haiku/*.cc"
have_locale=yes
fi
# The Haiku platform requires special setup.
SOURCES="$srcdir/src/main/haiku/*.cc $SOURCES"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
@@ -4088,13 +4152,16 @@ case "$host" in
CheckVulkan
CheckPTHREAD
# Set up files for the misc library
if test x$enable_misc = xyes; then
SOURCES="$SOURCES $srcdir/src/misc/ios/*.m"
have_misc=yes
fi
# Set up files for the locale library
if test x$enable_locale = xyes; then
SOURCES="$SOURCES $srcdir/src/locale/macosx/*.m"
have_locale=yes
fi
# Set up files for the audio library
if test x$enable_audio = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO, 1, [ ])
@@ -4155,6 +4222,8 @@ case "$host" in
AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES, 1, [ ])
AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
SOURCES="$SOURCES $srcdir/src/video/uikit/*.m"
SUMMARY_video="${SUMMARY_video} uikit"
have_video=yes
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm -liconv -lobjc"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AVFoundation"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AudioToolbox"
@@ -4200,13 +4269,16 @@ case "$host" in
CheckPTHREAD
CheckHIDAPI
# Set up files for the misc library
if test x$enable_misc = xyes; then
SOURCES="$SOURCES $srcdir/src/misc/macosx/*.m"
have_misc=yes
fi
# Set up files for the locale library
if test x$enable_locale = xyes; then
SOURCES="$SOURCES $srcdir/src/locale/macosx/*.m"
have_locale=yes
fi
# Set up files for the audio library
if test x$enable_audio = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO, 1, [ ])
@@ -4314,6 +4386,12 @@ case "$host" in
CheckClockGettime
CheckEmscriptenGLES
# Set up files for the misc library
if test x$enable_misc = xyes; then
SOURCES="$SOURCES $srcdir/src/misc/emscripten/*.c"
have_misc=yes
fi
# Set up files for the power library
if test x$enable_power = xyes; then
AC_DEFINE(SDL_POWER_EMSCRIPTEN, 1, [ ])
@@ -4321,7 +4399,7 @@ case "$host" in
have_power=yes
fi
# Set up files for the power library
# Set up files for the joystick library
if test x$enable_joystick = xyes; then
AC_DEFINE(SDL_JOYSTICK_EMSCRIPTEN, 1, [ ])
SOURCES="$SOURCES $srcdir/src/joystick/emscripten/*.c"
@@ -4341,8 +4419,10 @@ case "$host" in
have_timers=yes
fi
# Set up files for the locale library
if test x$enable_locale = xyes; then
SOURCES="$SOURCES $srcdir/src/locale/emscripten/*.c"
have_locale=yes
fi
;;
*-*-riscos*)
ARCH=riscos
@@ -4358,9 +4438,11 @@ case "$host" in
CheckPTHREAD
CheckClockGettime
# Set up files for the misc library
if test x$enable_misc = xyes; then
SOURCES="$SOURCES $srcdir/src/misc/riscos/*.c"
have_misc=yes
fi
# Set up files for the video library
if test x$enable_video = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_RISCOS, 1, [ ])
@@ -4381,6 +4463,83 @@ case "$host" in
have_timers=yes
fi
;;
*-*-os2*)
ARCH=os2
if test "$build" != "$host"; then # cross-compiling
# Default cross-compile location
ac_default_prefix=/@unixroot/usr/local/cross-tools/$host
else
# Look for the location of the tools and install there
if test "$BUILD_PREFIX" != ""; then
ac_default_prefix=$BUILD_PREFIX
fi
fi
enable_static=no # disable static builds
EXTRA_CFLAGS="$EXTRA_CFLAGS -DBUILD_SDL -DOS2EMX_PLAIN_CHAR"
CheckOS2
CheckDeclarationAfterStatement
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
CheckHIDAPI
# Set up the core platform files
SOURCES="$SOURCES $srcdir/src/core/os2/*.c"
if test x$ac_cv_func_iconv != xyes -o x$ac_cv_header_iconv_h != xyes; then
SOURCES="$SOURCES $srcdir/src/core/os2/geniconv/*.c"
fi
# Use the Unix locale APIs.
if test x$enable_locale = xyes; then
SOURCES="$SOURCES $srcdir/src/locale/unix/*.c"
have_locale=yes
fi
# Set up files for the video library
if test x$enable_video = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_OS2, 1, [ ])
SOURCES="$SOURCES $srcdir/src/video/os2/*.c"
have_video=yes
SUMMARY_video="${SUMMARY_video} os/2"
fi
# Set up files for the audio library
if test x$enable_audio = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_OS2, 1, [ ])
SOURCES="$SOURCES $srcdir/src/audio/os2/*.c"
have_audio=yes
SUMMARY_audio="${SUMMARY_audio} os/2"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lmmpm2"
fi
# Set up files for the thread library
if test x$enable_threads = xyes; then
AC_DEFINE(SDL_THREAD_OS2, 1, [ ])
SOURCES="$SOURCES $srcdir/src/thread/os2/*.c"
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
have_threads=yes
fi
# Set up files for the timer library
if test x$enable_timers = xyes; then
AC_DEFINE(SDL_TIMER_OS2, 1, [ ])
SOURCES="$SOURCES $srcdir/src/timer/os2/*.c"
have_timers=yes
fi
# Set up files for the shared object loading library
if test x$enable_loadso = xyes; then
AC_DEFINE(SDL_LOADSO_OS2, 1, [ ])
SOURCES="$SOURCES $srcdir/src/loadso/os2/*.c"
have_loadso=yes
fi
# Set up files for the filesystem library
if test x$enable_filesystem = xyes; then
AC_DEFINE(SDL_FILESYSTEM_OS2, 1, [ ])
SOURCES="$SOURCES $srcdir/src/filesystem/os2/*.c"
have_filesystem=yes
fi
# Set up files for the joystick library
if test x$enable_joystick = xyes; then
AC_DEFINE(SDL_JOYSTICK_OS2, 1, [ ])
SOURCES="$SOURCES $srcdir/src/joystick/os2/*.c"
have_joystick=yes
fi
;;
*)
AC_MSG_ERROR([
*** Unsupported host: Please add to configure.ac
@@ -4409,10 +4568,28 @@ AC_SUBST([INSTALL_SDL2_CONFIG], [$enable_sdl2_config])
# Verify that we have all the platform specific files we need
if test x$have_audio != xyes; then
if test x$enable_audio = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_DUMMY, 1, [ ])
fi
SOURCES="$SOURCES $srcdir/src/audio/dummy/*.c"
fi
if test x$have_video != xyes; then
if test x$enable_video = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_DUMMY, 1, [ ])
fi
SOURCES="$SOURCES $srcdir/src/video/dummy/*.c"
fi
if test x$have_misc != xyes; then
if test x$enable_misc = xyes; then
AC_DEFINE(SDL_MISC_DUMMY, 1, [ ])
fi
SOURCES="$SOURCES $srcdir/src/misc/dummy/*.c"
fi
if test x$have_locale != xyes; then
if test x$enable_locale = xyes; then
AC_DEFINE(SDL_LOCALE_DUMMY, 1, [ ])
fi
SOURCES="$SOURCES $srcdir/src/locale/dummy/*.c"
fi
if test x$have_joystick != xyes; then
@@ -4441,19 +4618,19 @@ if test x$have_threads != xyes; then
fi
if test x$have_timers != xyes; then
if test x$enable_timers = xyes; then
AC_DEFINE(SDL_TIMERS_DISABLED, 1, [ ])
AC_DEFINE(SDL_TIMER_DUMMY, 1, [ ])
fi
SOURCES="$SOURCES $srcdir/src/timer/dummy/*.c"
fi
if test x$have_filesystem != xyes; then
if test x$enable_filesystem = xyes; then
AC_DEFINE(SDL_FILESYSTEM_DISABLED, 1, [ ])
AC_DEFINE(SDL_FILESYSTEM_DUMMY, 1, [ ])
fi
SOURCES="$SOURCES $srcdir/src/filesystem/dummy/*.c"
fi
if test x$have_loadso != xyes; then
if test x$enable_loadso = xyes; then
AC_DEFINE(SDL_LOADSO_DISABLED, 1, [ ])
AC_DEFINE(SDL_LOADSO_DUMMY, 1, [ ])
fi
SOURCES="$SOURCES $srcdir/src/loadso/dummy/*.c"
fi

174
debian/changelog vendored
View File

@@ -1,174 +0,0 @@
libsdl2 (2.0.18) UNRELEASED; urgency=low
* Updated SDL to version 2.0.18
-- Sam Lantinga <slouken@libsdl.org> Fri, 26 Nov 2021 08:07:21 -0800
libsdl2 (2.0.17) UNRELEASED; urgency=low
* Updated SDL to version 2.0.17
-- Sam Lantinga <slouken@libsdl.org> Tue, 10 Aug 2021 15:00:14 -0800
libsdl2 (2.0.16) UNRELEASED; urgency=low
* Updated SDL to version 2.0.16
-- Sam Lantinga <slouken@libsdl.org> Sat, 31 Jul 2021 13:27:38 -0800
libsdl2 (2.0.15) UNRELEASED; urgency=low
* Updated SDL to version 2.0.15 for development builds
-- Sam Lantinga <slouken@libsdl.org> Tue, 22 Dec 2020 10:29:01 -0800
libsdl2 (2.0.14) UNRELEASED; urgency=low
* Updated SDL to version 2.0.14
-- Sam Lantinga <slouken@libsdl.org> Tue, 8 Dec 2020 17:54:33 -0800
libsdl2 (2.0.13) UNRELEASED; urgency=low
* Updated SDL to version 2.0.13 for development builds
-- Sam Lantinga <slouken@libsdl.org> Tue, 10 Mar 2020 18:24:22 -0800
libsdl2 (2.0.12) UNRELEASED; urgency=low
* Updated SDL to version 2.0.12
-- Sam Lantinga <slouken@libsdl.org> Sun, 1 Mar 2020 14:57:07 -0800
libsdl2 (2.0.11) UNRELEASED; urgency=low
* Updated SDL to version 2.0.11 for development builds
-- Sam Lantinga <slouken@libsdl.org> Sun, 22 Sep 2019 10:33:03 -0800
libsdl2 (2.0.10) UNRELEASED; urgency=low
* Updated SDL to version 2.0.10
-- Sam Lantinga <slouken@libsdl.org> Mon, 17 Jun 2019 08:48:47 -0800
libsdl2 (2.0.9) UNRELEASED; urgency=low
* Updated SDL to version 2.0.9
-- Sam Lantinga <slouken@libsdl.org> Wed, 26 Sep 2018 10:02:21 -0800
libsdl2 (2.0.8) UNRELEASED; urgency=low
* Updated SDL to version 2.0.8
-- Sam Lantinga <slouken@libsdl.org> Sat, 4 Nov 2017 21:21:53 -0800
libsdl2 (2.0.7) UNRELEASED; urgency=low
* Updated SDL to version 2.0.7
-- Sam Lantinga <slouken@libsdl.org> Thu, 12 Oct 2017 08:01:16 -0800
libsdl2 (2.0.6) UNRELEASED; urgency=low
* Updated SDL to version 2.0.6
-- Sam Lantinga <slouken@libsdl.org> Sat, 9 Sep 2017 07:29:36 -0800
libsdl2 (2.0.5) UNRELEASED; urgency=low
* Updated SDL to version 2.0.5
-- Sam Lantinga <slouken@libsdl.org> Mon, 28 Nov 2016 07:32:52 -0800
libsdl2 (2.0.4) UNRELEASED; urgency=low
* Updated SDL to version 2.0.4
-- Sam Lantinga <slouken@libsdl.org> Thu, 07 Jan 2016 11:02:39 -0800
libsdl2 (2.0.3) UNRELEASED; urgency=low
* Updated SDL to version 2.0.3
-- Sam Lantinga <slouken@libsdl.org> Sun, 9 Mar 2014 10:35:54 -0800
libsdl2 (2.0.2) UNRELEASED; urgency=low
* Updated SDL to version 2.0.2
-- Sam Lantinga <slouken@libsdl.org> Sun, 9 Feb 2014 2:55:59 -0800
libsdl2 (2.0.1) UNRELEASED; urgency=low
* Updated SDL to version 2.0.1
-- Sam Lantinga <slouken@libsdl.org> Wed, 23 Oct 2013 16:31:38 -0800
libsdl2 (2.0.0) UNRELEASED; urgency=low
* SDL is now a native debian package.
* Removed udeb package
* Disabled DirectFB support by default, to avoid runtime dependencies
-- Sam Lantinga <slouken@libsdl.org> Fri, 15 Feb 2013 08:55:04 -0800
libsdl2 (2.0.0~20130127-1) UNRELEASED; urgency=low
* New upstream snapshot.
-- Sam Hocevar <sho@debian.org> Wed, 30 Jan 2013 23:01:12 +0100
libsdl2 (2.0.0~20130103-1) unstable; urgency=low
[ Manuel A. Fernandez Montecelo ]
* debian/control:
- Updating maintainers/permissions:
- Add myself and Felix Geyer
- Update Build-Depends:
- Remove a few obsolete items
- Add items added lately to libsdl1.2, such as libts (touch screen)
support
- Add "libsdl2-dbg", analog to libsdl1.2-dbg
- Change "XC-Package-Type: udeb" to "Package-Type"
* debian/compat: set level 9
* debian/source/format: Set to "3.0 (quilt)"
- Remove README.source, not needed with new format
* debian/sdl2-config.1: Fix typo, "progams"->"programs"
* debian/libsdl2-dev.install:
- Remove "usr/lib/*/*.la", discouraged
- Add man pages: "usr/share/man/man3/*"
* debian/libsdl2-dev.manpages: add file to install local "sdl2-config.1"
* debian/sources: Removed, possible obsolete file from long ago?
* debian/copyright:
- Upstream updated to zlib/libpng
- Copyright-file format conversion to 1.0
- Complete revamp and detailed research about copyright and licenses used,
it's very messy but hopefully complete
[ Felix Geyer ]
* Simplify debian/rules by using dh(1).
-- Manuel A. Fernandez Montecelo <manuel.montezelo@gmail.com> Sun, 27 Jan 2013 16:40:49 +0100
libsdl2 (2.0~20120220c-1) experimental; urgency=low
* Upstream version was renamed to 2.0 (Closes: #669367).
* New upstream snapshot (Closes: #671506).
* This package no longer conflicts with libsdl-1.2.
* debian/rules: add multiarch support (Closes: #669364).
* debian/patches/fix_joystick_misc_axes.diff: fix a joystick remapping
bug causing some axes to malfunction.
* debian/patches/external_header_paths.diff: provide additional CFLAGS
so that headers such as SDL_syswm.h can be included (Closes: #669363).
-- Sam Hocevar <sho@debian.org> Thu, 17 May 2012 19:03:59 +0200
libsdl-1.3 (1.3.0~20111204-1) experimental; urgency=low
* Initial upload from upstream snapshot.
-- Sam Hocevar <sho@debian.org> Sun, 04 Dec 2011 14:35:05 +0100

1
debian/compat vendored
View File

@@ -1 +0,0 @@
9

91
debian/control vendored
View File

@@ -1,91 +0,0 @@
Source: libsdl2
Priority: optional
Section: libs
Maintainer: Debian SDL packages maintainers <pkg-sdl-maintainers@lists.alioth.debian.org>
Uploaders: Barry deFreese <bdefreese@debian.org>,
Sam Hocevar <sho@debian.org>,
Manuel A. Fernandez Montecelo <manuel.montezelo@gmail.com>,
Felix Geyer <fgeyer@debian.org>,
Sam Lantinga <slouken@libsdl.org>
Standards-Version: 3.9.3
Build-Depends: debhelper (>= 9),
dh-autoreconf,
dpkg-dev (>= 1.16.1~),
fcitx-libs-dev [linux-any],
libasound2-dev [linux-any],
libdbus-1-dev,
libegl1-mesa-dev [!hurd-any],
libdrm-dev [linux-any],
libgl1-mesa-dev,
libgles-dev [!hurd-any],
libpulse-dev,
libudev-dev [linux-any],
libdbus-1-dev [linux-any],
libibus-1.0-dev[linux-any],
libpulse-dev,
libsndio-dev,
libudev-dev [linux-any],
libusb2-dev [kfreebsd-any],
libusbhid-dev [kfreebsd-any],
libwayland-dev [linux-any],
libx11-dev,
libxcursor-dev,
libxext-dev,
libxfixes-dev,
libxi-dev,
libxinerama-dev,
libxkbcommon-dev,
libxrandr-dev,
libxss-dev,
libxxf86vm-dev,
libxt-dev,
libxv-dev,
pkg-config,
libsamplerate0-dev,
wayland-protocols
Homepage: http://www.libsdl.org/
Package: libsdl2-2.0-0
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: ${misc:Depends},
${shlibs:Depends},
libudev1 [linux-any],
libdbus-1-3 [linux-any]
Conflicts: libsdl-1.3-0
Replaces: libsdl-1.3-0
Description: Simple DirectMedia Layer
SDL is a library that allows programs portable low level access to
a video framebuffer, audio output, mouse, and keyboard.
.
This package contains the shared library, compiled with X11 graphics drivers and OSS, ALSA and PulseAudio sound drivers.
Package: libsdl2-dev
Section: libdevel
Architecture: any
Multi-Arch: same
Depends: ${misc:Depends},
libsdl2-2.0-0 (= ${binary:Version}),
libc6-dev,
libgl1-mesa-dev
Conflicts: libsdl-1.3-dev
Replaces: libsdl-1.3-dev
Description: Simple DirectMedia Layer development files
SDL is a library that allows programs portable low level access to a video
framebuffer, audio output, mouse, and keyboard.
.
This package contains files needed if you wish to use the SDL library in your own programs.
Package: libsdl2-dbg
Priority: extra
Section: debug
Architecture: any
Multi-Arch: same
Depends: ${misc:Depends},
libsdl2-2.0-0 (= ${binary:Version}),
Description: Simple DirectMedia Layer debug files
SDL is a library that allows programs portable low level access to a video
framebuffer, audio output, mouse, and keyboard.
.
This package contains the debug symbols for the SDL library.

351
debian/copyright vendored
View File

@@ -1,351 +0,0 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: SDL
Upstream-Contact: Sam Lantinga <slouken@libsdl.org>
Source: http://www.libsdl.org/
Files: *
Copyright: 1997-2021 Sam Lantinga <slouken@libsdl.org>
License: zlib/libpng
Files: src/libm/*
Copyright: 1993 by Sun Microsystems, Inc. All rights reserved.
License: SunPro
Files: src/main/windows/SDL_windows_main.c
Copyright: 2021 Sam Lantinga
License: PublicDomain_Sam_Lantinga
Comment: SDL_main.c, placed in the public domain by Sam Lantinga 4/13/98
Files: src/render/mmx.h
Copyright: 1997-99 by H. Dietz and R. Fisher
License: zlib/libpng
Comment:
Copyright but no mention to license.
.
Included since long ago with SDL (and its Debian package) under directory
src/video/mmx.h
Files: src/render/SDL_yuv_sw.c
Copyright: 1995 Erik Corry
1995 The Regents of the University of California
1995 Brown University
License: BrownUn_UnCalifornia_ErikCorry
Files: src/test/SDL_test_md5.c
Copyright: 1997-2021 Sam Lantinga <slouken@libsdl.org>
1990 RSA Data Security, Inc.
License: zlib/libpng and RSA_Data_Security
Files: src/thread/windows/win_ce_semaphore.c
Copyright: 1998, Johnson M. Hart (with corrections 2001 by Rainer Loritz)
License: Johnson_M._Hart
Files: src/video/x11/imKStoUCS.c
src/video/x11/imKStoUCS.h
Copyright: 1994-2003 The XFree86 Project, Inc.
License: MIT/X11
Files: test/testhaptic.c
Copyright: 1997-2021 Sam Lantinga <slouken@libsdl.org>
2008 Edgar Simo Serra
License: BSD_3_clause
Files: test/testrumble.c
Copyright: 1997-2021 Sam Lantinga <slouken@libsdl.org>
2011 Edgar Simo Serra
License: BSD_3_clause
Files: test/shapes/*
Copyright: none
License: zlib/libpng
Comment: No specific information about the images
Files: Xcode/TemplatesForXcode*/*/main.c
Copyright: none
License: zlib/libpng
Comment: SDL files, no copyright or license notice
Files: Xcode/TemplatesForXcode*/*/atlantis/*
Copyright: 1993, 1994, Silicon Graphics, Inc.
License: SGI_atlantis
Files: Xcode/TemplatesForXcode*/*/atlantis/atlantis.c
Copyright: 1994 Mark J. Kilgard
1993, 1994, Silicon Graphics, Inc.
License: SGI_atlantis
Comment: See license for full copyright notice, this one is the same except for
the additional copyright holder
Files: Xcode/SDLTest/sdlcommon_prefix.h
Copyright: 2003 Darrell Walisser
License: zlib/libpng
Comment:
Created by Darrell Walisser on Wed Aug 06 2003.
Copyright (c) 2003 __MyCompanyName__. All rights reserved.
Files: debian/*
Copyright: 2011-2012, Manuel A. Fernandez Montecelo <manuel.montezelo@gmail.com>
2011-2012, Felix Geyer <debfx-pkg@fobos.de>
2011, Roman Vasiyarov <rvasiyarov@gmail.com>
2010, Jon Dowland <jmtd@debian.org>
2009, Barry deFreese <bdefreese@debian.org>
2007-2008, Aurelien Jarno <aurel32@debian.org>
2007-2008, Sam Hocevar (Debian packages) <sam+deb@zoy.org>
2002-2007, Josselin Mouette <joss@debian.org>
2001, Christian T. Steigies <cts@debian.org>
2001, Branden Robinson <branden@debian.org>
License: LGPL-2.1+
License: zlib/libpng
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
.
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
License: LGPL-2.1+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or (at
your option) any later version.
.
On Debian systems, the complete text of version 2.1 of the GNU Lesser
Public License can be found in '/usr/share/common-licenses/LGPL-2.1'.
License: MIT/X11
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is fur-
nished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.
Except as contained in this notice, the name of the XFree86 Project shall not
be used in advertising or otherwise to promote the sale, use or other deal-
ings in this Software without prior written authorization from the XFree86
Project.
License: BSD_3_clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the LibQxt project nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Comment:
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
.
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely.
.
.
Copyright (c) 2011, Edgar Simo Serra
All rights reserved.
.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
.
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the Simple Directmedia Layer (SDL) nor the names of
its contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License: BrownUn_UnCalifornia_ErikCorry
/* This code was derived from code carrying the following copyright notices:
* Copyright (c) 1995 The Regents of the University of California.
* All rights reserved.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose, without fee, and without written agreement is
* hereby granted, provided that the above copyright notice and the following
* two paragraphs appear in all copies of this software.
*
* IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
* OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
* CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
* ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* Copyright (c) 1995 Erik Corry
* All rights reserved.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose, without fee, and without written agreement is
* hereby granted, provided that the above copyright notice and the following
* two paragraphs appear in all copies of this software.
*
* IN NO EVENT SHALL ERIK CORRY BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
* SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF
* THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF ERIK CORRY HAS BEEN ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ERIK CORRY SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS"
* BASIS, AND ERIK CORRY HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
* UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* Portions of this software Copyright (c) 1995 Brown University.
* All rights reserved.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose, without fee, and without written agreement
* is hereby granted, provided that the above copyright notice and the
* following two paragraphs appear in all copies of this software.
*
* IN NO EVENT SHALL BROWN UNIVERSITY BE LIABLE TO ANY PARTY FOR
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
* OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF BROWN
* UNIVERSITY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* BROWN UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS"
* BASIS, AND BROWN UNIVERSITY HAS NO OBLIGATION TO PROVIDE MAINTENANCE,
* SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
License: Johnson_M._Hart
Permission is granted for any and all use providing that this
copyright is properly acknowledged.
There are no assurances of suitability for any use whatsoever.
License: SunPro
Developed at SunPro, a Sun Microsystems, Inc. business.
Permission to use, copy, modify, and distribute this
software is freely granted, provided that this notice
is preserved.
License: PublicDomain_Sam_Lantinga
Placed in the public domain by Sam Lantinga 4/13/98
License: PublicDomain_Edgar_Simo
Written by Edgar Simo "bobbens"
.
Released under Public Domain.
License: RSA_Data_Security
***********************************************************************
** utl_md5.c -- the source code for MD5 routines **
** RSA Data Security, Inc. MD5 Message-Digest Algorithm **
** Created: 2/17/90 RLR **
** Revised: 1/91 SRD,AJ,BSK,JT Reference C ver., 7/10 constant corr. **
***********************************************************************
***********************************************************************
** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **
** **
** License to copy and use this software is granted provided that **
** it is identified as the "RSA Data Security, Inc. MD5 Message- **
** Digest Algorithm" in all material mentioning or referencing this **
** software or this function. **
** **
** License is also granted to make and use derivative works **
** provided that such works are identified as "derived from the RSA **
** Data Security, Inc. MD5 Message-Digest Algorithm" in all **
** material mentioning or referencing the derived work. **
** **
** RSA Data Security, Inc. makes no representations concerning **
** either the merchantability of this software or the suitability **
** of this software for any particular purpose. It is provided "as **
** is" without express or implied warranty of any kind. **
** **
** These notices must be retained in any copies of any part of this **
** documentation and/or software. **
***********************************************************************
License: SGI_atlantis
(c) Copyright 1993, 1994, Silicon Graphics, Inc.
ALL RIGHTS RESERVED
Permission to use, copy, modify, and distribute this software for
any purpose and without fee is hereby granted, provided that the above
copyright notice appear in all copies and that both the copyright notice
and this permission notice appear in supporting documentation, and that
the name of Silicon Graphics, Inc. not be used in advertising
or publicity pertaining to distribution of the software without specific,
written prior permission.
.
THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
.
US Government Users Restricted Rights
Use, duplication, or disclosure by the Government is subject to
restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
(c)(1)(ii) of the Rights in Technical Data and Computer Software
clause at DFARS 252.227-7013 and/or in similar or successor
clauses in the FAR or the DOD or NASA FAR Supplement.
Unpublished-- rights reserved under the copyright laws of the
United States. Contractor/manufacturer is Silicon Graphics,
Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311.
.
OpenGL(TM) is a trademark of Silicon Graphics, Inc.

4
debian/docs vendored
View File

@@ -1,4 +0,0 @@
BUGS.txt
CREDITS.txt
README.md
README-SDL.txt

View File

@@ -1 +0,0 @@
usr/lib/*/libSDL2-2.0.so.0*

View File

@@ -1 +0,0 @@
usr/lib/*/libSDL2-2.0.so.0*

View File

@@ -1,9 +0,0 @@
usr/bin/sdl2-config
usr/include/SDL2
usr/lib/*/*.a
usr/lib/*/*.la
usr/lib/*/*.so
usr/lib/*/pkgconfig/sdl2.pc
usr/lib/*/cmake/SDL2/sdl2-config.cmake
usr/lib/*/cmake/SDL2/sdl2-config-version.cmake
usr/share/aclocal/sdl2.m4

View File

@@ -1 +0,0 @@
debian/sdl2-config.1

54
debian/rules vendored
View File

@@ -1,54 +0,0 @@
#!/usr/bin/make -f
DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
confflags = --disable-rpath --disable-video-directfb \
--disable-nas --disable-esd --disable-arts
# These flags can be used to create a package directly linking with external libraries and having the appropriate package dependencies
#confflags += --disable-alsa-shared
#confflags += --disable-arts-shared
#confflags += --disable-directfb-shared
#confflags += --disable-esd-shared
#confflags += --disable-fusionsound-shared
#confflags += --disable-jack-shared
#confflags += --disable-kmsdrm-shared
#confflags += --disable-libsamplerate-shared
#confflags += --disable-nas-shared
#confflags += --disable-pulseaudio-shared
#confflags += --disable-sndio-shared
#confflags += --disable-wayland-shared
#confflags += --disable-x11-shared
%:
dh $@ --parallel
override_dh_auto_configure:
dh_auto_configure -Bbuilddir/all -- $(confflags)
override_dh_auto_build:
dh_auto_build -Bbuilddir/all
tar czf debian/examples.tar.gz test
override_dh_auto_install:
dh_auto_install -Bbuilddir/all
override_dh_auto_clean:
dh_auto_clean -Bbuilddir/all
rm -f debian/examples.tar.gz
override_dh_install:
dh_install --remaining-packages --fail-missing -XlibSDL2.la
override_dh_installexamples:
dh_installexamples -plibsdl2-dev debian/examples.tar.gz
dh_installexamples --remaining-packages
override_dh_link:
# to address lintian warning
# W: libsdl2-2.0-0: dev-pkg-without-shlib-symlink usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.0.0 usr/lib/x86_64-linux-gnu/libSDL2-2.0.so
dh_link -plibsdl2-dev usr/lib/$(DEB_HOST_MULTIARCH)/libSDL2-2.0.so.0.0.0 usr/lib/$(DEB_HOST_MULTIARCH)/libSDL2-2.0.so
override_dh_strip:
dh_strip --dbg-package=libsdl2-dbg

86
debian/sdl2-config.1 vendored
View File

@@ -1,86 +0,0 @@
.TH sdl2-config 1 "2012-02-20" "SDL 2.0"
.SH NAME
sdl2-config \- script to get information about the installed version of SDL
.SH SYNOPSIS
.B sdl2-config
[ --prefix=
.IR DIR ]
[ --exec-prefix=
.IR DIR ]
[ --version ] [ --libs | --library-libs | --plugin-libs ] [ --cflags ]
.SH DESCRIPTION
.B sdl2-config
is a tool that is used to configure and determine the compiler and linker
flags that should be used to compile and link programs, libraries, and
plugins that use SDL. It is also used internally by the m4 macros that are
included with SDL.
.SH OPTIONS
.TP
.B --cflags
Print the compiler flags that are necessary to compile a program or library
that uses SDL.
.TP
.BI --exec-prefix= DIR
If specified, use
.I DIR
instead of the installation exec prefix that SDL was build with when
computing the output for the --cflags, --libs, --library-libs, and
--plugin-libs options. This option must be specified before any of the
--cflags, --libs, --library-libs, and --plugin-libs options.
.TP
.B --libs
Print the linker flags that are necessary to link a program that uses SDL.
.TP
.B --static-libs
Print the linker flags that are necessary to statically link a program that uses SDL.
.TP
.B --library-libs
Print the linker flags that are necessary to link a library that uses SDL.
(This excludes any static objects required for linking, since these must be
linked only by executable programs.)
.TP
.B --plugin-libs
Print the linker flags that are necessary to link an SDL-using object that
is to be accessed via
.IR dlopen (3).
This may include static objects with PIC symbol information. This option
should
.B not
be used for ordinary shared libraries or standalone applications.
.TP
.BI --prefix= DIR
If specified, use PREFIX instead of the installation prefix that SDL was
built with when computing the output for the --cflags, --libs,
--library-libs, and --plugin-libs options. This option is also used for
the exec prefix if --exec-prefix was not specified. This option must be
specified before any of the --cflags, --libs, --library-libs, and
--plugin-libs options.
.TP
.B --version
Prints the currently installed version of SDL on standard output.
.SH EXAMPLES
.TP
gcc -o main.o $(sdl2-config --cflags) main.c
is how you might use
.B sdl2-config
to compile a C source file for an executable program.
.TP
gcc -o my_app $(sdl2-config --libs) main.o util.o
is how you might use
.B sdl2-config
to link compiled objects into an executable program.
.TP
gcc -o libSDL_nifty-2.0.so.0.0.1 $(sdl --library-libs) read.o write.o munge.o
is how you might use
.B sdl2-config
to link compiled objects into a shared library.
.TP
gcc -o libnifty_xmms.so $(sdl --plugin-libs) stream.o blit.o deinterlace.o
is how you might use
.B sdl2-config
to link compiled objects into a plugin for use by another program.
.SH AUTHOR
The Simple DirectMedia Layer (SDL) library was written by Sam Lantinga.
.PP
This manual page was written by Branden Robinson, originally for Progeny
Linux Systems, Inc., and the Debian Project.

View File

@@ -1 +0,0 @@
3.0 (native)

2
debian/watch vendored
View File

@@ -1,2 +0,0 @@
version=3
http://www.libsdl.org/release/SDL-([\d.]+)\.tar\.gz

View File

@@ -206,6 +206,9 @@ You should not use the SDL renderer API while the app going in background:
after you read this message, GL context gets backed-up and you should not
use the SDL renderer API.
When this event is received, you have to set the render target to NULL, if you're using it.
(eg call SDL_SetRenderTarget(renderer, NULL))
- SDL_APP_DIDENTERFOREGROUND:
GL context is restored, and the SDL renderer API is available (unless you
receive SDL_RENDER_DEVICE_RESET).

View File

@@ -15,29 +15,34 @@ What you need:
* Kernel-Framebuffer support: required: vesafb, radeonfb ....
* Mesa 7.0.x - optional for OpenGL
/etc/directfbrc
This file should contain the following lines to make
The `/etc/directfbrc` file should contain the following lines to make
your joystick work and avoid crashes:
------------------------
```
disable-module=joystick
disable-module=cle266
disable-module=cyber5k
no-linux-input-grab
------------------------
```
To disable to use x11 backend when DISPLAY variable is found use
```
export SDL_DIRECTFB_X11_CHECK=0
```
To disable the use of linux input devices, i.e. multimice/multikeyboard support,
use
```
export SDL_DIRECTFB_LINUX_INPUT=0
```
To use hardware accelerated YUV-overlays for YUV-textures, use:
```
export SDL_DIRECTFB_YUV_DIRECT=1
```
This is disabled by default. It will only support one
YUV texture, namely the first. Every other YUV texture will be
@@ -45,7 +50,9 @@ rendered in software.
In addition, you may use (directfb-1.2.x)
```
export SDL_DIRECTFB_YUV_UNDERLAY=1
```
to make the YUV texture an underlay. This will make the cursor to
be shown.
@@ -54,14 +61,18 @@ Simple Window Manager
=====================
The driver has support for a very, very basic window manager you may
want to use when running with "wm=default". Use
want to use when running with `wm=default`. Use
```
export SDL_DIRECTFB_WM=1
```
to enable basic window borders. In order to have the window title rendered,
you need to have the following font installed:
```
/usr/share/fonts/truetype/freefont/FreeSans.ttf
```
OpenGL Support
==============
@@ -71,21 +82,25 @@ works at least on all directfb supported platforms.
As of this writing 20100802 you need to pull Mesa from git and do the following:
------------------------
```
git clone git://anongit.freedesktop.org/git/mesa/mesa
cd mesa
git checkout 2c9fdaf7292423c157fc79b5ce43f0f199dd753a
------------------------
```
Edit configs/linux-directfb so that the Directories-section looks like
------------------------
Edit `configs/linux-directfb` so that the Directories-section looks like this:
```
# Directories
SRC_DIRS = mesa glu
GLU_DIRS = sgi
DRIVER_DIRS = directfb
PROGRAM_DIRS =
------------------------
```
Then do the following:
```
make linux-directfb
make
@@ -95,13 +110,14 @@ sudo make install INSTALL_DIR=/usr/local/dfb_GL
cd src/mesa/drivers/directfb
make
sudo make install INSTALL_DIR=/usr/local/dfb_GL
------------------------
```
To run the SDL - testprograms:
```
export SDL_VIDEODRIVER=directfb
export LD_LIBRARY_PATH=/usr/local/dfb_GL/lib
export LD_PRELOAD=/usr/local/dfb_GL/libGL.so.7
./testgl
```

View File

@@ -11,38 +11,24 @@ Instructions:
1. Open SDL.xcodeproj (located in Xcode/SDL) in Xcode.
2. Select your desired target, and hit build.
There are three build targets:
- libSDL.a:
Build SDL as a statically linked library
- testsdl:
Build a test program (there are known test failures which are fine)
- Template:
Package a project template together with the SDL for iPhone static libraries and copies of the SDL headers. The template includes proper references to the SDL library and headers, skeleton code for a basic SDL program, and placeholder graphics for the application icon and startup screen.
Build SDL for iOS from the command line
==============================================================================
1. cd (PATH WHERE THE SDL CODE IS)
2. xcodebuild -project Xcode/SDL/SDL.xcodeproj -target 'Static Library-iOS' -configuration Release -sdk iphoneos13.2 clean build
Using the Simple DirectMedia Layer for iOS
==============================================================================
FIXME: This needs to be updated for the latest methods
1. Run Xcode and create a new project using the iOS Game template, selecting the Objective C language and Metal game technology.
2. In the main view, delete all files except for Assets and LaunchScreen
3. Right click the project in the main view, select "Add Files...", and add the SDL project, Xcode/SDL/SDL.xcodeproj
4. Select the project in the main view, go to the "Info" tab and under "Custom iOS Target Properties" remove the line "Main storyboard file base name"
5. Select the project in the main view, go to the "Build Settings" tab, select "All", and edit "Header Search Path" and drag over the SDL "Public Headers" folder from the left
6. Select the project in the main view, go to the "Build Phases" tab, select "Link Binary With Libraries", and add SDL2.framework from "Framework-iOS"
7. Select the project in the main view, go to the "General" tab, scroll down to "Frameworks, Libraries, and Embedded Content", and select "Embed & Sign" for the SDL library.
8. In the main view, expand SDL -> Library Source -> main -> uikit and drag SDL_uikit_main.c into your game files
9. Add the source files that you would normally have for an SDL program, making sure to have #include "SDL.h" at the top of the file containing your main() function.
10. Add any assets that your application needs.
11. Enjoy!
Here is the easiest method:
1. Build the SDL library (libSDL2.a) and the iPhone SDL Application template.
2. Install the iPhone SDL Application template by copying it to one of Xcode's template directories. I recommend creating a directory called "SDL" in "/Developer/Platforms/iOS.platform/Developer/Library/Xcode/Project Templates/" and placing it there.
3. Start a new project using the template. The project should be immediately ready for use with SDL.
Here is a more manual method:
1. Create a new iOS view based application.
2. Build the SDL static library (libSDL2.a) for iOS and include them in your project. Xcode will ignore the library that is not currently of the correct architecture, hence your app will work both on iOS and in the iOS Simulator.
3. Include the SDL header files in your project.
4. Remove the ApplicationDelegate.h and ApplicationDelegate.m files -- SDL for iOS provides its own UIApplicationDelegate. Remove MainWindow.xib -- SDL for iOS produces its user interface programmatically.
5. Delete the contents of main.m and program your app as a regular SDL program instead. You may replace main.m with your own main.c, but you must tell Xcode not to use the project prefix file, as it includes Objective-C code.
TODO: Add information regarding App Store requirements such as icons, etc.
Notes -- Retina / High-DPI and window sizes

View File

@@ -239,8 +239,8 @@ Some of you won't want to use the Stationary so I'll give some tips:
* Remove "main.m" from your project
* Remove "MainMenu.xib" from your project
* Remove "AppDelegates.*" from your project
* Add "$(HOME)/Library/Frameworks/SDL.framework/Headers" to include path
* Add "$(HOME)/Library/Frameworks" to the frameworks search path
* Add "\$(HOME)/Library/Frameworks/SDL.framework/Headers" to include path
* Add "\$(HOME)/Library/Frameworks" to the frameworks search path
* Add "-framework SDL -framework Foundation -framework AppKit" to "OTHER_LDFLAGS"
* Add your files
* Clean and build

View File

@@ -1,31 +1,36 @@
PSP
======
SDL port for the Sony PSP contributed by
Captian Lex
SDL2 port for the Sony PSP contributed by:
- Captian Lex
- Francisco Javier Trujillo Mata
- Wouter Wijsman
Credit to
Marcus R.Brown,Jim Paris,Matthew H for the original SDL 1.2 for PSP
Geecko for his PSP GU lib "Glib2d"
Building
--------
To build SDL2 library for the PSP, make sure psp-config is in the path and run:
make -f Makefile.psp
## Building
To build SDL2 library for the PSP, make sure you have the latest PSPDev status and run:
```bash
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake
cmake --build build
cmake --install build
```
Getting PSP toolchain
---------------------
https://github.com/pspdev/psptoolchain
## Getting PSP Dev
[Installing PSP Dev](https://github.com/pspdev/pspdev)
Running on PPSSPP Emulator
--------------------------
https://github.com/hrydgard/ppsspp
( https://github.com/hrydgard/ppsspp/wiki/Build-instructions )
## Running on PPSSPP Emulator
[PPSSPP](https://github.com/hrydgard/ppsspp)
Compiling an HelloWorld
-----------------------
https://psp-dev.org/doku.php?id=tutorial:hello_world
[Build Instructions](https://github.com/hrydgard/ppsspp/wiki/Build-instructions)
To Do
------
PSP Screen Keyboard
## Compiling a HelloWorld
[PSP Hello World](https://psp-dev.org/doku.php?id=tutorial:hello_world)
## To Do
- PSP Screen Keyboard
- Dialogs

View File

@@ -1,7 +1,7 @@
Using SDL with Microsoft Visual C++
===================================
### by [Lion Kimbro](mailto:snowlion@sprynet.com) with additions by [James Turk](mailto:james@conceptofzero.net)
### by Lion Kimbro with additions by James Turk
You can either use the precompiled libraries from the [SDL](https://www.libsdl.org/download.php) web site, or you can build SDL
yourself.

View File

@@ -3,7 +3,7 @@ PS Vita
SDL port for the Sony Playstation Vita and Sony Playstation TV
Credit to
* xerpi and rsn8887 for initial (vita2d) port
* xerpi, cpasjuste and rsn8887 for initial (vita2d) port
* vitasdk/dolcesdk devs
* CBPS discord (Namely Graphene and SonicMastr)
@@ -22,6 +22,9 @@ Notes
* gles1/gles2 support and renderers are disabled by default and can be enabled by configuring with `-DVIDEO_VITA_PVR=ON`
These renderers support 720p and 1080i resolutions. These can be specified with:
`SDL_setenv("VITA_RESOLUTION", "720", 1);` and `SDL_setenv("VITA_RESOLUTION", "1080", 1);`
* Desktop GL 1.X and 2.X support and renderers are also disabled by default and also can be enabled with `-DVIDEO_VITA_PVR=ON` as long as gl4es4vita is present in your SDK.
They support the same resolutions as the gles1/gles2 backends and require specifying `SDL_setenv("VITA_PVR_OGL", "1", 1);`
anytime before video subsystem initialization.
* gles2 support via PIB is disabled by default and can be enabled by configuring with `-DVIDEO_VITA_PIB=ON`
* By default SDL emits mouse events for touch events on every touchscreen.
Vita has two touchscreens, so it's recommended to use `SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");` and handle touch events instead.

View File

@@ -1,45 +1,58 @@
Windows
================================================================================
# Windows
================================================================================
OpenGL ES 2.x support
================================================================================
## LLVM and Intel C++ compiler support
SDL will build with the Visual Studio project files with LLVM-based compilers, such as the Intel oneAPI C++
compiler, but you'll have to manually add the "-msse3" command line option
to at least the SDL_audiocvt.c source file, and possibly others. This may
not be necessary if you build SDL with CMake instead of the included Visual
Studio solution.
Details are here: https://github.com/libsdl-org/SDL/issues/5186
## OpenGL ES 2.x support
SDL has support for OpenGL ES 2.x under Windows via two alternative
implementations.
The most straightforward method consists in running your app in a system with
a graphic card paired with a relatively recent (as of November of 2013) driver
which supports the WGL_EXT_create_context_es2_profile extension. Vendors known
to ship said extension on Windows currently include nVidia and Intel.
The other method involves using the ANGLE library (https://code.google.com/p/angleproject/)
If an OpenGL ES 2.x context is requested and no WGL_EXT_create_context_es2_profile
extension is found, SDL will try to load the libEGL.dll library provided by
ANGLE.
To obtain the ANGLE binaries, you can either compile from source from
https://chromium.googlesource.com/angle/angle or copy the relevant binaries from
a recent Chrome/Chromium install for Windows. The files you need are:
The other method involves using the
[ANGLE library](https://code.google.com/p/angleproject/). If an OpenGL ES 2.x
context is requested and no WGL_EXT_create_context_es2_profile extension is
found, SDL will try to load the libEGL.dll library provided by ANGLE.
* libEGL.dll
* libGLESv2.dll
* d3dcompiler_46.dll (supports Windows Vista or later, better shader compiler)
or...
* d3dcompiler_43.dll (supports Windows XP or later)
To obtain the ANGLE binaries, you can either compile from source from
https://chromium.googlesource.com/angle/angle or copy the relevant binaries
from a recent Chrome/Chromium install for Windows. The files you need are:
- libEGL.dll
- libGLESv2.dll
- d3dcompiler_46.dll (supports Windows Vista or later, better shader
compiler) *or* d3dcompiler_43.dll (supports Windows XP or later)
If you compile ANGLE from source, you can configure it so it does not need the
d3dcompiler_* DLL at all (for details on this, see their documentation).
However, by default SDL will try to preload the d3dcompiler_46.dll to
comply with ANGLE's requirements. If you wish SDL to preload d3dcompiler_43.dll (to
support Windows XP) or to skip this step at all, you can use the
SDL_HINT_VIDEO_WIN_D3DCOMPILER hint (see SDL_hints.h for more details).
comply with ANGLE's requirements. If you wish SDL to preload
d3dcompiler_43.dll (to support Windows XP) or to skip this step at all, you
can use the SDL_HINT_VIDEO_WIN_D3DCOMPILER hint (see SDL_hints.h for more
details).
Known Bugs:
* SDL_GL_SetSwapInterval is currently a no op when using ANGLE. It appears
- SDL_GL_SetSwapInterval is currently a no op when using ANGLE. It appears
that there's a bug in the library which prevents the window contents from
refreshing if this is set to anything other than the default value.
Vulkan Surface Support
==============
## Vulkan Surface Support
Support for creating Vulkan surfaces is configured on by default. To disable
it change the value of `SDL_VIDEO_VULKAN` to 0 in `SDL_config_windows.h`. You
must install the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) in order to
use Vulkan graphics in your application.
Support for creating Vulkan surfaces is configured on by default. To disable it change the value of `SDL_VIDEO_VULKAN` to 0 in `SDL_config_windows.h`. You must install the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) in order to use Vulkan graphics in your application.

View File

@@ -14,7 +14,7 @@ hardware via OpenGL and Direct3D. It is used by video playback software,
emulators, and popular games including Valve's award winning catalog
and many Humble Bundle games.
SDL officially supports Windows, Mac OS X, Linux, iOS, and Android.
SDL officially supports Windows, macOS, Linux, iOS, and Android.
Support for other platforms may be found in the source code.
SDL is written in C, works natively with C++, and there are bindings
@@ -38,7 +38,7 @@ More documentation and FAQs are available online at [the wiki](http://wiki.libsd
- [Git](README-git.md)
- [iOS](README-ios.md)
- [Linux](README-linux.md)
- [OS X](README-macosx.md)
- [macOS](README-macos.md)
- [OS/2](README-os2.md)
- [Native Client](README-nacl.md)
- [Pandora](README-pandora.md)

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -500,9 +500,7 @@ extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index,
* hardware.
*
* `spec` will be filled with the sample rate, sample format, and channel
* count. All other values in the structure are filled with 0. When the
* supported struct members are 0, SDL was unable to get the property from the
* backend.
* count.
*
* \param index the index of the audio device; valid values range from 0 to
* SDL_GetNumAudioDevices() - 1

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -67,9 +67,8 @@ typedef enum
SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */
SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */
SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D11 */
SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D11 */
SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D9, D3D11 */
SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D9, D3D11 */
} SDL_BlendOperation;
/**
@@ -87,7 +86,6 @@ typedef enum
SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR = 0x8, /**< 1-dstR, 1-dstG, 1-dstB, 1-dstA */
SDL_BLENDFACTOR_DST_ALPHA = 0x9, /**< dstA, dstA, dstA, dstA */
SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = 0xA /**< 1-dstA, 1-dstA, 1-dstA, 1-dstA */
} SDL_BlendFactor;
/**
@@ -135,10 +133,10 @@ typedef enum
* SDL 2.0.6. All renderers support the four blend modes listed in the
* SDL_BlendMode enumeration.
*
* - **direct3d**: Supports `SDL_BLENDOPERATION_ADD` with all factors.
* - **direct3d11**: Supports all operations with all factors. However, some
* - **direct3d**: Supports all operations with all factors. However, some
* factors produce unexpected results with `SDL_BLENDOPERATION_MINIMUM` and
* `SDL_BLENDOPERATION_MAXIMUM`.
* - **direct3d11**: Same as Direct3D 9.
* - **opengl**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
* factors. OpenGL versions 1.1, 1.2, and 1.3 do not work correctly with SDL
* 2.0.6.

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -39,8 +39,6 @@
#include "SDL_config_iphoneos.h"
#elif defined(__ANDROID__)
#include "SDL_config_android.h"
#elif defined(__PSP__)
#include "SDL_config_psp.h"
#elif defined(__OS2__)
#include "SDL_config_os2.h"
#elif defined(__EMSCRIPTEN__)

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -251,7 +251,9 @@
#cmakedefine HAVE_MMDEVICEAPI_H @HAVE_MMDEVICEAPI_H@
#cmakedefine HAVE_AUDIOCLIENT_H @HAVE_AUDIOCLIENT_H@
#cmakedefine HAVE_TPCSHRD_H @HAVE_TPCSHRD_H@
#cmakedefine HAVE_SENSORSAPI_H @HAVE_SENSORSAPI_H@
#cmakedefine HAVE_ROAPI_H @HAVE_ROAPI_H@
#cmakedefine HAVE_XINPUT_GAMEPAD_EX @HAVE_XINPUT_GAMEPAD_EX@
#cmakedefine HAVE_XINPUT_STATE_EX @HAVE_XINPUT_STATE_EX@
@@ -276,6 +278,8 @@
#cmakedefine SDL_VIDEO_DISABLED @SDL_VIDEO_DISABLED@
#cmakedefine SDL_POWER_DISABLED @SDL_POWER_DISABLED@
#cmakedefine SDL_FILESYSTEM_DISABLED @SDL_FILESYSTEM_DISABLED@
#cmakedefine SDL_LOCALE_DISABLED @SDL_LOCALE_DISABLED@
#cmakedefine SDL_MISC_DISABLED @SDL_MISC_DISABLED@
/* Enable various audio drivers */
#cmakedefine SDL_AUDIO_DRIVER_ALSA @SDL_AUDIO_DRIVER_ALSA@
@@ -315,6 +319,7 @@
#cmakedefine SDL_AUDIO_DRIVER_WINMM @SDL_AUDIO_DRIVER_WINMM@
#cmakedefine SDL_AUDIO_DRIVER_OS2 @SDL_AUDIO_DRIVER_OS2@
#cmakedefine SDL_AUDIO_DRIVER_VITA @SDL_AUDIO_DRIVER_VITA@
#cmakedefine SDL_AUDIO_DRIVER_PSP @SDL_AUDIO_DRIVER_PSP@
/* Enable various input drivers */
#cmakedefine SDL_INPUT_LINUXEV @SDL_INPUT_LINUXEV@
@@ -337,6 +342,7 @@
#cmakedefine SDL_JOYSTICK_EMSCRIPTEN @SDL_JOYSTICK_EMSCRIPTEN@
#cmakedefine SDL_JOYSTICK_VIRTUAL @SDL_JOYSTICK_VIRTUAL@
#cmakedefine SDL_JOYSTICK_VITA @SDL_JOYSTICK_VITA@
#cmakedefine SDL_JOYSTICK_PSP @SDL_JOYSTICK_PSP@
#cmakedefine SDL_HAPTIC_DUMMY @SDL_HAPTIC_DUMMY@
#cmakedefine SDL_HAPTIC_LINUX @SDL_HAPTIC_LINUX@
#cmakedefine SDL_HAPTIC_IOKIT @SDL_HAPTIC_IOKIT@
@@ -367,6 +373,7 @@
#cmakedefine SDL_THREAD_WINDOWS @SDL_THREAD_WINDOWS@
#cmakedefine SDL_THREAD_OS2 @SDL_THREAD_OS2@
#cmakedefine SDL_THREAD_VITA @SDL_THREAD_VITA@
#cmakedefine SDL_THREAD_PSP @SDL_THREAD_PSP@
/* Enable various timer systems */
#cmakedefine SDL_TIMER_HAIKU @SDL_TIMER_HAIKU@
@@ -375,6 +382,7 @@
#cmakedefine SDL_TIMER_WINDOWS @SDL_TIMER_WINDOWS@
#cmakedefine SDL_TIMER_OS2 @SDL_TIMER_OS2@
#cmakedefine SDL_TIMER_VITA @SDL_TIMER_VITA@
#cmakedefine SDL_TIMER_PSP @SDL_TIMER_PSP@
/* Enable various video drivers */
#cmakedefine SDL_VIDEO_DRIVER_ANDROID @SDL_VIDEO_DRIVER_ANDROID@
@@ -395,6 +403,7 @@
#cmakedefine SDL_VIDEO_DRIVER_OS2 @SDL_VIDEO_DRIVER_OS2@
#cmakedefine SDL_VIDEO_DRIVER_QNX @SDL_VIDEO_DRIVER_QNX@
#cmakedefine SDL_VIDEO_DRIVER_RISCOS @SDL_VIDEO_DRIVER_RISCOS@
#cmakedefine SDL_VIDEO_DRIVER_PSP @SDL_VIDEO_DRIVER_PSP@
#cmakedefine SDL_VIDEO_DRIVER_KMSDRM @SDL_VIDEO_DRIVER_KMSDRM@
#cmakedefine SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC @SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC@
@@ -439,6 +448,7 @@
#cmakedefine SDL_VIDEO_RENDER_DIRECTFB @SDL_VIDEO_RENDER_DIRECTFB@
#cmakedefine SDL_VIDEO_RENDER_METAL @SDL_VIDEO_RENDER_METAL@
#cmakedefine SDL_VIDEO_RENDER_VITA_GXM @SDL_VIDEO_RENDER_VITA_GXM@
#cmakedefine SDL_VIDEO_RENDER_PSP @SDL_VIDEO_RENDER_PSP@
/* Enable OpenGL support */
#cmakedefine SDL_VIDEO_OPENGL @SDL_VIDEO_OPENGL@
@@ -469,6 +479,7 @@
#cmakedefine SDL_POWER_EMSCRIPTEN @SDL_POWER_EMSCRIPTEN@
#cmakedefine SDL_POWER_HARDWIRED @SDL_POWER_HARDWIRED@
#cmakedefine SDL_POWER_VITA @SDL_POWER_VITA@
#cmakedefine SDL_POWER_PSP @SDL_POWER_PSP@
/* Enable system filesystem support */
#cmakedefine SDL_FILESYSTEM_ANDROID @SDL_FILESYSTEM_ANDROID@
@@ -481,6 +492,13 @@
#cmakedefine SDL_FILESYSTEM_EMSCRIPTEN @SDL_FILESYSTEM_EMSCRIPTEN@
#cmakedefine SDL_FILESYSTEM_OS2 @SDL_FILESYSTEM_OS2@
#cmakedefine SDL_FILESYSTEM_VITA @SDL_FILESYSTEM_VITA@
#cmakedefine SDL_FILESYSTEM_PSP @SDL_FILESYSTEM_PSP@
/* Enable misc subsystem */
#cmakedefine SDL_MISC_DUMMY @SDL_MISC_DUMMY@
/* Enable locale subsystem */
#cmakedefine SDL_LOCALE_DUMMY @SDL_LOCALE_DUMMY@
/* Enable assembly routines */
#cmakedefine SDL_ASSEMBLY_ROUTINES @SDL_ASSEMBLY_ROUTINES@
@@ -503,6 +521,7 @@
#cmakedefine SDL_VIDEO_VITA_PIB @SDL_VIDEO_VITA_PIB@
#cmakedefine SDL_VIDEO_VITA_PVR @SDL_VIDEO_VITA_PVR@
#cmakedefine SDL_VIDEO_VITA_PVR_OGL @SDL_VIDEO_VITA_PVR_OGL@
#if !defined(__WIN32__) && !defined(__WINRT__)
# if !defined(_STDINT_H_) && !defined(_STDINT_H) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H)

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -240,7 +240,9 @@
#undef HAVE_MMDEVICEAPI_H
#undef HAVE_AUDIOCLIENT_H
#undef HAVE_TPCSHRD_H
#undef HAVE_SENSORSAPI_H
#undef HAVE_ROAPI_H
/* SDL internal assertion support */
#undef SDL_DEFAULT_ASSERT_LEVEL
@@ -262,6 +264,8 @@
#undef SDL_VIDEO_DISABLED
#undef SDL_POWER_DISABLED
#undef SDL_FILESYSTEM_DISABLED
#undef SDL_LOCALE_DISABLED
#undef SDL_MISC_DISABLED
/* Enable various audio drivers */
#undef SDL_AUDIO_DRIVER_AAUDIO
@@ -444,16 +448,24 @@
#undef SDL_POWER_HARDWIRED
/* Enable system filesystem support */
#undef SDL_FILESYSTEM_ANDROID
#undef SDL_FILESYSTEM_HAIKU
#undef SDL_FILESYSTEM_COCOA
#undef SDL_FILESYSTEM_DUMMY
#undef SDL_FILESYSTEM_RISCOS
#undef SDL_FILESYSTEM_UNIX
#undef SDL_FILESYSTEM_WINDOWS
#undef SDL_FILESYSTEM_NACL
#undef SDL_FILESYSTEM_ANDROID
#undef SDL_FILESYSTEM_EMSCRIPTEN
#undef SDL_FILESYSTEM_OS2
#undef SDL_FILESYSTEM_RISCOS
#undef SDL_FILESYSTEM_VITA
#undef SDL_FILESYSTEM_PSP
/* Enable misc subsystem */
#undef SDL_MISC_DUMMY
/* Enable locale subsystem */
#undef SDL_LOCALE_DUMMY
/* Enable assembly routines */
#undef SDL_ASSEMBLY_ROUTINES

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -185,6 +185,7 @@
/* Enable various threading systems */
#ifdef __EMSCRIPTEN_PTHREADS__
#define SDL_THREAD_PTHREAD 1
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
#endif
/* Enable various timer systems */

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -134,6 +134,7 @@
#define HAVE_NANOSLEEP 1
#define HAVE_SYSCONF 1
#define HAVE_SYSCTLBYNAME 1
#define HAVE_O_CLOEXEC 1
/* enable iPhone version of Core Audio driver */
#define SDL_AUDIO_DRIVER_COREAUDIO 1

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -38,8 +38,14 @@
#define SDL_VIDEO_DRIVER_DUMMY 1
#define SDL_VIDEO_DRIVER_OS2 1
#define SDL_JOYSTICK_OS2 1
#ifndef HAVE_LIBUSB_H /* see Makefile */
#define SDL_HIDAPI_DISABLED 1
/*#undef SDL_JOYSTICK_HIDAPI */
#else
#define SDL_JOYSTICK_HIDAPI 1
/* dynamically loaded libusb-1.0 dll: */
#define SDL_LIBUSB_DYNAMIC "usb100.dll"
#endif
/*#undef SDL_JOYSTICK_VIRTUAL */
/* Enable OpenGL support */
@@ -61,25 +67,31 @@
#define HAVE_LIBC 1
#define HAVE_STDARG_H 1
#define HAVE_STDDEF_H 1
#define HAVE_STDINT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_STDIO_H 1
#define STDC_HEADERS 1
#define HAVE_STDLIB_H 1
#define HAVE_STDARG_H 1
#define HAVE_STDDEF_H 1
#define HAVE_MALLOC_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRING_H 1
#define HAVE_STRINGS_H 1
#define HAVE_WCHAR_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_LIMITS_H 1
#define HAVE_CTYPE_H 1
#define HAVE_MATH_H 1
#define HAVE_FLOAT_H 1
#define HAVE_SIGNAL_H 1
#if 0 /* see Makefile */
#define HAVE_ICONV 1
#define HAVE_ICONV_H 1
#endif
/* #undef HAVE_DLOPEN */
#define HAVE_MALLOC 1
#define HAVE_CALLOC 1

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

View File

@@ -1,168 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef SDL_config_psp_h_
#define SDL_config_psp_h_
#define SDL_config_h_
#include "SDL_platform.h"
#ifdef __GNUC__
#define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1
#endif
#define HAVE_GCC_ATOMICS 1
#define STDC_HEADERS 1
#define HAVE_ALLOCA_H 1
#define HAVE_CTYPE_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_LIMITS_H 1
#define HAVE_MATH_H 1
#define HAVE_SIGNAL_H 1
#define HAVE_STDINT_H 1
#define HAVE_STDIO_H 1
#define HAVE_STRING_H 1
#define HAVE_SYS_TYPES_H 1
/* C library functions */
#define HAVE_MALLOC 1
#define HAVE_CALLOC 1
#define HAVE_REALLOC 1
#define HAVE_FREE 1
#define HAVE_ALLOCA 1
#define HAVE_GETENV 1
#define HAVE_SETENV 1
#define HAVE_PUTENV 1
#define HAVE_SETENV 1
#define HAVE_UNSETENV 1
#define HAVE_QSORT 1
#define HAVE_ABS 1
#define HAVE_BCOPY 1
#define HAVE_MEMSET 1
#define HAVE_MEMCPY 1
#define HAVE_MEMMOVE 1
#define HAVE_MEMCMP 1
#define HAVE_STRLEN 1
#define HAVE_STRLCPY 1
#define HAVE_STRLCAT 1
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
#define HAVE_STRTOLL 1
#define HAVE_STRTOULL 1
#define HAVE_STRTOD 1
#define HAVE_ATOI 1
#define HAVE_ATOF 1
#define HAVE_STRCMP 1
#define HAVE_STRNCMP 1
#define HAVE_STRCASECMP 1
#define HAVE_STRNCASECMP 1
#define HAVE_VSSCANF 1
#define HAVE_VSNPRINTF 1
#define HAVE_M_PI 1
#define HAVE_ACOS 1
#define HAVE_ACOSF 1
#define HAVE_ASIN 1
#define HAVE_ASINF 1
#define HAVE_ATAN 1
#define HAVE_ATANF 1
#define HAVE_ATAN2 1
#define HAVE_ATAN2F 1
#define HAVE_CEIL 1
#define HAVE_CEILF 1
#define HAVE_COPYSIGN 1
#define HAVE_COPYSIGNF 1
#define HAVE_COS 1
#define HAVE_COSF 1
#define HAVE_EXP 1
#define HAVE_EXPF 1
#define HAVE_FABS 1
#define HAVE_FABSF 1
#define HAVE_FLOOR 1
#define HAVE_FLOORF 1
#define HAVE_FMOD 1
#define HAVE_FMODF 1
#define HAVE_LOG 1
#define HAVE_LOGF 1
#define HAVE_LOG10 1
#define HAVE_LOG10F 1
#define HAVE_POW 1
#define HAVE_POWF 1
#define HAVE_SCALBN 1
#define HAVE_SCALBNF 1
#define HAVE_SIN 1
#define HAVE_SINF 1
#define HAVE_SQRT 1
#define HAVE_SQRTF 1
#define HAVE_TAN 1
#define HAVE_TANF 1
#define HAVE_SETJMP 1
#define HAVE_NANOSLEEP 1
/* #define HAVE_SYSCONF 1 */
/* #define HAVE_SIGACTION 1 */
/* PSP isn't that sophisticated */
#define LACKS_SYS_MMAN_H 1
/* Enable the PSP thread support (src/thread/psp/\*.c) */
#define SDL_THREAD_PSP 1
/* Enable the PSP timer support (src/timer/psp/\*.c) */
#define SDL_TIMERS_PSP 1
/* Enable the PSP joystick driver (src/joystick/psp/\*.c) */
#define SDL_JOYSTICK_PSP 1
#define SDL_JOYSTICK_VIRTUAL 1
/* Enable the dummy sensor driver */
#define SDL_SENSOR_DUMMY 1
/* Enable the PSP audio driver (src/audio/psp/\*.c) */
#define SDL_AUDIO_DRIVER_PSP 1
/* PSP video driver */
#define SDL_VIDEO_DRIVER_PSP 1
/* PSP render driver */
#define SDL_VIDEO_RENDER_PSP 1
#define SDL_POWER_PSP 1
/* !!! FIXME: what does PSP do for filesystem stuff? */
#define SDL_FILESYSTEM_DUMMY 1
/* PSP doesn't have haptic device (src/haptic/dummy/\*.c) */
#define SDL_HAPTIC_DISABLED 1
/* PSP doesn't have HIDAPI available */
#define SDL_HIDAPI_DISABLED 1
/* PSP can't load shared object (src/loadso/dummy/\*.c) */
#define SDL_LOADSO_DISABLED 1
#endif /* SDL_config_psp_h_ */

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -90,6 +90,10 @@ typedef unsigned int uintptr_t;
# define SIZEOF_VOIDP 4
#endif
#ifdef __clang__
# define HAVE_GCC_ATOMICS 1
#endif
#define HAVE_DDRAW_H 1
#define HAVE_DINPUT_H 1
#define HAVE_DSOUND_H 1
@@ -100,9 +104,11 @@ typedef unsigned int uintptr_t;
#endif
#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0602 /* Windows 8 SDK */
#define HAVE_D3D11_H 1
#define HAVE_ROAPI_H 1
#endif
#define HAVE_MMDEVICEAPI_H 1
#define HAVE_AUDIOCLIENT_H 1
#define HAVE_TPCSHRD_H 1
#define HAVE_SENSORSAPI_H 1
#if (defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64)) && (defined(_MSC_VER) && _MSC_VER >= 1600)
#define HAVE_IMMINTRIN_H 1

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -92,6 +92,10 @@ typedef unsigned int uintptr_t;
# define SIZEOF_VOIDP 4
#endif
#ifdef __clang__
# define HAVE_GCC_ATOMICS 1
#endif
/* Useful headers */
#define HAVE_DXGI_H 1
#if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP
@@ -100,6 +104,7 @@ typedef unsigned int uintptr_t;
#define HAVE_MMDEVICEAPI_H 1
#define HAVE_AUDIOCLIENT_H 1
#define HAVE_TPCSHRD_H 1
#define HAVE_LIBC 1
#define STDC_HEADERS 1
@@ -190,6 +195,8 @@ typedef unsigned int uintptr_t;
#define HAVE_TRUNCF 1
#define HAVE__FSEEKI64 1
#define HAVE_ROAPI_H 1
/* Enable various audio drivers */
#define SDL_AUDIO_DRIVER_WASAPI 1
#define SDL_AUDIO_DRIVER_DISK 1

View File

@@ -1,154 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef SDL_config_wiz_h_
#define SDL_config_wiz_h_
#define SDL_config_h_
/* This is a set of defines to configure the SDL features */
/* General platform specific identifiers */
#include "SDL_platform.h"
#define SDL_BYTEORDER 1234
#define STDC_HEADERS 1
#define HAVE_ALLOCA_H 1
#define HAVE_CTYPE_H 1
#define HAVE_ICONV_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_LIMITS_H 1
#define HAVE_MALLOC_H 1
#define HAVE_MATH_H 1
#define HAVE_MEMORY_H 1
#define HAVE_SIGNAL_H 1
#define HAVE_STDARG_H 1
#define HAVE_STDINT_H 1
#define HAVE_STDIO_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRINGS_H 1
#define HAVE_STRING_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_DLOPEN 1
#define HAVE_MALLOC 1
#define HAVE_CALLOC 1
#define HAVE_REALLOC 1
#define HAVE_FREE 1
#define HAVE_ALLOCA 1
#define HAVE_GETENV 1
#define HAVE_SETENV 1
#define HAVE_PUTENV 1
#define HAVE_UNSETENV 1
#define HAVE_QSORT 1
#define HAVE_ABS 1
#define HAVE_BCOPY 1
#define HAVE_MEMSET 1
#define HAVE_MEMCPY 1
#define HAVE_MEMMOVE 1
#define HAVE_STRLEN 1
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOK_R 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
#define HAVE_STRTOLL 1
#define HAVE_STRTOULL 1
#define HAVE_ATOI 1
#define HAVE_ATOF 1
#define HAVE_STRCMP 1
#define HAVE_STRNCMP 1
#define HAVE_STRCASECMP 1
#define HAVE_STRNCASECMP 1
#define HAVE_VSSCANF 1
#define HAVE_VSNPRINTF 1
#define HAVE_M_PI 1
#define HAVE_ACOS 1
#define HAVE_ACOSF 1
#define HAVE_ASIN 1
#define HAVE_ASINF 1
#define HAVE_ATAN 1
#define HAVE_ATANF 1
#define HAVE_ATAN2 1
#define HAVE_ATAN2F 1
#define HAVE_CEIL 1
#define HAVE_CEILF 1
#define HAVE_COPYSIGN 1
#define HAVE_COPYSIGNF 1
#define HAVE_COS 1
#define HAVE_COSF 1
#define HAVE_EXP 1
#define HAVE_EXPF 1
#define HAVE_FABS 1
#define HAVE_FABSF 1
#define HAVE_FLOOR 1
#define HAVE_FLOORF 1
#define HAVE_FMOD 1
#define HAVE_FMODF 1
#define HAVE_LOG 1
#define HAVE_LOGF 1
#define HAVE_LOG10 1
#define HAVE_LOG10F 1
#define HAVE_LROUND 1
#define HAVE_LROUNDF 1
#define HAVE_POW 1
#define HAVE_POWF 1
#define HAVE_ROUND 1
#define HAVE_ROUNDF 1
#define HAVE_SCALBN 1
#define HAVE_SCALBNF 1
#define HAVE_SIN 1
#define HAVE_SINF 1
#define HAVE_SQRT 1
#define HAVE_SQRTF 1
#define HAVE_TAN 1
#define HAVE_TANF 1
#define HAVE_TRUNC 1
#define HAVE_TRUNCF 1
#define HAVE_SIGACTION 1
#define HAVE_SETJMP 1
#define HAVE_NANOSLEEP 1
#define HAVE_POW 1
#define SDL_AUDIO_DRIVER_DUMMY 1
#define SDL_AUDIO_DRIVER_OSS 1
#define SDL_INPUT_LINUXEV 1
#define SDL_JOYSTICK_LINUX 1
#define SDL_JOYSTICK_VIRTUAL 1
#define SDL_HAPTIC_LINUX 1
#define SDL_SENSOR_DUMMY 1
#define SDL_LOADSO_DLOPEN 1
#define SDL_THREAD_PTHREAD 1
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP 1
#define SDL_TIMER_UNIX 1
#define SDL_VIDEO_DRIVER_DUMMY 1
#define SDL_VIDEO_DRIVER_PANDORA 1
#define SDL_VIDEO_RENDER_OGL_ES 1
#define SDL_VIDEO_OPENGL_ES 1
#endif /* SDL_config_wiz_h_ */

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -65,6 +65,15 @@ _m_prefetch(void *__P)
#elif defined(__FreeBSD__) || defined(__NetBSD__)
#include <sys/endian.h>
#define SDL_BYTEORDER BYTE_ORDER
/* predefs from newer gcc and clang versions: */
#elif defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__) && defined(__BYTE_ORDER__)
#if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
#define SDL_BYTEORDER SDL_LIL_ENDIAN
#elif (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
#define SDL_BYTEORDER SDL_BIG_ENDIAN
#else
#error Unsupported endianness
#endif /**/
#else
#if defined(__hppa__) || \
defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -102,6 +102,7 @@ typedef enum
SDL_KEYMAPCHANGED, /**< Keymap changed due to a system event such as an
input language or keyboard layout change.
*/
SDL_TEXTEDITING_EXT, /**< Extended keyboard text editing (composition) */
/* Mouse events */
SDL_MOUSEMOTION = 0x400, /**< Mouse moved */
@@ -243,6 +244,19 @@ typedef struct SDL_TextEditingEvent
Sint32 length; /**< The length of selected editing text */
} SDL_TextEditingEvent;
/**
* \brief Extended keyboard text editing event structure (event.editExt.*) when text would be
* truncated if stored in the text buffer SDL_TextEditingEvent
*/
typedef struct SDL_TextEditingExtEvent
{
Uint32 type; /**< ::SDL_TEXTEDITING_EXT */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 windowID; /**< The window with keyboard focus, if any */
char* text; /**< The editing text, which should be freed with SDL_free(), and will not be NULL */
Sint32 start; /**< The start cursor of selected editing text */
Sint32 length; /**< The length of selected editing text */
} SDL_TextEditingExtEvent;
#define SDL_TEXTINPUTEVENT_TEXT_SIZE (32)
/**
@@ -601,6 +615,7 @@ typedef union SDL_Event
SDL_WindowEvent window; /**< Window event data */
SDL_KeyboardEvent key; /**< Keyboard event data */
SDL_TextEditingEvent edit; /**< Text editing event data */
SDL_TextEditingExtEvent editExt; /**< Extended text editing event data */
SDL_TextInputEvent text; /**< Text input event data */
SDL_MouseMotionEvent motion; /**< Mouse motion event data */
SDL_MouseButtonEvent button; /**< Mouse button event data */

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

Some files were not shown because too many files have changed in this diff Show More