|
70656b13
|
2022-11-15T10:18:41
|
|
Don't recreate the window when creating a Metal renderer on an OpenGL window.
It turns out that we can safely create a Metal view on an existing window, and that avoids issues with the window being recreated with the wrong orientation in iOS 16.
Fixes https://github.com/libsdl-org/SDL/issues/6289
|
|
a40b7cde
|
2022-11-14T13:03:52
|
|
Workaround for views being in portrait instead of landscape mode on iOS 16
Fixes https://github.com/libsdl-org/SDL/issues/6289
|
|
f430ef5d
|
2022-11-10T17:27:48
|
|
Don't change the window position when creating it on iOS, it is already placed on the correct display
|
|
413500ab
|
2022-10-22T09:37:34
|
|
Replaced mouseWheelGesture with GCMouse support on iOS (thanks @russelltg!)
Fixes https://github.com/libsdl-org/SDL/issues/6411
|
|
2ebaafa6
|
2022-10-18T21:02:49
|
|
Use translationInView for mouse wheel event
|
|
d2160c29
|
2022-10-05T21:42:26
|
|
iOS: implement SDL_GetWindowSizeInPixels.
|
|
92c71ae3
|
2022-10-05T21:59:08
|
|
[iOS] respect initial status bar configuration when displaying the launch storyboard
|
|
5b131364
|
2022-08-06T10:48:53
|
|
[UIKit] handle app lifecycle events in a custom object instead of AppDelegate
removes the need to call SDL counterparts manually when custom AppDelegate is used
|
|
f8f562da
|
2022-10-02T22:55:49
|
|
iOS: remove dead pre-iOS 8 codepaths.
SDL hasn't supported those older iOS versions for a little while now.
|
|
bbeacd72
|
2022-10-02T22:57:03
|
|
Fix some credit comments.
|
|
28572702
|
2022-09-30T17:25:57
|
|
Properly backspace over text that was entered when autocorrect updates text with the iPhone on-screen keyboard
|
|
2b93f6e1
|
2022-05-20T09:55:06
|
|
cocoa/uikit: Use VK_EXT_metal_surface in Vulkan_GetInstanceExtensions
Replaces VK_MVK_macos_surface and VK_MVK_ios_surface
|
|
029a9b2f
|
2022-05-19T12:57:35
|
|
cocoa/uikit: Support VK_EXT_metal_surface
Uses VK_EXT_metal_surface (vkCreateMetalSurfaceEXT)
when possible, otherwise falls back to the obsoleted
VK_MVK_macos_surface and VK_MVK_ios_surface.
Fixes #3906
|
|
0cc8dfdb
|
2022-08-15T07:44:56
|
|
Added SDL_system.h for the declaration of SDL_iPhoneSetAnimationCallback() and SDL_iPhoneSetEventPump()
|
|
20a76b0e
|
2022-07-25T23:06:58
|
|
video: removed unused devindex argument from bootstrap's create method.
|
|
b085c182
|
2022-07-04T16:38:05
|
|
make SDL_SetTextInputRect take a pointer to const
The documentation doesn't state that the argument is ever modified,
and no implementation does so currently.
This is a non-breaking change to guarantee as much to callers.
|
|
0ad65277
|
2022-06-29T17:26:09
|
|
Refactored code to send scancodes for an ASCII on-screen keyboard key
|
|
412ceb84
|
2022-05-24T16:27:54
|
|
video: Only check major version in SDL_GetWindowWMInfo
Since #5602, SDL is intended to have the same ABI across the whole
major-version 2 cycle, so we should not check that the minor version
matches the one that was used to compile an application.
There are two checks that could make sense here.
The first check is that the major version matches the expected major
version. This is usually unnecessary and is not usually done (if we're
calling into the wrong library we'll likely crash anyway), but since we
have the information, we might as well continue to use it.
The second check is whether the version provided by the caller is
equal to or greater than a threshold version at which additional fields
were added to the struct. If it is, we should populate those fields;
if it is not, then we cannot. This is only useful on platforms where
additional fields have genuinely been added during the lifetime of
SDL 2, like Windows and DirectFB (but not X11).
This commit changes the first check to be consistent about only looking
at the minor version, while leaving the second check using SDL_VERSIONNUM
(which will be removed or widened in SDL 3, but it's fine for now).
Resolves: https://github.com/libsdl-org/SDL/issues/5711
Fixes: cd7c2f1 "Switch versioning scheme to be the same as GLib and Flatpak"
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
6c2928b4
|
2022-04-29T19:30:47
|
|
Switch uses of MIN() to SDL_min()
We're excluding files in src/hidapi to minimize the
diff against the upstream project.
|
|
7e636b03
|
2022-04-29T10:16:14
|
|
Removed log message length limitation for Apple platforms
This works in conjunction with https://github.com/libsdl-org/SDL/pull/5584
|
|
5613a560
|
2022-04-07T11:32:22
|
|
Make sure the UIKit message box is being handled on the main thread
Potentially fixes https://github.com/libsdl-org/SDL/issues/4865
|
|
95f30c7a
|
2022-01-12T10:12:54
|
|
fix compiler warnings in video/uikit
|
|
4b38d4c9
|
2022-01-07T12:37:28
|
|
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
|
|
120c76c8
|
2022-01-03T09:40:00
|
|
Updated copyright for 2022
|
|
11ae43ca
|
2021-11-11T07:49:38
|
|
Only lock the pointer for mouse relative mode, there isn't really a concept of grab and confinement on iOS
Locking the pointer prevents the on-screen cursor from moving, which isn't what we want with a grab behavior.
Fixes https://github.com/libsdl-org/SDL/issues/4941
|
|
27ce9144
|
2021-11-09T20:51:42
|
|
Send absolute mouse motion when in normal mouse mode and relative mouse motion when in relative mode on iOS
This keeps the SDL cursor in sync with the visible cursor when in normal mouse mode.
|
|
19c129fa
|
2021-11-09T20:32:16
|
|
Added documentation that the UIApplicationSupportsIndirectInputEvents key must be set to true
in your application's Info.plist in order to get real Bluetooth mouse events.
|
|
007b5463
|
2021-10-21T22:50:33
|
|
video/uikit: Do not use setNeedsUpdateOfPrefersPointerLocked on iOS SDKs older than 14
|
|
f1633127
|
2021-07-24T13:41:55
|
|
Added a window flash operation to be explicit about window flash behavior
|
|
46f19c31
|
2021-07-08T07:23:29
|
|
Implemented mouse relative mode for iOS 14.1 and newer
|
|
cef198c9
|
2021-02-01T08:55:48
|
|
Fixed bug 5524 - Pass NSString to NSLog()
Hiroyuki Iwatsuki
If you pass the C string directly to NSLog(), it will be garbled with Japanese and probably other language strings, or no log will be output at all.
NSLog("Hello, World!"); // => "Hello, World!"
NSLog("こんにちは、世界!"); // => No output...
Therefore, you need to convert the string to an NSString before passing it to NSLog().
NSString *str = [NSString stringWithUTF8String:"こんにちは、世界!"];
NSLog(@"%@", str); // => "こんにちは、世界!"
Thank you.
|
|
9130f7c3
|
2021-01-02T10:25:38
|
|
Updated copyright for 2021
|
|
cb361896
|
2020-12-09T07:16:22
|
|
Fixed bug 5235 - All internal sources should include SDL_assert.h
Ryan C. Gordon
We should really stick this in SDL_internal.h or something so it's always available.
|
|
7b5a0a9f
|
2020-11-10T13:12:10
|
|
uikit: Don't implement main() twice for iOS static libs.
I think this was a leftover from before the two Xcode projects were merged.
|
|
de6d0ac5
|
2020-11-08T18:11:42
|
|
uikit: Patched to compile on older iOS SDKs.
|
|
58976bda
|
2020-10-15T12:00:15
|
|
Allow more than one window on iOS as long as they're on different displays
|
|
bdc5129f
|
2020-10-15T10:13:46
|
|
Use a high priority dispatch queue for GCKeyboard and GCMouse events for the lowest latency possible
This appears to reduce latency between 1-4 ms on an iPad Pro.
|
|
a3a0ef75
|
2020-10-15T10:13:44
|
|
Added support for low latency mouse and keyboard handling in iOS 14
The mouse support in iOS 14.0 has a bug with accumulating duplicate mouse deltas that won't be fixed until iOS 14.1, so we don't enable it until then.
|
|
b546db2f
|
2020-10-09T12:58:28
|
|
Only watch for display connect/disconnect events while the video subsystem is initialized
|
|
bd14f267
|
2020-10-08T16:58:34
|
|
Removed unused variable
|
|
76980e30
|
2020-10-08T16:42:20
|
|
Added events for dynamically connecting and disconnecting displays, with an iOS implementation
|
|
cd703b56
|
2020-10-08T16:41:48
|
|
Fixed whitespace
|
|
052a1373
|
2020-07-12T19:11:15
|
|
Merge VideoBootStrap::available into VideoBootStrap::create
The two are only ever called together, and combining them makes it possible
to eliminate redundant symbol loading and redundant attempts to connect
to a display server.
|
|
3ac24bfc
|
2020-06-08T17:01:50
|
|
Fixed mouse drag with an external mouse on iOS
|
|
57149c24
|
2020-05-27T10:27:20
|
|
Fixed building with --disable-joystick on iOS
|
|
b0b12e46
|
2020-04-27T13:31:10
|
|
Fixed running on older versions of iOS
|
|
14661d3f
|
2020-04-14T17:31:31
|
|
Added support for mousewheel on iOS
|
|
3e4856c9
|
2020-04-13T23:07:54
|
|
Fixed mouse button mapping on iOS
|
|
e1215e85
|
2020-04-13T22:50:46
|
|
Fixed mouse button mapping on iOS
|
|
dbf7f84f
|
2020-04-13T22:29:10
|
|
Implemented left/right mouse click detection on iOS
|
|
171ba00a
|
2020-04-13T19:44:26
|
|
Hide the mouse cursor appropriately on iOS
|
|
6f3fa02e
|
2020-04-13T18:25:38
|
|
Make sure we're using the bounds of the view for our mouse region
|
|
cab1ee9c
|
2020-04-13T15:57:04
|
|
Don't build iOS mouse support on Apple TV
|
|
e5d36299
|
2020-04-13T15:46:12
|
|
Added support for new mouse APIs in iOS 13.4
|
|
a7916890
|
2020-04-10T00:37:35
|
|
metal: Added some support interfaces to Apple's Metal API (thanks, Caleb!).
Caleb Cornett's comments:
"A few weeks ago, Alex added a partial Metal API to SDL2:
https://hg.libsdl.org/SDL/rev/22c8e7cd8d38
I noticed it was missing a few features that would help Metal become a
first-class citizen in SDL, so I went ahead and wrote them! Here are the new
APIs:
1. SDL_WINDOW_METAL flag for SDL_CreateWindow(). This allows the programmer
to specify that they intend to create a window for use with SDL_MetalView.
The flag is used to ensure correct usage of the API and to prevent
accidentally defaulting to OpenGL on iOS.
2. SDL_Metal_GetLayer(). This function takes a SDL_MetalView and returns a
pointer to the view's backing CAMetalLayer. This simplifies things
considerably, since in the current version of the SDL_Metal API the
programmer is required to bridge-cast a SDL_MetalView handle to an NSView or
UIView (depending on the platform) and then extract the layer from there.
SDL_Metal_GetLayer automatically handles all of that, making the operation
simple and cross-platform.
3. SDL_Metal_GetDrawableSize(). This function already exists in the current
SDL_Metal API (and is used behind-the-scenes for SDL_Vulkan_GetDrawableSize
on Apple platforms) but was not publicly exposed. My patch exposes this
function for public use. It works just like you'd expect.
Tested on macOS 10.14 and iOS 12.4."
Fixes Bugzilla #4796.
|
|
d4f1b520
|
2020-04-08T19:16:31
|
|
Added support for press/release hardware keyboard events in iOS 13.4
|
|
6e7465bd
|
2020-03-28T15:43:55
|
|
Fixed Bug 4883, redux - connect SDL_GetDisplayDPI to UIKit_GetDisplayDPI
SDL_GetDisplayDPI was failing on iOS, as UIKit_GetDisplayDPI was
not getting assigned to SDL's internal field in SDL_VideoDevice:
GetDisplayDPI.
|
|
55a2a12d
|
2020-03-16T22:34:33
|
|
Fixed compile warning
|
|
62a3d6c0
|
2020-01-30T14:58:41
|
|
Fixed build
|
|
37278066
|
2020-01-30T14:51:33
|
|
Export SDL functions for iOS application delegates
|
|
c9c89783
|
2020-01-29T20:09:08
|
|
Miscellaneous pending fixes
|
|
a8780c6a
|
2020-01-16T20:49:25
|
|
Updated copyright date for 2020
|
|
bc430d40
|
2019-12-16T10:26:36
|
|
Update for bug 4883 - Add approximation for display DPI on iOS
Aaron Barany
I realized I made a minor mistake in my patch: I changed the constructor prototype for SDL_DisplayData, but didn't update the declaration in the .h file. The compiler and linker don't complain, but it would probably be best to fix in case a later change runs into a problem from the mismatch. I have attached a patch to fix this.
|
|
140918bb
|
2019-12-08T11:36:40
|
|
Fixed bug 4883 - Add approximation for display DPI on iOS
Aaron Barany
There appears to be no way to directly access the display DPI on iOS, so as an approximation the DPI for the iPhone 1 is used as a base value and is multiplied by the screen's scale. This should at least give a ballpark number for the various screen scales. (based on https://stackoverflow.com/questions/25756087/detecting-iphone-6-6-screen-sizes-in-point-values it appears that both 2x and 3x are used)
I have updated the patch to use a table of current devices and use a computation as a fallback. I have also updated the fallback computation to be more accurate.
|
|
b7576025
|
2019-12-03T22:07:58
|
|
Fixed bug 4882 - Fix build for iOS when disabling OpenGL
Aaron Barany
Since OpenGL is deprecated on iOS, it is advantageous to be able to remove all OpenGL related code when building SDL for iOS. This patch adds the necessary #if checks to compile in this case.
|
|
bda618a2
|
2019-10-27T11:41:48
|
|
iOS: remove some unused code, minor code style cleanup.
|
|
df49e2a5
|
2019-10-27T11:41:11
|
|
iOS: replace a deprecated function call with a non-deprecated equivalent.
|
|
bf9092cf
|
2019-10-17T17:47:11
|
|
Removed unused variable
|
|
79cd6cfc
|
2019-08-15T19:38:12
|
|
iOS: Fix issues with Split VIew on iPad (bugs #4586, #4705).
|
|
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.
|
|
aebaa316
|
2019-08-05T12:35:32
|
|
Add public APIs for creating a Metal view attached to an SDL window. Add SDL_metal.h.
|
|
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.
|
|
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.
|
|
bf9bf602
|
2019-07-17T23:20:57
|
|
Copypaste SDL_NSLog to UIKit backend, document it as such
|
|
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).
|
|
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.
|
|
1213fe79
|
2019-06-14T13:56:42
|
|
Worked around "Undefined symbol: ___isPlatformVersionAtLeast()" link error on Xcode 11 beta
|
|
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).
|
|
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
|
|
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.
|
|
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.
|
|
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
|
|
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
|
|
582a3c99
|
2019-05-20T14:08:35
|
|
Fixed mouse focus for touch events on iOS
|
|
59da5b72
|
2019-05-14T07:55:42
|
|
[SDL] ios Touch Fix.
|
|
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.
|
|
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.
|
|
9d28156f
|
2019-04-02T17:18:47
|
|
Bug 4576: remove touch/mouse duplication for IOS
|
|
de82759c
|
2019-03-19T07:53:33
|
|
Added support for building SDL as a dynamic library on iOS
|
|
82758efc
|
2019-03-12T14:45:04
|
|
[iOS DAC] Fix touch events getting from SDL2 to source2.
|
|
5e13087b
|
2019-01-04T22:01:14
|
|
Updated copyright for 2019
|
|
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.
|
|
e2ad654f
|
2018-10-14T17:26:10
|
|
iOS: Don't ignore the requested alpha bit size when determining whether to use an RGBA8 backbuffer.
|
|
d9094421
|
2018-10-12T17:55:42
|
|
metal: Fix high dpi and resizing on macOS, and clean up iOS code. Fixes bug #4250.
|
|
5febdfce
|
2018-09-24T11:49:25
|
|
Fixed whitespace
|
|
0b3a350c
|
2018-09-10T23:01:33
|
|
Fixed Chinese IME support (thanks ???!)
|
|
af823cc1
|
2018-09-10T23:00:09
|
|
Fixed building on tvOS
|
|
088070e5
|
2018-08-22T23:47:29
|
|
Moved display orientation handling on iOS out to a separate function for Qt apps
|
|
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
|
|
6f758ad2
|
2018-08-21T20:03:54
|
|
Moved SDL_IsTablet() to a cross-platform API function
|