Alex Szpakowski
3bfada2e02
Android: resolve symlinks in SDL_AndroidGetInternalStoragePath (thanks Henrique Gemignani and cigumo!)
...
Fixes issues on modern Android versions when the path is used in code that explicitly doesn't follow symlinks (such as PHYSFS_mkdir).
2018-01-10 19:56:51 -04:00
Alex Szpakowski
7d5437bb31
metal: set max texture size based on device capability.
2018-01-07 22:00:37 -04:00
Alex Szpakowski
a8c0532c08
metal: Fix pipeline states to use the pixel format of the current render target, instead of a hard-coded format.
2018-01-07 16:57:32 -04:00
Alex Szpakowski
740a90af37
metal: Add support for YUV/NV12 texture formats.
2018-01-06 18:54:12 -04:00
Alex Szpakowski
9a8683b275
metal: use a private instead of managed buffer for the renderer's non-changing constant data.
...
Recommended by Xcode's Metal frame capture analysis.
2018-01-04 22:16:42 -04:00
Alex Szpakowski
990ebba55a
metal: Implement fast hardware clearing when possible, by deferring the start of a render pass until a clear or draw operation happens.
2018-01-04 19:29:33 -04:00
Alex Szpakowski
888198ee31
metal: Misc. improvements.
...
- Use a single buffer for various non-changing constants accessed by the GPU, instead of multiple buffers.
- Do the half-pixel offset for points and lines using a transform matrix so we don't need a malloc when rendering.
- Don't add a half-pixel offset for other primitives and textures. This matches D3D and GL render behaviour.
- Remove the half-texel texture coordinate offset since it's not needed now that there's no more half-pixel position offset when rendering a texture.
- Don't try to set texture usage on iOS 8 since it doesn't exist there.
2018-01-03 00:43:01 -04:00
Alex Szpakowski
f9cd765020
metal and moltenvk: fix highdpi.
2018-01-02 21:44:28 -04:00
Alex Szpakowski
ef1014ac68
configure script: Implement testing for build-time Metal SDK support.
2018-01-02 19:06:14 -04:00
Alex Szpakowski
07f08b47ff
metal: Fix a typo preventing iOS compilation...
2018-01-01 23:06:08 -04:00
Alex Szpakowski
1cc6603378
metal: Clean up manual reference counting. Fixes some memory leaks.
2018-01-01 23:03:50 -04:00
Alex Szpakowski
a452a08458
iOS: fix build
2018-01-01 19:40:29 -04:00
Alex Szpakowski
639ea9fdbc
metal: Use sampler state objects instead of shader-declared samplers for linear vs nearest filtering.
...
This avoids a ton of shader duplication once multiple shaders that use samplers are added (e.g. the currently missing YUV shaders).
2018-01-01 19:37:16 -04:00
Alex Szpakowski
cf45cf70e5
metal: Add support for custom blend modes.
2018-01-01 18:06:27 -04:00
Alex Szpakowski
85470a2f95
metal: implement SDL_RenderCopyEx, and fix a memory leak in SDL_CreateTexture.
2017-12-31 21:06:16 -04:00
Alex Szpakowski
047d387b2e
metal: Use the existing cocoa code for creating a Metal view on macOS. Fixes the renderer size when the window is resized.
2017-12-31 15:30:08 -04:00
Alex Szpakowski
48fea0cee4
macOS: Fix MoltenVK Metal view resizing, and allow the metal view to be used without vulkan.
2017-12-31 15:21:25 -04:00
Alex Szpakowski
42b19c9749
metal: Respect the vsync flag on macOS 10.13+.
2017-12-30 22:39:55 -04:00
Alex Szpakowski
e24dc9053b
metal: use a projection matrix instead of manually transforming vertices into clip space on the CPU.
2017-12-30 20:32:22 -04:00
Alex Szpakowski
49df65c25a
metal: only 4 (instead of 5) vertices are needed to draw rectangles and textures, and only 3 (instead of 5) vertices are needed to cover the screen for the 'full-screen quad' when clearing.
2017-12-30 18:48:07 -04:00
Alex Szpakowski
64ec4c3334
macOS: Make sure the desktop's display mode is always in SDL's list of display modes.
2017-12-29 22:13:40 -04:00
Alex Szpakowski
5501bcc834
macOS: Fix an OS-generated warning printed to stdout on launch in bundled apps.
2017-11-09 22:24:09 -04:00
Alex Szpakowski
fb071a4cd9
Mac: Fix the menu bar not always working for non-.app-bundled apps. Fixes bug #3051 .
2017-09-25 20:49:31 -03:00
Alex Szpakowski
e5cfb58f4a
iOS MoltenVK code style cleanup.
2017-09-21 20:30:25 -03:00
Alex Szpakowski
80f9e2f199
iOS: Fix compiling using the iOS 7 SDK, partially broken since MoltenVK support was added.
...
Note that apps submitted to the iOS App Store *must* use a modern iOS SDK (currently iOS 10 is probably the minimum), however the SDK used to build is separate from the minimum iOS version an app supports at runtime.
2017-09-21 20:11:44 -03:00
Alex Szpakowski
d452b89f9b
iOS: I don't think SDL compiles with the iOS 7 SDK anymore, so we might as well drop the #ifdefs trying to guard for that.
2017-09-20 11:01:32 -03:00
Alex Szpakowski
12fb004fba
iOS: remove an unused static variable
2017-09-20 10:53:41 -03:00
Alex Szpakowski
20207abf80
macOS: Update controller mapping of Steelseries Stratus XL to account for reversed thumbstick y-axis values (bug #3483 ).
2017-08-31 22:07:28 -03:00
Alex Szpakowski
d7ae313134
macOS: Fix menubar items being enabled when they shouldn't be.
2017-08-31 21:34:29 -03:00
Alex Szpakowski
b959be2569
Code style cleanup in the Cocoa and UIKit vulkan files.
2017-08-31 21:26:13 -03:00
Alex Szpakowski
cfd7a7fac6
macOS: Prevent unwanted native fullscreen (Spaces) toggles when the window is in fullscreen or isn't resizable. Fixes bug #3691 .
2017-08-31 21:13:32 -03:00
Alex Szpakowski
3d0f521be5
iOS 10: Work around screen bounds orientation bug. Fixes bugs #3465 and #3505 .
2017-08-18 23:23:30 -03:00
Alex Szpakowski
efc43a1d88
More cleanup of the iOS keyboard demo.
2017-08-15 23:00:54 -03:00
Alex Szpakowski
a0a09f646c
Improve iOS keyboard demo code a bit.
2017-08-15 22:53:57 -03:00
Alex Szpakowski
2e4248ed44
Address a compiler warning.
2017-08-15 18:29:47 -03:00
Alex Szpakowski
9be597a0d6
iOS: Fix app orientation when creating a landscape fullscreen window with the device currently in portrait orientation.
2017-08-12 22:16:04 -03:00
Alex Szpakowski
01050d4ed1
iOS: Use modern replacements for deprecated functions, when available.
2017-07-15 17:41:58 -03:00
Alex Szpakowski
efe179cdfe
macOS: Fix compilation when using 10.11 or earlier to build.
2017-07-14 17:42:11 -03:00
Alex Szpakowski
562473c1f4
macOS: Address more compiler warnings when building with a recent deployment target.
2017-07-13 23:09:37 -03:00
Alex Szpakowski
bc3ede1ed0
macOS: Replace uses of deprecated Cocoa enum names with modern/consistent equivalents.
2017-07-13 22:59:02 -03:00
Alex Szpakowski
e0ea4da4ae
Fix a potential crash in macOS 10.7 and earlier.
2017-07-12 21:32:10 -03:00
Alex Szpakowski
8292d73ebb
macOS: Expose more display modes on retina screens. Fixes an issue found in BZFlag.
2017-07-12 21:28:32 -03:00
Alex Szpakowski
bb100d3bab
Expose display refresh rate on iOS/tvOS 10.3+.
2017-06-10 21:29:37 -03:00
Alex Szpakowski
75fb07a6d2
iOS: Only mark interrupted audio devices as non-interrupted if AudioQueueStart is successful.
2017-05-03 18:05:29 -03:00
Alex Szpakowski
fd85f5748d
Mac: back out commit 3e9b2ae41adf. It causes significant overhead on many GPUs.
2016-12-23 22:49:37 -04:00
Alex Szpakowski
d719374cb9
Mac: Fix over-saturated colors on P3 displays (e.g. the 2016 MBPs).
2016-12-23 22:08:18 -04:00
Alex Szpakowski
eda74fda96
tvOS: Expose remote swipe gestures as arrow key presses (thanks oviano!)
2016-12-18 13:05:14 -04:00
Alex Szpakowski
787a54c84b
iOS bug #3377 : work around bugs in some third party iOS libraries (e.g. Google admob) where they assume the optional UIApplicationDelegate ?window? property always exists and will crash if it doesn?t.
2016-12-18 12:28:28 -04:00
Alex Szpakowski
8500de8fa5
Fix tabs -> spaces
2016-10-01 19:16:46 -03:00
Alex Szpakowski
f0539aa25e
Fix bug 3436 - SDL_RaiseWindow not working on windows
2016-10-01 19:12:58 -03:00
Alex Szpakowski
571f4ce8a6
Fix CMake setting an incorrect video backend on iOS
2016-10-01 17:05:29 -03:00
Alex Szpakowski
f31c7086d8
Enable SDL_LoadObject on iOS 8+ and tvOS.
2016-09-25 15:02:06 -03:00
Alex Szpakowski
77bacfd72d
tvOS launch images are now properly supported.
2016-09-25 11:46:25 -03:00
Alex Szpakowski
a8b033d7c4
Update the code for the iOS demos to handle modern devices. Fixes bug #3337
2016-09-25 00:23:35 -03:00
Alex Szpakowski
40ecac8e60
Don't try to load a launch storyboard on tvOS (it doesn't use them).
2016-09-25 00:21:12 -03:00
Alex Szpakowski
666d3fecc8
iOS/tvOS: Try to load the launch screen as a storyboard. Xcode 8 compiles it as a storyboard instead of a nib.
2016-09-24 23:33:49 -03:00
Alex Szpakowski
9165ba7ebd
iOS/tvOS: Always send SDL_WINDOWEVENT_FOCUS_GAINED when a window is created on the main screen (fixes bug #3395 ).
2016-09-24 20:12:57 -03:00
Alex Szpakowski
450fa8cdf9
Use OS-provided click counts on macOS and iOS for mouse press and release events.
2016-09-24 18:46:34 -03:00
Alex Szpakowski
bac5394127
Fix mouse wheel events on macOS 10.12 (thanks Eric Wasylishen!)
...
Fixes bug #3432
2016-09-24 13:28:40 -03:00
Alex Szpakowski
f0fca2880f
Handle audio interruptions on iOS/tvOS. Fixes bugs 2569 and 2960.
2016-09-18 19:22:09 -03:00
Alex Szpakowski
459102a5c0
Updated URL in a comment
2016-09-17 01:36:29 -03:00
Alex Szpakowski
a96b6f2104
Added a new hint SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION.
...
When set to "1", the orientation of the Apple TV remote affects the axes of the corresponding SDL joystick. It is "0" (disabled) by default.
2016-09-17 01:31:07 -03:00
Alex Szpakowski
4bcce330d1
tvOS: Add drop-file support
2016-09-15 21:49:29 -03:00
Alex Szpakowski
4209a1fd4c
CoreAudio iOS/tvOS: Use AVFoundation instead of AudioSession. Fixes audio on tvOS.
...
Note that linking with AVFoundation is now required if you don't disable SDL_audio compilation on iOS and tvOS.
2016-09-15 19:59:57 -03:00
Alex Szpakowski
f050576665
Initial Apple TV / tvOS support.
...
The Apple TV remote is currently exposed as a joystick with its touch surface treated as two axes. Key presses are also generated when its buttons and touch surface are used.
A new hint has been added to help deal with deciding whether to background the app when the remote's menu button is pressed: SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS.
2016-09-13 22:18:06 -03:00
Alex Szpakowski
86708c3cd8
Enable more compiler warnings in the Xcode projects (based on Xcode 8's suggestion), made some integer downcasts explicit.
2016-09-13 19:51:10 -03:00
Alex Szpakowski
d0bd0e4855
iOS: Fix an OpenGL ES error when rotating the device if MSAA is used (thanks Cole Campbell!)
...
Fixes bug #3378 .
2016-07-02 13:38:31 -03:00
Alex Szpakowski
ea2f5e5930
Windows: Fix other window positions/sizes being changed when exiting exclusive fullscreen (bug #3315 , thanks Simon Hug!)
2016-05-23 15:29:25 -03:00
Alex Szpakowski
0a4085a048
Mac: Fix a crash when SDL is compiled with SDL_MAC_NO_SANDBOX enabled, by increasing the stack size of the mouse tap thread back to OS X' default of 512 KB.
2016-05-21 12:09:23 -03:00
Alex Szpakowski
4a468739f8
Removed Mac OS 10.5 support (bug #3137 ). Also fixed a warning about deprecated Carbon code when using SDL_audio (bug #3127 , thanks Dominik!)
2016-05-21 00:20:52 -03:00
Alex Szpakowski
b15efce277
Cocoa mouse code: Replaced NSPointInRect with NSMouseInRect (thanks Eric Wasylishen!) Fixes bug #3312 .
2016-05-01 21:41:30 -03:00
Alex Szpakowski
d383502657
Mac: replaced a deprecated CGSetLocalEventsSuppressionInterval call that I missed in commit 2f72bdfee9bb
2016-05-01 19:51:10 -03:00
Alex Szpakowski
34f095e098
iOS: Fixed SDL_GL_CreateContext crashing instead of returning null when a GLES3 context is requested on iOS 6 and older.
2016-04-10 22:07:10 -03:00
Alex Szpakowski
6cfa71a10e
iOS: Also do the Dictation crash workaround before executing the animation callback.
2016-04-02 13:21:01 -03:00
Alex Szpakowski
88372277b7
Add a new hint SDL_HINT_MAC_MOUSE_FOCUS_CLICKTHROUGH, which allows mouse click events to occur when clicking to focus a window in Mac OS X.
...
Fixes bug #3300 .
2016-04-02 11:54:05 -03:00
Alex Szpakowski
5520ed9cc2
iOS: Workaround for a crash after Dictation is used.
2016-04-01 19:18:50 -03:00
Alex Szpakowski
08488e6d34
Mac: avoid calling CGSetLocalEventsSuppressionInterval, it was deprecated in OS X 10.6.
2016-03-20 15:35:34 -03:00
Alex Szpakowski
2c3bf6658a
Windows CMake: don't try to link dxguid, it's unavailable when using Visual Studio's XP-compatible toolset.
2016-03-18 22:15:53 -03:00
Alex Szpakowski
33af421d7b
Windows: make sure SDL_TicksInit has been called before calling Sleep(ms) in SDL_Delay. This ensures the Windows system timer resolution is properly set before Sleep is called.
2016-02-14 21:17:25 -04:00
Alex Szpakowski
8e7cd6b5da
iOS: Implemented clipboard support.
2016-02-03 20:32:55 -04:00
Alex Szpakowski
325921789a
x11: Fix AltGr generating an invalid keycode (bug #3244 ). Thanks Thomas!
2016-01-31 09:39:42 -04:00
Alex Szpakowski
87ea39be84
Removed dead code (caught by Clang's static analyzer).
2016-01-09 17:41:09 -04:00
Alex Szpakowski
dd8c64779b
Updated WhatsNew.txt's 2.0.4 list to include a more detailed set of changes for iOS, and added a couple missing items to the OS X and Windows sections.
2015-06-18 12:20:46 -03:00
Alex Szpakowski
a86df3b7cf
iOS: Fixed some cases where SDL_DestroyWindow or SDL_GL_DeleteContext can cause crashes.
2015-06-09 21:08:24 -03:00
Alex Szpakowski
4aae0290ea
Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
2015-12-31 21:16:43 -04:00
Alex Szpakowski
b0d8dfcd8a
CMake: Fixed building for Windows with VS2015 (bug #3080 ).
...
- Don't try to link with the Visual C runtime.
- Avoid code generation that would use functions from the VC runtime.
2015-12-31 15:26:40 -04:00
Alex Szpakowski
4ae69e3222
Mac: expose joystick buttons that report themselves as having 'Start' and 'Select' HID usages.
...
I don't know if any joysticks report those usages for any buttons in practice, but other prominent Mac gaming software exposes them, so we might as well too.
2015-12-28 15:44:09 -04:00
Alex Szpakowski
4026980917
Cleaned up some code formatting.
2015-12-18 00:49:27 -04:00
Alex Szpakowski
cb15bb4cfa
iOS: Set the player index of MFi gamepads when the user first presses a button, rather than when it's programatically opened.
2015-12-11 16:41:59 -04:00
Alex Szpakowski
a2235d7b29
Cocoa: Use NSTextInputClient instead of NSTextInput for text input handling. The latter was deprecated in OS X 10.6.
2015-12-10 22:17:22 -04:00
Alex Szpakowski
0c463d770b
SDL_GL_GetAttribute: If a GL context isn't active, only return failure when the specified attribute needs an active GL context to be queried.
2015-12-10 20:25:34 -04:00
Alex Szpakowski
6a50d33385
Removed some debug prints.
2015-11-30 03:30:35 -04:00
Alex Szpakowski
9ddc6c3441
Mac: Fixed SDL_SetWindowFullscreen not restoring the window's original size when exiting a Space.
2015-11-30 03:30:07 -04:00
Alex Szpakowski
998a54f9c5
Mac: Fix a warning about implicit declaration of SDL_SendKeymapChangedEvent (bug #3167.)
2015-11-14 04:24:39 -04:00
Alex Szpakowski
2816d4477d
Mac: Added SDL_GameController mappings for the Steelseries Stratus XL and Nimbus gamepads.
2015-11-12 22:53:37 -04:00
Alex Szpakowski
9c51c4a639
Mac: Detect the d-pad and pause buttons on Steelseries MFi gamepads (bug #3124.)
2015-11-12 22:44:32 -04:00
Alex Szpakowski
7267835842
iOS: Fixed crashes when rotating the screen after destroying a window.
2015-11-12 20:58:11 -04:00
Alex Szpakowski
0da59802aa
iOS: Set the 'player index' of MFi game controllers when they're opened for use.
...
MFi controllers display their player index via LEDs on the controller.
2015-11-09 18:13:47 -04:00
Alex Szpakowski
84f6bc41b8
iOS: Fixed MFi game controller triggers to report the proper range of values.
2015-11-09 17:41:54 -04:00
Alex Szpakowski
7ce64372c8
iOS MFi game controllers: inverted the thumbstick y axis values to match the behavior of other controllers.
2015-11-09 02:32:37 -04:00