mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-07-09 02:39:42 +00:00
Added HDR support on visionOS
This commit is contained in:
@@ -285,6 +285,7 @@ internal struct SDL_CurvedContentView: View {
|
||||
helper.updateSnappedStatus(snapped: snappedStatus.isSnapped)
|
||||
}
|
||||
.preferredSurroundingsEffect(shouldEnableDimming ? .dark : nil)
|
||||
.allowedDynamicRange(.high)
|
||||
.frame(depth: 0)
|
||||
.ignoresSafeArea()
|
||||
.persistentSystemOverlays(settings.sceneState == .cinematic ? .hidden : .automatic)
|
||||
|
||||
@@ -283,6 +283,11 @@ bool UIKit_AddDisplay(bool send_event)
|
||||
|
||||
display.desktop_mode = mode;
|
||||
|
||||
// There isn't currently a way to query the EDR headeroom on visionOS.
|
||||
// The range is 1 - 16, so we'll assume a current value of 2 for now.
|
||||
display.HDR.SDR_white_level = 1.0f;
|
||||
display.HDR.HDR_headroom = 2.0f;
|
||||
|
||||
SDL_UIKitDisplayData *data = [[SDL_UIKitDisplayData alloc] init];
|
||||
|
||||
if (!data) {
|
||||
|
||||
Reference in New Issue
Block a user