src/video/uikit


Log

Author Commit Date CI Message
Alex Szpakowski bda618a2 2019-10-27T11:41:48 iOS: remove some unused code, minor code style cleanup.
Alex Szpakowski df49e2a5 2019-10-27T11:41:11 iOS: replace a deprecated function call with a non-deprecated equivalent.
Sam Lantinga bf9092cf 2019-10-17T17:47:11 Removed unused variable
Alex Szpakowski 79cd6cfc 2019-08-15T19:38:12 iOS: Fix issues with Split VIew on iPad (bugs #4586, #4705).
Sam Lantinga 2a1adf71 2019-08-05T23:52:16 Fixed bug 4747 - [Patch] SDL_ShowMessageBox ignores BUTTON_RETURNKEY_DEFAULT flag Caleb Cornett SDL_ShowMessageBox on UIKit doesn't do anything special with buttons that are marked with the flag SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT. According to Apple's documentation on UIAlertController, a button can respond to a return key if it's marked as the preferredAction of the controller. SDL doesn't set a preferredAction currently, so I've attached a patch to fix that.
Alex Szpakowski aebaa316 2019-08-05T12:35:32 Add public APIs for creating a Metal view attached to an SDL window. Add SDL_metal.h.
Sam Lantinga 63197c43 2019-08-02T17:19:50 Fix bug where the wrong button was the default in the old message box because buttons were added backwards, breaking the indexing used by GetButtonIndex. Add messagebox flags to explicilty request left-to-right button order or right-to-left. If neither is specified it'll be some platform default.
Alex Szpakowski d5ec735a 2019-08-01T18:22:12 Add a windowID field to SDL_TouchFingerEvent (bug #4331). This is unimplemented on some platforms and will cause compile errors when building those platform backends for now.
Ethan Lee bf9bf602 2019-07-17T23:20:57 Copypaste SDL_NSLog to UIKit backend, document it as such
Alex Szpakowski 027887da 2019-07-01T14:52:56 iOS: Fix the window size not being set properly when Split View is used on an iPad (bug #4586).
Alex Szpakowski f4625f52 2019-06-16T13:52:27 iOS: remove some code which could affect the state of UIViews that aren't owned by SDL. It was originally added to work around an input event problem in the code of a specific app which mixed SDL and native UIViews, but that app solved its problems in a better manner since then.
Sam Lantinga 1213fe79 2019-06-14T13:56:42 Worked around "Undefined symbol: ___isPlatformVersionAtLeast()" link error on Xcode 11 beta
Alex Szpakowski 74e86a51 2019-06-12T19:15:56 iOS: Remove didAddSubview override in NSWindow, its code breaks things which rely on focus changing within SDL's UIWindow (bug #4659).
Sam Lantinga 69d27a69 2019-06-11T18:13:46 Fixed bug 4570 - Support Vulkan Portability rather than MoltenVK specifically Dzmitry Malyshau Current code, search paths, and error messages are written to only consider MoltenVK on macOS as a Vulkan Portability implementation. It's not the only implementation available to the users. gfx-portability [1] has been shown to run a number of titles well, including Dota2, Dolphin Emulator, and vkQuake3, often out-performing MoltenVK in frame rate and stability (see Dolphin benchmark [2]). There is no reason for SDL to be that specific, it's not using any MVK-specific functions other than the WSI initialization ("VK_MVK_macos_surface"). gfx-portability exposes this extension as well, and a more generic WSI extension is in process. It would be good if SDL was written in a more generic way that expect a Vulkan Portability library as opposed to MoltenVK specifically. [1] https://github.com/gfx-rs/portability [2] https://gfx-rs.github.io/2019/03/22/dolphin-macos-performance.html
Sam Lantinga e43550c0 2019-06-09T14:08:18 Fixed bug 4658 - iOS 12 fullscreen flag and SDL_HINT_IOS_HIDE_HOME_INDICATOR not working Caleb Cornett On iOS 12, creating a window with the SDL_WINDOW_FULLSCREEN flag does not dim the home indicator or defer system gestures. The same goes for setting the SDL_HINT_IOS_HIDE_HOME_INDICATOR to "2" -- it has no effect at all. I've tracked down the source of this misbehavior to a timing issue. The initial `setNeedsUpdate...` calls were happening too early and getting applied to the launch screen by mistake. In the attached patch, I've added a call to those functions right after the launch screen is hidden so that they apply to the main view controller instead. This appears to fix the issue, at least on my iPhone 6s Plus.
Alex Szpakowski 9b581159 2019-05-26T18:53:36 iOS: return SDL_GetWindowSize from SDL_GL_GetDrawableSize if there's no GLES view in the window (matches the behaviour of SDL_GL_GetDrawableSize on other platforms). Addresses bug #4629.
Sam Lantinga 7ec514d4 2019-05-22T17:39:51 Improved iOS Bluetooth keyboard support * Don't stop text input after the return key is pressed * Handle arrow and escape keys
Sam Lantinga a4e33b9c 2019-05-20T14:31:03 Added support for Bluetooth keyboards on iOS In this case the keyboard is shown and immediately hidden, but we still want to accept text input
Sam Lantinga 582a3c99 2019-05-20T14:08:35 Fixed mouse focus for touch events on iOS
Sam Lantinga 59da5b72 2019-05-14T07:55:42 [SDL] ios Touch Fix.
Alex Szpakowski 90b08881 2019-04-17T20:41:05 iOS: Remove code trying to support compilation on the iOS 7 SDK, the deployment target has been set to iOS 8 for years and there's other unconditionally compiled code that depends on newer SDKs so that code is useless.
Sam Lantinga b6f33a68 2019-04-05T07:51:11 https://bugzilla.libsdl.org/show_bug.cgi?id=4577 SDL_GetWindowDisplayMode was returning an incorrect result on iPhone Plus devices (tested on iOS 12.1/12.2). The problem was that the value returned by UIScreenMode was assumed to be the physical pixels on the display, rather than the scaled retina pixels. The fix is to use the scale returned by UIScreen.scale rather than the nativeScale.
Sylvain Becker 9d28156f 2019-04-02T17:18:47 Bug 4576: remove touch/mouse duplication for IOS
Sam Lantinga de82759c 2019-03-19T07:53:33 Added support for building SDL as a dynamic library on iOS
Sam Lantinga 82758efc 2019-03-12T14:45:04 [iOS DAC] Fix touch events getting from SDL2 to source2.
Sam Lantinga 5e13087b 2019-01-04T22:01:14 Updated copyright for 2019
Alex Szpakowski 5029d50e 2018-11-10T16:15:48 Add SDL_TouchDeviceType enum and SDL_GetTouchDeviceType(SDL_TouchID id). Touch device types include SDL_TOUCH_DEVICE_DIRECT (a touch screen with window-relative coordinates for touches), SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE (a trackpad-style device with absolute device coordinates), and SDL_TOUCH_DEVICE_INDIRECT_RELATIVE (a trackpad-style device with screen cursor-relative coordinates). Phone screens are an example of a direct device type. Mac trackpads are the indirect-absolute touch device type. The Apple TV remote is an indirect-relative touch device type.
Alex Szpakowski e2ad654f 2018-10-14T17:26:10 iOS: Don't ignore the requested alpha bit size when determining whether to use an RGBA8 backbuffer.
Alex Szpakowski d9094421 2018-10-12T17:55:42 metal: Fix high dpi and resizing on macOS, and clean up iOS code. Fixes bug #4250.
Sam Lantinga 5febdfce 2018-09-24T11:49:25 Fixed whitespace
Sam Lantinga 0b3a350c 2018-09-10T23:01:33 Fixed Chinese IME support (thanks ???!)
Sam Lantinga af823cc1 2018-09-10T23:00:09 Fixed building on tvOS
Sam Lantinga 088070e5 2018-08-22T23:47:29 Moved display orientation handling on iOS out to a separate function for Qt apps
Sam Lantinga f225af0c 2018-08-22T21:48:28 Added SDL_GetDisplayOrientation() to get the display orientation, and added a new event SDL_DISPLAYEVENT to notify the application when the orientation changes. Documented the values returned by the accelerometer and gyroscope sensors
Sam Lantinga 6f758ad2 2018-08-21T20:03:54 Moved SDL_IsTablet() to a cross-platform API function
Sam Lantinga 109544ca 2018-08-21T11:23:47 Add SDL_IsTablet() to Android and iOS SDL.
Ryan C. Gordon 3d387098 2018-05-27T20:30:03 metal: contrary to documentation, we need to set the drawableSize explicitly. Fixes Bugzilla #4149.
Sam Lantinga 999af809 2018-05-18T13:09:30 Merged latest changes from Steam Link app
Sam Lantinga ac2d1f67 2018-03-02T12:08:18 Fixed setting the layer drawable size Without this change the drawable had a size of 0 and the metal renderer asserted because the projection matrix wasn't set.
Mark Callow 69958441 2018-02-21T09:58:21 Fix high-dpi support on macOS and simplify it and iOS variant. The detault drawableSize for a CAMetalLayer is its bounds x its scale. So it is sufficient to set the *layer's* scale to the desired value.
sezero 40b27fd5 2018-02-12T17:00:00 revert the recent typecast assignment changes (see bug #4079) also change the void* typedefs for the two vulkan function pointers added in vulkan_internal.h into generic function pointer typedefs.
Sam Lantinga 73c26c20 2018-02-06T16:43:31 Send Apple TV remote input as key events unless it's opened as a joystick, to match Android behavior.
Sam Lantinga f59b9c8b 2018-02-06T15:03:38 Replaced SDL_HINT_APPLE_TV_REMOTE_SWIPES_AS_ARROW_KEYS with SDL_HINT_TV_REMOTE_AS_JOYSTICK which controls whether remotes on iOS and Android are interpreted as joysticks (the default) or as return/escape/arrow keys.
Sam Lantinga 35322ed8 2018-02-01T15:46:51 Fixed building on tvOS
Sam Lantinga 85c34e9a 2018-02-01T15:21:01 Added SDL_HINT_IOS_HIDE_HOME_INDICATOR to determine how the home indicator on the iPhone X is handled. This variable can be set to the following values: "0" - The indicator bar is not hidden (default for windowed applications) "1" - The indicator bar is hidden and is shown when the screen is touched (useful for movie playback applications) "2" - The indicator bar is dim and the first swipe makes it visible and the second swipe performs the "home" action (default for fullscreen applications)
Sam Lantinga 90e72bf4 2018-01-30T18:08:34 Fixed ISO C99 compatibility SDL now builds with gcc 7.2 with the following command line options: -Wall -pedantic-errors -Wno-deprecated-declarations -Wno-overlength-strings --std=c99
Sam Lantinga 9338a619 2018-01-17T17:24:15 Added a hint SDL_HINT_APPLE_TV_REMOTE_SWIPES_AS_ARROW_KEYS to prevent turning Apple TV remote swipes into arrow key events
Sam Lantinga e3cc5b2c 2018-01-03T10:03:25 Updated copyright for 2018
Sam Lantinga b92e2f02 2017-12-19T10:57:21 Fixed bug 4004 - iOS: don't hide keyboard on RETURN Dominik Reichardt As discussed in 2012 the iOS onscreen keyboard hides when you hit RETURN (see https://discourse.libsdl.org/t/on-screen-keyboard-change/19216). IMO this is a bad idea to not be able to influence this behavior and just recently this was fixed for Android by adding the hint SDL_HINT_ANDROID_RETURN_HIDES_IME in changeset 11768 6ce3bb5e38a5.
Sam Lantinga 127841f3 2017-12-08T11:33:27 Fixed compiler warning
Sam Lantinga ba9c336e 2017-12-07T17:47:01 Fixed building for simulators or older iOS SDKs
Sam Lantinga 6deb1e75 2017-12-07T17:12:03 Fixed compiling Metal renderer on iOS
Sam Lantinga cadf3e44 2017-12-07T09:35:28 The Metal view is a full SDL_uikitview to support multi-touch
Alex Szpakowski e5cfb58f 2017-09-21T20:30:25 iOS MoltenVK code style cleanup.
Sam Lantinga f0a324f8 2017-09-20T19:59:34 Reverted Alex's commit 131cba1768a5 - we're about to release 2.0.6, don't remove support for the iOS 7 SDK yet.
Alex Szpakowski d452b89f 2017-09-20T11:01:32 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.
Alex Szpakowski 12fb004f 2017-09-20T10:53:41 iOS: remove an unused static variable
Sam Lantinga cfe72c76 2017-09-14T09:55:27 Fixed iOS keyboard positioning, based on the final position rather than the initial one
Alex Szpakowski b959be25 2017-08-31T21:26:13 Code style cleanup in the Cocoa and UIKit vulkan files.
Sam Lantinga 50efbda7 2017-08-28T00:43:14 Fixed mingw Windows build, since SDL_vulkan_internal.h includes windows.h
Sam Lantinga 0d011ec6 2017-08-28T00:22:23 Renaming of guard header names to quiet -Wreserved-id-macro
Sam Lantinga ce2b1644 2017-08-28T00:11:38 Be clear that disabling Vulkan surface support disables the entire SDL Vulkan integration
Ryan C. Gordon 25e3a1ec 2017-08-27T22:15:57 vulkan: Initial Vulkan support! This work was done by Jacob Lifshay and Mark Callow; I'm just merging it into revision control.
Alex Szpakowski 3d0f521b 2017-08-18T23:23:30 iOS 10: Work around screen bounds orientation bug. Fixes bugs #3465 and #3505.
Alex Szpakowski a0a09f64 2017-08-15T22:53:57 Improve iOS keyboard demo code a bit.
Sam Lantinga de91b124 2017-08-14T06:28:21 Fixed bug 3745 - specify SDLCALL as the calling convention for API callbacks Patches contributed by Ozkan Sezer
Alex Szpakowski 9be597a0 2017-08-12T22:16:04 iOS: Fix app orientation when creating a landscape fullscreen window with the device currently in portrait orientation.
Alex Szpakowski 01050d4e 2017-07-15T17:41:58 iOS: Use modern replacements for deprecated functions, when available.
Alex Szpakowski bb100d3b 2017-06-10T21:29:37 Expose display refresh rate on iOS/tvOS 10.3+.
Sam Lantinga 9ac3bb70 2017-05-09T10:10:42 Added support for mixing Qt and SDL on iOS You should call SDL_SetMainReady(), and then customize the QIOSApplicationDelegate like this, in your application code: /* Additional support for applications mixing Qt and SDL */ @interface QIOSApplicationDelegate : UIResponder <UIApplicationDelegate> @end extern "C" { void SDL_OnApplicationWillResignActive(); void SDL_OnApplicationDidEnterBackground(); void SDL_OnApplicationWillEnterForeground(); void SDL_OnApplicationDidBecomeActive(); } @interface QIOSApplicationDelegate (SDL) - (void)applicationWillResignActive:(UIApplication*)application; - (void)applicationDidEnterBackground:(UIApplication*)application; - (void)applicationWillEnterForeground:(UIApplication*)application; - (void)applicationDidBecomeActive:(UIApplication*)application; @end @implementation QIOSApplicationDelegate (SDL) - (void)applicationWillResignActive:(UIApplication*)application { SDL_OnApplicationWillResignActive(); } - (void)applicationDidEnterBackground:(UIApplication*)application { SDL_OnApplicationDidEnterBackground(); } - (void)applicationWillEnterForeground:(UIApplication*)application { SDL_OnApplicationWillEnterForeground(); } - (void)applicationDidBecomeActive:(UIApplication*)application { SDL_OnApplicationDidBecomeActive(); } @end // QIOSApplicationDelegate
Philipp Wiesemann 266816b4 2017-03-26T21:00:19 Removed newlines from error messages.
Sam Lantinga 45b774e3 2017-01-01T18:33:28 Updated copyright for 2017
Sam Lantinga b4e069e7 2016-12-26T02:12:21 Fixed bug 3517 - Compiler warnings with gcc -Wstrict-prototypes felix Compiling even a simple SDL2 'hello world' program with gcc -Wstrict-prototypes (GCC 6.2.1) results in warnings like: /usr/include/SDL2/SDL_gamecontroller.h:143:1: attention : function declaration isn't a prototype [-Wstrict-prototypes] extern DECLSPEC int SDLCALL SDL_GameControllerNumMappings(); ^~~~~~ It seems there is a missing 'void' between the parentheses.
Alex Szpakowski eda74fda 2016-12-18T13:05:14 tvOS: Expose remote swipe gestures as arrow key presses (thanks oviano!)
Alex Szpakowski 787a54c8 2016-12-18T12:28:28 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.
Sam Lantinga 524bf3c2 2016-12-09T01:47:43 Fixed bug 3513 - SDL_GL_SwapWindow does not return error status Return an error code from SDL_GL_SwapWindow(), like the other SDL APIs.
Sam Lantinga 84c0780e 2016-12-02T02:21:35 Fixed bug 3305 - Fixed TextInput status when the keyboard was dismissed with the dismiss key on the iPad Diego I was previously unaware that rotating the device to a different orientation when the keyboard is shown causes a keyboardWillHide followed by a keyboardWillShow notification. The previous patch would then mistakenly StopTextInput when rotating. This patch fixes that by checking if the device is rotating before stopping text input.
Sam Lantinga 27d4f099 2016-10-07T23:40:44 Implemented SDL_GetHintBoolean() to make it easier to check boolean hints
Sam Lantinga 765d8bea 2016-10-01T12:46:36 Fixed bug 3305 - Fixed TextInput status when the keyboard was dismissed with the dismiss key on the iPad Diego The keyboard on iPads has a dismiss button that hides the keyboard. When the keyboard was hidden using that button, instead of the return key, SDL was still reporting IsTextInputActive as true. This patch adds an extra SDL_StopTextInput when iOS reports the keyboard will hide.
Alex Szpakowski f31c7086 2016-09-25T15:02:06 Enable SDL_LoadObject on iOS 8+ and tvOS.
Alex Szpakowski 77bacfd7 2016-09-25T11:46:25 tvOS launch images are now properly supported.
Alex Szpakowski 40ecac8e 2016-09-25T00:21:12 Don't try to load a launch storyboard on tvOS (it doesn't use them).
Alex Szpakowski 666d3fec 2016-09-24T23:33:49 iOS/tvOS: Try to load the launch screen as a storyboard. Xcode 8 compiles it as a storyboard instead of a nib.
Alex Szpakowski 9165ba7e 2016-09-24T20:12:57 iOS/tvOS: Always send SDL_WINDOWEVENT_FOCUS_GAINED when a window is created on the main screen (fixes bug #3395).
Alex Szpakowski 450fa8cd 2016-09-24T18:46:34 Use OS-provided click counts on macOS and iOS for mouse press and release events.
Alex Szpakowski 4bcce330 2016-09-15T21:49:29 tvOS: Add drop-file support
Alex Szpakowski f0505766 2016-09-13T22:18:06 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.
Sam Lantinga 1096f323 2016-09-09T15:12:09 Reverted previous commit which breaks game controller input processing.
Sam Lantinga 61c0f2cf 2016-09-08T20:38:23 Suggestion from Apple: use kCFRunLoopCommonModes which does more complete event processing
Alex Szpakowski d0bd0e48 2016-07-02T13:38:31 iOS: Fix an OpenGL ES error when rotating the device if MSAA is used (thanks Cole Campbell!) Fixes bug #3378.
Alex Szpakowski 34f095e0 2016-04-10T22:07:10 iOS: Fixed SDL_GL_CreateContext crashing instead of returning null when a GLES3 context is requested on iOS 6 and older.
Alex Szpakowski 6cfa71a1 2016-04-02T13:21:01 iOS: Also do the Dictation crash workaround before executing the animation callback.
Alex Szpakowski 5520ed9c 2016-04-01T19:18:50 iOS: Workaround for a crash after Dictation is used.
Philipp Wiesemann 7da168db 2016-02-10T19:31:23 Fixed spaces in license comments.
Alex Szpakowski 8e7cd6b5 2016-02-03T20:32:55 iOS: Implemented clipboard support.
Alex Szpakowski 87ea39be 2016-01-09T17:41:09 Removed dead code (caught by Clang's static analyzer).
Ryan C. Gordon 49e47688 2016-01-05T05:38:55 Patched to compile on iOS.
Ryan C. Gordon eeb89999 2016-01-05T05:22:35 Patched to compile.
Ryan C. Gordon c3114975 2016-01-04T23:52:40 Added SDL_GetDisplayUsableBounds().
Sam Lantinga 42065e78 2016-01-02T10:10:34 Updated copyright to 2016