diff --git a/Source/Editor/Editor.cpp b/Source/Editor/Editor.cpp
index c08648505..3806317b3 100644
--- a/Source/Editor/Editor.cpp
+++ b/Source/Editor/Editor.cpp
@@ -654,7 +654,7 @@ Window* Editor::CreateMainWindow()
PROFILE_MEM(Editor);
Window* window = Managed->GetMainWindow();
-#if PLATFORM_LINUX
+#if PLATFORM_LINUX || (PLATFORM_MAC && PLATFORM_SDL)
// Set window icon
const String iconPath = Globals::BinariesFolder / TEXT("Logo.png");
if (FileSystem::FileExists(iconPath))
diff --git a/Source/Editor/GUI/Docking/FloatWindowDockPanel.cs b/Source/Editor/GUI/Docking/FloatWindowDockPanel.cs
index e0dcd8531..f0504db3d 100644
--- a/Source/Editor/GUI/Docking/FloatWindowDockPanel.cs
+++ b/Source/Editor/GUI/Docking/FloatWindowDockPanel.cs
@@ -32,7 +32,7 @@ namespace FlaxEditor.GUI.Docking
return base.OnMouseDown(location, button);
}
-#if !PLATFORM_WINDOWS
+#if PLATFORM_LINUX
///
protected override WindowHitCodes OnHitTest(ref Float2 mouse)
{
diff --git a/Source/Engine/Platform/Mac/MacFileSystemWatcher.cpp b/Source/Engine/Platform/Mac/MacFileSystemWatcher.cpp
index 39310f2b2..69b8e0d7c 100644
--- a/Source/Engine/Platform/Mac/MacFileSystemWatcher.cpp
+++ b/Source/Engine/Platform/Mac/MacFileSystemWatcher.cpp
@@ -1,6 +1,7 @@
// Copyright (c) Wojciech Figat. All rights reserved.
#if PLATFORM_MAC
+
#include "MacFileSystemWatcher.h"
#include "Engine/Platform/Apple/AppleUtils.h"
#include "Engine/Platform/CriticalSection.h"
@@ -9,47 +10,32 @@
#include "Engine/Core/Collections/Array.h"
#include "Engine/Core/Types/StringView.h"
-void DirectoryWatchCallback( ConstFSEventStreamRef StreamRef, void* FileWatcherPtr, size_t EventCount, void* EventPaths, const FSEventStreamEventFlags EventFlags[], const FSEventStreamEventId EventIDs[] )
+void DirectoryWatchCallback( ConstFSEventStreamRef StreamRef, void* FileWatcherPtr, size_t EventCount, void* EventPaths, const FSEventStreamEventFlags EventFlags[], const FSEventStreamEventId EventIDs[])
{
MacFileSystemWatcher* macFileSystemWatcher = (MacFileSystemWatcher*)FileWatcherPtr;
if (macFileSystemWatcher)
{
CFArrayRef EventPathArray = (CFArrayRef)EventPaths;
- for( size_t EventIndex = 0; EventIndex < EventCount; ++EventIndex )
+ for (size_t eventIndex = 0; eventIndex < EventCount; eventIndex++)
{
- const FSEventStreamEventFlags Flags = EventFlags[EventIndex];
- if( !(Flags & kFSEventStreamEventFlagItemIsFile) && !(Flags & kFSEventStreamEventFlagItemIsDir) )
+ const FSEventStreamEventFlags flags = EventFlags[eventIndex];
+ if (!(flags & kFSEventStreamEventFlagItemIsFile) && !(flags & kFSEventStreamEventFlagItemIsDir))
{
- // events about symlinks don't concern us
+ // Events about symlinks don't concern us
continue;
}
-
+
auto action = FileSystemAction::Unknown;
-
- const bool added = ( Flags & kFSEventStreamEventFlagItemCreated );
- const bool renamed = ( Flags & kFSEventStreamEventFlagItemRenamed );
- const bool modified = ( Flags & kFSEventStreamEventFlagItemModified );
- const bool removed = ( Flags & kFSEventStreamEventFlagItemRemoved );
-
- if (added)
- {
+ if (flags & kFSEventStreamEventFlagItemCreated)
action = FileSystemAction::Create;
- }
- if (renamed)
- {
+ if (flags & kFSEventStreamEventFlagItemRenamed)
action = FileSystemAction::Rename;
- }
- if (modified)
- {
+ if (flags & kFSEventStreamEventFlagItemModified)
action = FileSystemAction::Modify;
- }
- if (removed)
- {
+ if (flags & kFSEventStreamEventFlagItemRemoved)
action = FileSystemAction::Delete;
- }
-
- const String resolvedPath = AppleUtils::ToString((CFStringRef)CFArrayGetValueAtIndex(EventPathArray,EventIndex));
-
+
+ const String resolvedPath = AppleUtils::ToString((CFStringRef)CFArrayGetValueAtIndex(EventPathArray, eventIndex));
macFileSystemWatcher->OnEvent(resolvedPath, action);
}
}
@@ -61,9 +47,8 @@ MacFileSystemWatcher::MacFileSystemWatcher(const String& directory, bool withSub
CFStringRef FullPathMac = AppleUtils::ToString(StringView(directory));
CFArrayRef PathsToWatch = CFArrayCreate(NULL, (const void**)&FullPathMac, 1, NULL);
-
+
CFAbsoluteTime Latency = 0.2;
-
FSEventStreamContext Context;
Context.version = 0;
Context.info = this;
@@ -71,7 +56,7 @@ MacFileSystemWatcher::MacFileSystemWatcher(const String& directory, bool withSub
Context.release = NULL;
Context.copyDescription = NULL;
- EventStream = FSEventStreamCreate( NULL,
+ _eventStream = FSEventStreamCreate(NULL,
&DirectoryWatchCallback,
&Context,
PathsToWatch,
@@ -82,21 +67,27 @@ MacFileSystemWatcher::MacFileSystemWatcher(const String& directory, bool withSub
CFRelease(PathsToWatch);
CFRelease(FullPathMac);
-
- FSEventStreamScheduleWithRunLoop( EventStream, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode );
- FSEventStreamStart( EventStream );
-
- IsRunning = true;
+
+ _queue = dispatch_queue_create("MacFileSystemWatcher", NULL);
+ FSEventStreamSetDispatchQueue(_eventStream, _queue);
+ FSEventStreamStart(_eventStream);
}
MacFileSystemWatcher::~MacFileSystemWatcher()
{
- if (IsRunning)
+ if (_eventStream)
{
- FSEventStreamStop(EventStream);
- FSEventStreamUnscheduleFromRunLoop(EventStream, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
- FSEventStreamInvalidate(EventStream);
- FSEventStreamRelease(EventStream);
+ FSEventStreamStop(_eventStream);
+ FSEventStreamSetDispatchQueue(_eventStream, nullptr);
+ FSEventStreamInvalidate(_eventStream);
+ FSEventStreamRelease(_eventStream);
+ _eventStream = nullptr;
+ }
+ if (_queue != nullptr)
+ {
+ dispatch_release(_queue);
+ _queue = nullptr;
}
}
+
#endif
diff --git a/Source/Engine/Platform/Mac/MacFileSystemWatcher.h b/Source/Engine/Platform/Mac/MacFileSystemWatcher.h
index b0edd1df3..576d34c75 100644
--- a/Source/Engine/Platform/Mac/MacFileSystemWatcher.h
+++ b/Source/Engine/Platform/Mac/MacFileSystemWatcher.h
@@ -3,18 +3,20 @@
#pragma once
#if PLATFORM_MAC
+
#include "Engine/Platform/Base/FileSystemWatcherBase.h"
-
#include
-
///
/// Mac platform implementation of the file system watching object.
///
class FLAXENGINE_API MacFileSystemWatcher : public FileSystemWatcherBase
{
-public:
+private:
+ FSEventStreamRef _eventStream;
+ dispatch_queue_t _queue;
+public:
///
/// Initializes a new instance of the class.
///
@@ -26,14 +28,6 @@ public:
/// Finalizes an instance of the class.
///
~MacFileSystemWatcher();
-
-public:
-
-
-
-private:
-
- FSEventStreamRef EventStream;
- bool IsRunning;
};
+
#endif
diff --git a/Source/Engine/Platform/Mac/MacPlatform.cpp b/Source/Engine/Platform/Mac/MacPlatform.cpp
index d48204fe5..4e268d3f9 100644
--- a/Source/Engine/Platform/Mac/MacPlatform.cpp
+++ b/Source/Engine/Platform/Mac/MacPlatform.cpp
@@ -446,10 +446,10 @@ int32 MacPlatform::CreateProcess(CreateProcessSettings& settings)
String exePath = settings.FileName;
{
NSString* processPath = (NSString*)AppleUtils::ToString(exePath);
- if (![[NSFileManager defaultManager] fileExistsAtPath: processPath])
+ if (![[NSFileManager defaultManager] fileExistsAtPath:processPath])
{
NSString* appName = [[processPath lastPathComponent] stringByDeletingPathExtension];
- processPath = [[NSWorkspace sharedWorkspace] fullPathForApplication:appName];
+ processPath = [[[NSWorkspace sharedWorkspace] URLForApplicationWithBundleIdentifier:appName] path];
}
if ([[NSFileManager defaultManager] fileExistsAtPath: processPath])
{
diff --git a/Source/Engine/Platform/SDL/SDLInput.cpp b/Source/Engine/Platform/SDL/SDLInput.cpp
index 76476f162..6b90c84d2 100644
--- a/Source/Engine/Platform/SDL/SDLInput.cpp
+++ b/Source/Engine/Platform/SDL/SDLInput.cpp
@@ -359,7 +359,6 @@ class SDLMouse : public Mouse
private:
Float2 _oldPosition = Float2::Zero;
Window* _relativeModeWindow = nullptr;
- const SDL_Rect* _oldScreenRect = nullptr;
public:
///
@@ -408,13 +407,14 @@ public:
{
_relativeModeWindow = window;
SDL_GetMouseState(&_oldPosition.X, &_oldPosition.Y);
+#if !PLATFORM_MAC
if (!SDL_CursorVisible())
{
- // Trap the cursor in current location
+ // Trap the cursor in current location to prevent accidental interactions with other UI elements or applications
SDL_Rect clipRect = { (int)_oldPosition.X, (int)_oldPosition.Y, 1, 1 };
- _oldScreenRect = SDL_GetWindowMouseRect(windowHandle);
SDL_SetWindowMouseRect(windowHandle, &clipRect);
}
+#endif
}
else
{
@@ -423,9 +423,10 @@ public:
// FIXME: When floating game window is focused and editor viewport activated, the relative mode gets stuck
return;
}
- SDL_SetWindowMouseRect(windowHandle, nullptr);//oldScreenRect);
+#if !PLATFORM_MAC
+ SDL_SetWindowMouseRect(windowHandle, nullptr);
+#endif
SDL_WarpMouseInWindow(windowHandle, _oldPosition.X, _oldPosition.Y);
- _oldScreenRect = nullptr;
_relativeModeWindow = nullptr;
}
@@ -433,8 +434,8 @@ public:
if (!SDL_SetWindowRelativeMouseMode(windowHandle, relativeMode))
LOG(Error, "Failed to set mouse relative mode: {0}", String(SDL_GetError()));
-#if PLATFORM_MAC
- // Warping right before entering relative mode seems to generate motion event for relative mode
+#if false && PLATFORM_MAC
+ // Warping right before entering relative mode seems to generate motion event during relative mode
SDL_PumpEvents();
SDL_FlushEvent(SDL_EVENT_MOUSE_MOTION);
#endif
diff --git a/Source/Engine/Platform/SDL/SDLPlatform.Mac.cpp b/Source/Engine/Platform/SDL/SDLPlatform.Mac.cpp
index 5770b56d5..18ada2c62 100644
--- a/Source/Engine/Platform/SDL/SDLPlatform.Mac.cpp
+++ b/Source/Engine/Platform/SDL/SDLPlatform.Mac.cpp
@@ -12,24 +12,56 @@
#include "Engine/Input/Input.h"
#include "Engine/Input/Mouse.h"
#include "Engine/Platform/IGuiData.h"
-#include "Engine/Platform/MessageBox.h"
#include "Engine/Platform/Platform.h"
#include "Engine/Platform/WindowsManager.h"
#include "Engine/Platform/Base/DragDropHelper.h"
#include "Engine/Platform/SDL/SDLClipboard.h"
-#include "Engine/Platform/Unix/UnixFile.h"
-#include "Engine/Profiler/ProfilerCPU.h"
-#include "Engine/Platform/Linux/IncludeX11.h"
+#include "Engine/Platform/Apple/AppleUtils.h"
+#include
+#include
+#include
#include
#include
-#include
#include
#include
#include
#include
+namespace MacImpl
+{
+ Window* DraggedWindow = nullptr;
+ String DraggingData = String();
+ Float2 DraggingPosition;
+ Nullable LastMouseDragPosition;
+ bool DraggingActive = false;
+ bool DraggingIgnoreEvent = false;
+ NSDraggingSession* MacDragSession = nullptr;
+ int64 MacDragExitFlag = 0;
+}
+
+class MacDropData : public IGuiData
+{
+public:
+ Type CurrentType;
+ String AsText;
+ Array AsFiles;
+
+ Type GetType() const override
+ {
+ return CurrentType;
+ }
+ String GetAsText() const override
+ {
+ return AsText;
+ }
+ void GetAsFiles(Array* files) const override
+ {
+ files->Add(AsFiles);
+ }
+};
+
bool SDLPlatform::InitInternal()
{
return false;
@@ -50,16 +82,212 @@ bool SDLPlatform::UsesX11()
return false;
}
+bool SDLPlatform::EventFilterCallback(void* userdata, SDL_Event* event)
+{
+ Window* draggedWindow = *(Window**)userdata;
+ if (draggedWindow == nullptr)
+ {
+ if (MacImpl::DraggingActive)
+ {
+ // Handle events during drag operation here since the normal event loop is blocked
+ if (event->type == SDL_EVENT_WINDOW_EXPOSED)
+ {
+ // The internal timer is sending exposed events every ~16ms
+#if USE_EDITOR
+ // Flush any single-frame shapes to prevent memory leaking (eg. via terrain collision debug during scene drawing with PhysicsColliders or PhysicsDebug flag)
+ DebugDraw::UpdateContext(nullptr, 0.0f);
+#endif
+ Engine::OnUpdate(); // For docking updates
+ Engine::OnDraw();
+ }
+ else
+ {
+ SDLWindow* window = SDLWindow::GetWindowFromEvent(*event);
+ if (window)
+ window->HandleEvent(*event);
+
+ // We do not receive events at steady rate to keep the engine updated...
+#if USE_EDITOR
+ // Flush any single-frame shapes to prevent memory leaking (eg. via terrain collision debug during scene drawing with PhysicsColliders or PhysicsDebug flag)
+ DebugDraw::UpdateContext(nullptr, 0.0f);
+#endif
+ Engine::OnUpdate(); // For docking updates
+ Engine::OnDraw();
+
+ if (event->type == SDL_EVENT_DROP_BEGIN || event->type == SDL_EVENT_DROP_FILE || event->type == SDL_EVENT_DROP_TEXT)
+ return true; // Filtering these event stops other following events from getting added to the queue
+ }
+ return false;
+ }
+ return true;
+ }
+ return true;
+}
+
void SDLPlatform::PreHandleEvents()
{
+ SDL_SetEventFilter(EventFilterCallback, &MacImpl::DraggedWindow);
}
void SDLPlatform::PostHandleEvents()
{
+ SDL_SetEventFilter(EventFilterCallback, &MacImpl::DraggedWindow);
+
+ // Handle window dragging release here
+ if (MacImpl::DraggedWindow != nullptr)
+ {
+ Float2 mousePosition;
+ auto buttons = SDL_GetGlobalMouseState(&mousePosition.X, &mousePosition.Y);
+ bool buttonReleased = (buttons & SDL_BUTTON_MASK(SDL_BUTTON_LEFT)) == 0;
+ if (buttonReleased)
+ {
+ // Send simulated mouse up event
+ SDL_Event buttonUpEvent { 0 };
+ buttonUpEvent.motion.type = SDL_EVENT_MOUSE_BUTTON_UP;
+ buttonUpEvent.button.down = false;
+ buttonUpEvent.motion.windowID = SDL_GetWindowID(MacImpl::DraggedWindow->GetSDLWindow());
+ buttonUpEvent.motion.timestamp = SDL_GetTicksNS();
+ buttonUpEvent.motion.state = SDL_BUTTON_LEFT;
+ buttonUpEvent.button.clicks = 1;
+ buttonUpEvent.motion.x = mousePosition.X;
+ buttonUpEvent.motion.y = mousePosition.Y;
+ MacImpl::DraggedWindow->HandleEvent(buttonUpEvent);
+ MacImpl::DraggedWindow = nullptr;
+ }
+ }
}
bool SDLWindow::HandleEventInternal(SDL_Event& event)
{
+ switch (event.type)
+ {
+ case SDL_EVENT_WINDOW_MOVED:
+ {
+ // Quartz doesn't report any mouse events when mouse is over the caption area, send a simulated event instead...
+ Float2 mousePosition;
+ auto buttons = SDL_GetGlobalMouseState(&mousePosition.X, &mousePosition.Y);
+ if ((buttons & SDL_BUTTON_MASK(SDL_BUTTON_LEFT)) != 0)
+ {
+ if (MacImpl::DraggedWindow == nullptr)
+ {
+ // TODO: verify mouse position, window focus
+ bool result = false;
+ OnLeftButtonHit(WindowHitCodes::Caption, result);
+ if (result)
+ MacImpl::DraggedWindow = this;
+ }
+ else
+ {
+ Float2 mousePos = Platform::GetMousePosition();
+ Input::Mouse->OnMouseMove(mousePos, this);
+ }
+ }
+ break;
+ }
+ case SDL_EVENT_MOUSE_BUTTON_UP:
+ case SDL_EVENT_MOUSE_BUTTON_DOWN:
+ {
+ if (MacImpl::LastMouseDragPosition.HasValue())
+ {
+ // SDL reports wrong mouse position after dragging has ended
+ Float2 mouseClientPosition = ScreenToClient(MacImpl::LastMouseDragPosition.GetValue());
+ event.button.x = mouseClientPosition.X;
+ event.button.y = mouseClientPosition.Y;
+ }
+ break;
+ }
+ case SDL_EVENT_MOUSE_MOTION:
+ {
+ if (MacImpl::LastMouseDragPosition.HasValue())
+ MacImpl::LastMouseDragPosition.Reset();
+ if (MacImpl::DraggedWindow != nullptr)
+ return true;
+ break;
+ }
+ case SDL_EVENT_WINDOW_MOUSE_LEAVE:
+ {
+ OnDragLeave(); // Check for release of mouse button too?
+ break;
+ }
+ case SDL_EVENT_DROP_BEGIN:
+ case SDL_EVENT_DROP_POSITION:
+ case SDL_EVENT_DROP_FILE:
+ case SDL_EVENT_DROP_TEXT:
+ case SDL_EVENT_DROP_COMPLETE:
+ {
+ auto dpiScale = GetDpiScale();
+ Float2 mousePos = Float2(event.drop.x * dpiScale, event.drop.y * dpiScale);
+ DragDropEffect effect = DragDropEffect::None;
+ String text(event.drop.data);
+ MacDropData dropData;
+
+ if (MacImpl::DraggingActive)
+ {
+ // We don't have the window dragging data during these events...
+ text = MacImpl::DraggingData;
+ mousePos = ScreenToClient(MacImpl::DraggingPosition);
+
+ // Ensure mouse position is updated while dragging
+ Input::Mouse->OnMouseMove(MacImpl::DraggingPosition, this);
+ MacImpl::LastMouseDragPosition = MacImpl::DraggingPosition;
+ }
+ dropData.AsText = text;
+
+ if (event.type == SDL_EVENT_DROP_BEGIN)
+ {
+ // We don't know the type of dragged data at this point, so call the events for both types
+ if (!MacImpl::DraggingActive)
+ {
+ dropData.CurrentType = IGuiData::Type::Files;
+ OnDragEnter(&dropData, mousePos, effect);
+ }
+ if (effect == DragDropEffect::None)
+ {
+ dropData.CurrentType = IGuiData::Type::Text;
+ OnDragEnter(&dropData, mousePos, effect);
+ }
+ }
+ else if (event.type == SDL_EVENT_DROP_POSITION)
+ {
+ Input::Mouse->OnMouseMove(ClientToScreen(mousePos), this);
+
+ // We don't know the type of dragged data at this point, so call the events for both types
+ if (!MacImpl::DraggingActive)
+ {
+ dropData.CurrentType = IGuiData::Type::Files;
+ OnDragOver(&dropData, mousePos, effect);
+ }
+ if (effect == DragDropEffect::None)
+ {
+ dropData.CurrentType = IGuiData::Type::Text;
+ OnDragOver(&dropData, mousePos, effect);
+ }
+ }
+ else if (event.type == SDL_EVENT_DROP_FILE)
+ {
+ text.Split('\n', dropData.AsFiles);
+ dropData.CurrentType = IGuiData::Type::Files;
+ OnDragDrop(&dropData, mousePos, effect);
+ }
+ else if (event.type == SDL_EVENT_DROP_TEXT)
+ {
+ dropData.CurrentType = IGuiData::Type::Text;
+ OnDragDrop(&dropData, mousePos, effect);
+ }
+ else if (event.type == SDL_EVENT_DROP_COMPLETE)
+ {
+ OnDragLeave();
+ if (MacImpl::DraggingActive)
+ {
+ // The previous drop events needs to be flushed to avoid processing them twice
+ SDL_FlushEvents(SDL_EVENT_DROP_FILE, SDL_EVENT_DROP_POSITION);
+ }
+ }
+
+ // TODO: Implement handling for feedback effect result (https://github.com/libsdl-org/SDL/issues/10448)
+ break;
+ }
+ }
return false;
}
@@ -68,9 +296,153 @@ void SDLPlatform::SetHighDpiAwarenessEnabled(bool enable)
// TODO: This is now called before Platform::Init, ensure the scaling is changed accordingly during Platform::Init (see ApplePlatform::SetHighDpiAwarenessEnabled)
}
+inline bool IsWindowInvalid(Window* win)
+{
+ WindowsManager::WindowsLocker.Lock();
+ const bool hasWindow = WindowsManager::Windows.Contains(win);
+ WindowsManager::WindowsLocker.Unlock();
+ return !hasWindow || !win;
+}
+
+Float2 GetWindowTitleSize(const SDLWindow* window)
+{
+ Float2 size = Float2::Zero;
+ if (window->GetSettings().HasBorder)
+ {
+ NSRect frameStart = [(NSWindow*)window->GetNativePtr() frameRectForContentRect:NSMakeRect(0, 0, 0, 0)];
+ size.Y = frameStart.size.height;
+ }
+ return size * MacPlatform::ScreenScale;
+}
+
+Float2 GetMousePosition(SDLWindow* window, NSEvent* event)
+{
+ NSRect frame = [(NSWindow*)window->GetNativePtr() frame];
+ NSPoint point = [event locationInWindow];
+ return Float2(point.x, frame.size.height - point.y) * MacPlatform::ScreenScale - GetWindowTitleSize(window);
+}
+
+Float2 GetMousePosition(SDLWindow* window, const NSPoint& point)
+{
+ NSRect frame = [(NSWindow*)window->GetNativePtr() frame];
+ CGRect screenBounds = CGDisplayBounds(CGMainDisplayID());
+ return Float2(point.x, screenBounds.size.height - point.y) * MacPlatform::ScreenScale;
+}
+
+@interface ClipboardDataProviderImpl : NSObject
+{
+@public
+ SDLWindow* Window;
+}
+@end
+
+@implementation ClipboardDataProviderImpl
+
+// NSPasteboardItemDataProvider
+// ---
+
+- (void)pasteboard:(nullable NSPasteboard*)pasteboard item:(NSPasteboardItem*)item provideDataForType:(NSPasteboardType)type
+{
+ if (IsWindowInvalid(Window)) return;
+ [pasteboard setString:(NSString*)AppleUtils::ToString(MacImpl::DraggingData) forType:NSPasteboardTypeString];
+}
+
+- (void)pasteboardFinishedWithDataProvider:(NSPasteboard*)pasteboard
+{
+}
+
+// NSDraggingSource
+// ---
+
+- (NSDragOperation)draggingSession:(NSDraggingSession*)session sourceOperationMaskForDraggingContext:(NSDraggingContext)context
+{
+ if (IsWindowInvalid(Window))
+ return NSDragOperationNone;
+
+ switch(context)
+ {
+ case NSDraggingContextOutsideApplication:
+ return NSDragOperationCopy;
+ case NSDraggingContextWithinApplication:
+ return NSDragOperationCopy;
+ default:
+ return NSDragOperationMove;
+ }
+}
+
+- (void)draggingSession:(NSDraggingSession*)session willBeginAtPoint:(NSPoint)screenPoint
+{
+ MacImpl::DraggingPosition = GetMousePosition(Window, screenPoint);
+}
+
+- (void)draggingSession:(NSDraggingSession*)session movedToPoint:(NSPoint)screenPoint
+{
+ MacImpl::DraggingPosition = GetMousePosition(Window, screenPoint);
+}
+
+- (void)draggingSession:(NSDraggingSession*)session endedAtPoint:(NSPoint)screenPoint operation:(NSDragOperation)operation
+{
+ MacImpl::DraggingPosition = GetMousePosition(Window, screenPoint);
+#if USE_EDITOR
+ // Stop background worker once the drag ended
+ if (MacImpl::MacDragSession && MacImpl::MacDragSession == session)
+ Platform::AtomicStore(&MacImpl::MacDragExitFlag, 1);
+#endif
+}
+
+@end
+
DragDropEffect SDLWindow::DoDragDrop(const StringView& data)
{
- return DragDropEffect::None;
+ NSWindow* window = (NSWindow*)_handle;
+ ClipboardDataProviderImpl* clipboardDataProvider = [ClipboardDataProviderImpl alloc];
+ clipboardDataProvider->Window = this;
+
+ // Create mouse drag event
+ NSEvent* event = [NSEvent
+ mouseEventWithType:NSEventTypeLeftMouseDragged
+ location:window.mouseLocationOutsideOfEventStream
+ modifierFlags:0
+ timestamp:NSApp.currentEvent.timestamp
+ windowNumber:window.windowNumber
+ context:nil
+ eventNumber:0
+ clickCount:1
+ pressure:1.0];
+
+ // Create drag item
+ NSPasteboardItem* pasteItem = [NSPasteboardItem new];
+ [pasteItem setDataProvider:clipboardDataProvider forTypes:[NSArray arrayWithObjects:NSPasteboardTypeString, nil]];
+ NSDraggingItem* dragItem = [[NSDraggingItem alloc] initWithPasteboardWriter:pasteItem];
+ [dragItem setDraggingFrame:NSMakeRect(event.locationInWindow.x, event.locationInWindow.y, 100, 100) contents:nil];
+
+ // Start dragging session
+ NSDraggingSession* draggingSession = [window.contentView beginDraggingSessionWithItems:[NSArray arrayWithObject:dragItem] event:event source:clipboardDataProvider];
+ DragDropEffect result = DragDropEffect::None;
+
+#if USE_EDITOR
+ //ASSERT(!MacImpl::MacDragSession);
+ // TODO: Dragging item from dropdown box in a floating window attempts to init dragging twice
+ if (MacImpl::MacDragSession != nullptr)
+ return result;
+
+ MacImpl::MacDragSession = draggingSession;
+ MacImpl::MacDragExitFlag = 0;
+ MacImpl::DraggingData = data;
+ MacImpl::DraggingActive = true;
+ while (Platform::AtomicRead(&MacImpl::MacDragExitFlag) == 0)
+ {
+ // The internal event loop will block here during the drag operation,
+ // events are processed in the event filter callback instead.
+ SDLPlatform::Tick();
+ Platform::Sleep(1);
+ }
+ MacImpl::DraggingActive = false;
+ MacImpl::DraggingData.Clear();
+ MacImpl::MacDragSession = nullptr;
+#endif
+
+ return result;
}
DragDropEffect SDLWindow::DoDragDrop(const StringView& data, const Float2& offset, Window* dragSourceWindow)
diff --git a/Source/Engine/Platform/SDL/SDLPlatform.cpp b/Source/Engine/Platform/SDL/SDLPlatform.cpp
index 9d21be1fa..30851193a 100644
--- a/Source/Engine/Platform/SDL/SDLPlatform.cpp
+++ b/Source/Engine/Platform/SDL/SDLPlatform.cpp
@@ -12,6 +12,7 @@
#include "Engine/Platform/WindowsManager.h"
#include "Engine/Platform/SDL/SDLInput.h"
#include "Engine/Engine/CommandLine.h"
+#include "Engine/Engine/Engine.h"
#include
#include
@@ -199,6 +200,15 @@ void SDLPlatform::Tick()
bool SDLPlatform::HandleEvent(SDL_Event& event)
{
+ switch (event.type)
+ {
+ case SDL_EVENT_QUIT:
+ {
+ // Close request came from taskbar or macOS application menu
+ Engine::MainWindow->Close(ClosingReason::User);
+ break;
+ }
+ }
return true;
}
diff --git a/Source/Engine/Platform/SDL/SDLWindow.cpp b/Source/Engine/Platform/SDL/SDLWindow.cpp
index 9d46e45ac..f284ed5bb 100644
--- a/Source/Engine/Platform/SDL/SDLWindow.cpp
+++ b/Source/Engine/Platform/SDL/SDLWindow.cpp
@@ -18,7 +18,7 @@
#include "Engine/Input/Mouse.h"
#include "Engine/Platform/FileSystem.h"
#include "Engine/Platform/WindowsManager.h"
-#if PLATFORM_LINUX
+#if PLATFORM_LINUX || PLATFORM_MAC
#define COMPILE_WITH_TEXTURE_TOOL 1 // FIXME
#include "Engine/Tools/TextureTool/TextureTool.h"
#endif
@@ -38,6 +38,7 @@
#include "Engine/Platform/Linux/IncludeX11.h"
#elif PLATFORM_MAC
#include
+#include
#elif PLATFORM_WEB
#else
static_assert(false, "Unsupported Platform");
@@ -226,7 +227,7 @@ SDLWindow::SDLWindow(const CreateWindowSettings& settings)
NSWindow* win = ((NSWindow*)_handle);
NSView* view = win.contentView;
[win unregisterDraggedTypes];
- [win registerForDraggedTypes:@[NSPasteboardTypeFileURL, NSPasteboardTypeString, (NSString*)kUTTypeFileURL, (NSString*)kUTTypeUTF8PlainText]];
+ [win registerForDraggedTypes:@[NSPasteboardTypeFileURL, NSPasteboardTypeString, UTTypeFileURL.identifier, UTTypeUTF8PlainText.identifier]];
#endif
}
#endif
@@ -243,7 +244,7 @@ SDLWindow::SDLWindow(const CreateWindowSettings& settings)
SDL_StartTextInput(_window);
#endif
-#if PLATFORM_LINUX && COMPILE_WITH_TEXTURE_TOOL
+#if (PLATFORM_LINUX || PLATFORM_MAC) && COMPILE_WITH_TEXTURE_TOOL
// Ensure windows other than the main window have some kind of icon
static SDL_Surface* surface = nullptr;
static Array colorData;
@@ -294,8 +295,13 @@ SDLWindow::~SDLWindow()
if (Input::Mouse != nullptr && Input::Mouse->IsRelative(this))
Input::Mouse->SetRelativeMode(false, this);
-
- SDL_StopTextInput(_window);
+
+ // The text input events seems to be controlled globally on macOS,
+ // calling this for closing window seems to remove keyboard focus from other windows...
+#if !PLATFORM_MAC
+ if (_settings.AllowInput && SDL_TextInputActive(_window))
+ SDL_StopTextInput(_window);
+#endif
SDL_DestroyWindow(_window);
_window = nullptr;
@@ -346,6 +352,20 @@ SDL_HitTestResult OnWindowHitTest(SDL_Window* win, const SDL_Point* area, void*
SDLWindow* window = static_cast(data);
const Float2 point(static_cast(area->x), static_cast(area->y));
WindowHitCodes hit = window->OnWindowHit(point);
+
+#if PLATFORM_MAC
+ // HACK: Motion events are missing over special areas, try to track the mouse with hit test
+ Float2 mousePositionScreen;
+ if (hit != WindowHitCodes::Client && SDL_GetGlobalMouseState(&mousePositionScreen.X, &mousePositionScreen.Y) == 0)
+ {
+ const Float2 hitPositionScreen = window->ClientToScreen(point);
+
+ // The hit tests does not always follow mouse, so only report tests close to mouse
+ if (Float2::Distance(hitPositionScreen, mousePositionScreen) <= 3)
+ Input::Mouse->OnMouseMove(hitPositionScreen, window);
+ }
+#endif
+
switch (hit)
{
case WindowHitCodes::Caption:
diff --git a/Source/FlaxEditor.Build.cs b/Source/FlaxEditor.Build.cs
index 500a211dc..5019dbb66 100644
--- a/Source/FlaxEditor.Build.cs
+++ b/Source/FlaxEditor.Build.cs
@@ -71,6 +71,8 @@ public class FlaxEditor : EngineTarget
break;
case TargetPlatform.Mac:
options.OutputFolder = Path.Combine(options.WorkingDirectory, "Binaries", "Editor", "Mac", options.Configuration.ToString());
+ if (EngineConfiguration.WithSDL(options))
+ options.DependencyFiles.Add(Path.Combine(Globals.EngineRoot, "Source", "Logo.png"));
break;
default: throw new InvalidPlatformException(options.Platform.Target, "Not supported Editor platform.");
}
diff --git a/Source/Platforms/Mac/Binaries/ThirdParty/ARM64/libSDL3.a b/Source/Platforms/Mac/Binaries/ThirdParty/ARM64/libSDL3.a
index f5deb33f7..22023b1cf 100644
--- a/Source/Platforms/Mac/Binaries/ThirdParty/ARM64/libSDL3.a
+++ b/Source/Platforms/Mac/Binaries/ThirdParty/ARM64/libSDL3.a
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:26b5b7acf4a82dd9d264444ad7f32be94ac86d0d683f446162cbd72ab3971623
-size 3415504
+oid sha256:ad5966ab80e3efccf5a18da0867e1c929bba6577ea28dc936064b72348116bff
+size 3417120
diff --git a/Source/Platforms/Mac/Binaries/ThirdParty/x64/libSDL3.a b/Source/Platforms/Mac/Binaries/ThirdParty/x64/libSDL3.a
index 77d78b90f..d8047c4b0 100644
--- a/Source/Platforms/Mac/Binaries/ThirdParty/x64/libSDL3.a
+++ b/Source/Platforms/Mac/Binaries/ThirdParty/x64/libSDL3.a
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:86e54e23958bc29a29e0de1f91e5eecd40647e35f5622c04edcd7f4c80b62286
-size 3576176
+oid sha256:d9bc6c43655544dfc63056d8ebfdbf1534185e67a641ef80aa5b83f4a1b682a6
+size 3569824
diff --git a/Source/ThirdParty/SDL/LICENSE.txt b/Source/ThirdParty/SDL/LICENSE.txt
index 23abb73f2..e9adee448 100644
--- a/Source/ThirdParty/SDL/LICENSE.txt
+++ b/Source/ThirdParty/SDL/LICENSE.txt
@@ -1,4 +1,4 @@
-Copyright (C) 1997-2025 Sam Lantinga
+Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL.h b/Source/ThirdParty/SDL/SDL3/SDL.h
index 04a05d257..489c5ad61 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -20,7 +20,7 @@
*/
/**
- * Main include header for the SDL library, version 3.4.0
+ * Main include header for the SDL library, version 3.4.4
*
* It is almost always best to include just this one header instead of
* picking out individual headers included here. There are exceptions to
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_assert.h b/Source/ThirdParty/SDL/SDL3/SDL_assert.h
index f0c4637b9..fb6746235 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_assert.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_assert.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -136,7 +136,7 @@ extern "C" {
#define SDL_TriggerBreakpoint() __builtin_debugtrap()
#elif SDL_HAS_BUILTIN(__builtin_trap)
#define SDL_TriggerBreakpoint() __builtin_trap()
-#elif (defined(__GNUC__) || defined(__clang__) || defined(__TINYC__)) && (defined(__i386__) || defined(__x86_64__))
+#elif (defined(__GNUC__) || defined(__clang__) || defined(__TINYC__) || defined(__slimcc__)) && (defined(__i386__) || defined(__x86_64__))
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
#elif (defined(__GNUC__) || defined(__clang__)) && defined(__riscv)
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "ebreak\n\t" )
@@ -160,7 +160,7 @@ extern "C" {
#ifdef SDL_WIKI_DOCUMENTATION_SECTION
/**
- * A macro that reports the current function being compiled.
+ * A constant that contains the current function being compiled.
*
* If SDL can't figure how the compiler reports this, it will use "???".
*
@@ -168,13 +168,15 @@ extern "C" {
*/
#define SDL_FUNCTION __FUNCTION__
-#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
+#elif !defined(SDL_FUNCTION)
+#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
# define SDL_FUNCTION __func__
#elif ((defined(__GNUC__) && (__GNUC__ >= 2)) || defined(_MSC_VER) || defined (__WATCOMC__))
# define SDL_FUNCTION __FUNCTION__
#else
# define SDL_FUNCTION "???"
#endif
+#endif
#ifdef SDL_WIKI_DOCUMENTATION_SECTION
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_asyncio.h b/Source/ThirdParty/SDL/SDL3/SDL_asyncio.h
index b36cb071b..3c894d696 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_asyncio.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_asyncio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -213,6 +213,8 @@ typedef struct SDL_AsyncIOQueue SDL_AsyncIOQueue;
* \returns a pointer to the SDL_AsyncIO structure that is created or NULL on
* failure; call SDL_GetError() for more information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_CloseAsyncIO
@@ -531,6 +533,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_SignalAsyncIOQueue(SDL_AsyncIOQueue *queue)
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_LoadFile_IO
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_atomic.h b/Source/ThirdParty/SDL/SDL3/SDL_atomic.h
index bfcf81ee0..1ec0753da 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_atomic.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_atomic.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_audio.h b/Source/ThirdParty/SDL/SDL3/SDL_audio.h
index 4c362e738..c72fe04cc 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_audio.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_audio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -1349,7 +1349,7 @@ extern SDL_DECLSPEC int * SDLCALL SDL_GetAudioStreamOutputChannelMap(SDL_AudioSt
*
* \since This function is available since SDL 3.2.0.
*
- * \sa SDL_SetAudioStreamInputChannelMap
+ * \sa SDL_SetAudioStreamOutputChannelMap
*/
extern SDL_DECLSPEC bool SDLCALL SDL_SetAudioStreamInputChannelMap(SDL_AudioStream *stream, const int *chmap, int count);
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_begin_code.h b/Source/ThirdParty/SDL/SDL3/SDL_begin_code.h
index 675cd7f09..4f3fe2d98 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_begin_code.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_begin_code.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -469,7 +469,7 @@
#define NULL ((void *)0)
#endif
#endif /* NULL */
-#endif /* ! macOS - breaks precompiled headers */
+#endif /* __MACH__ */
#ifndef SDL_FALLTHROUGH
#if (defined(__cplusplus) && __cplusplus >= 201703L) || \
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_bits.h b/Source/ThirdParty/SDL/SDL3/SDL_bits.h
index 7435ce6d9..d3310ab15 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_bits.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_bits.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -48,8 +48,7 @@ extern __inline int _SDL_bsr_watcom(Uint32);
/**
* Get the index of the most significant (set) bit in a 32-bit number.
*
- * Result is undefined when called with 0. This operation can also be stated
- * as "count leading zeroes" and "log base 2".
+ * This operation can also be stated as "count leading zeroes" and "log base 2".
*
* Note that this is a forced-inline function in a header, and not a public
* API function available in the SDL library (which is to say, the code is
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_blendmode.h b/Source/ThirdParty/SDL/SDL3/SDL_blendmode.h
index 8f00cbcaf..84cf622cb 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_blendmode.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_blendmode.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_camera.h b/Source/ThirdParty/SDL/SDL3/SDL_camera.h
index 59ce73fe8..14ea647a7 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_camera.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_camera.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_clipboard.h b/Source/ThirdParty/SDL/SDL3/SDL_clipboard.h
index 7480eb284..696825376 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_clipboard.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_clipboard.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_close_code.h b/Source/ThirdParty/SDL/SDL3/SDL_close_code.h
index da1dea7fa..ad9daa6d4 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_close_code.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_close_code.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_copying.h b/Source/ThirdParty/SDL/SDL3/SDL_copying.h
index 747bd3570..dd9dbc7ee 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_copying.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_copying.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_cpuinfo.h b/Source/ThirdParty/SDL/SDL3/SDL_cpuinfo.h
index b1e125b55..5669c2373 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_cpuinfo.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_cpuinfo.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_dialog.h b/Source/ThirdParty/SDL/SDL3/SDL_dialog.h
index 395b7e8c9..1e01347bf 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_dialog.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_dialog.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_dlopennote.h b/Source/ThirdParty/SDL/SDL3/SDL_dlopennote.h
index e866d2a20..299435a5d 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_dlopennote.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_dlopennote.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_egl.h b/Source/ThirdParty/SDL/SDL3/SDL_egl.h
index 65d4e967a..1371c4d01 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_egl.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_egl.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_endian.h b/Source/ThirdParty/SDL/SDL3/SDL_endian.h
index 6b1b4cbcf..69f097edd 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_endian.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_endian.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -46,7 +46,7 @@
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
-#if defined(__clang__) && !SDL_HAS_BUILTIN(_m_prefetch)
+#if defined(__clang__) && !SDL_HAS_BUILTIN(_m_prefetch)
#ifndef __PRFCHWINTRIN_H
#define __PRFCHWINTRIN_H
static __inline__ void __attribute__((__always_inline__, __nodebug__))
@@ -208,7 +208,7 @@ _m_prefetch(void *__P)
#else
/* By default, assume that floats words follow the memory system mode. */
#define SDL_FLOATWORDORDER SDL_BYTEORDER
-#endif /* __FLOAT_WORD_ORDER__ */
+#endif /* SDL_WIKI_DOCUMENTATION_SECTION */
#endif /* !SDL_FLOATWORDORDER */
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_error.h b/Source/ThirdParty/SDL/SDL3/SDL_error.h
index 934967c1c..3453818cb 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_error.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_error.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_events.h b/Source/ThirdParty/SDL/SDL3/SDL_events.h
index 4c06e45b1..398c67709 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_events.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_events.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -1256,15 +1256,13 @@ extern SDL_DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType)
* Poll for currently pending events.
*
* If `event` is not NULL, the next event is removed from the queue and stored
- * in the SDL_Event structure pointed to by `event`. The 1 returned refers to
- * this event, immediately stored in the SDL Event structure -- not an event
- * to follow.
+ * in the SDL_Event structure pointed to by `event`.
*
- * If `event` is NULL, it simply returns 1 if there is an event in the queue,
- * but will not remove it from the queue.
+ * If `event` is NULL, it simply returns true if there is an event in the
+ * queue, but will not remove it from the queue.
*
* As this function may implicitly call SDL_PumpEvents(), you can only call
- * this function in the thread that set the video mode.
+ * this function in the thread that initialized the video subsystem.
*
* SDL_PollEvent() is the favored way of receiving system events since it can
* be done from the main loop and does not suspend the main loop while waiting
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_filesystem.h b/Source/ThirdParty/SDL/SDL3/SDL_filesystem.h
index 67f6d7ac8..3a077a096 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_filesystem.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_filesystem.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -241,9 +241,8 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetUserFolder(SDL_Folder folder);
/**
* Types of filesystem entries.
*
- * Note that there may be other sorts of items on a filesystem: devices,
- * symlinks, named pipes, etc. They are currently reported as
- * SDL_PATHTYPE_OTHER.
+ * Note that there may be other sorts of items on a filesystem: devices, named
+ * pipes, etc. They are currently reported as SDL_PATHTYPE_OTHER.
*
* \since This enum is available since SDL 3.2.0.
*
@@ -457,6 +456,10 @@ extern SDL_DECLSPEC bool SDLCALL SDL_CopyFile(const char *oldpath, const char *n
/**
* Get information about a filesystem path.
*
+ * Symlinks, on filesystems that support them, are always followed, so you
+ * will always get information on what the symlink eventually points to, and
+ * not the symlink itself.
+ *
* \param path the path to query.
* \param info a pointer filled in with information about the path, or NULL to
* check for the existence of a file.
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_gamepad.h b/Source/ThirdParty/SDL/SDL3/SDL_gamepad.h
index 0102f1544..113452535 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_gamepad.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_gamepad.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_gpu.h b/Source/ThirdParty/SDL/SDL3/SDL_gpu.h
index d35104a7d..dfe5994aa 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_gpu.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_gpu.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -1398,11 +1398,12 @@ typedef struct SDL_GPUViewport
* SDL_DownloadFromGPUTexture are used as default values respectively and data
* is considered to be tightly packed.
*
- * **WARNING**: Direct3D 12 requires texture data row pitch to be 256 byte
- * aligned, and offsets to be aligned to 512 bytes. If they are not, SDL will
- * make a temporary copy of the data that is properly aligned, but this adds
- * overhead to the transfer process. Apps can avoid this by aligning their
- * data appropriately, or using a different GPU backend than Direct3D 12.
+ * **WARNING**: On some older/integrated hardware, Direct3D 12 requires
+ * texture data row pitch to be 256 byte aligned, and offsets to be aligned to
+ * 512 bytes. If they are not, SDL will make a temporary copy of the data that
+ * is properly aligned, but this adds overhead to the transfer process. Apps
+ * can avoid this by aligning their data appropriately, or using a different
+ * GPU backend than Direct3D 12.
*
* \since This struct is available since SDL 3.2.0.
*
@@ -2306,6 +2307,21 @@ extern SDL_DECLSPEC SDL_GPUDevice * SDLCALL SDL_CreateGPUDevice(
* useful for targeting Intel Haswell and Broadwell GPUs; other hardware
* either supports Tier 2 Resource Binding or does not support D3D12 in any
* capacity. Defaults to false.
+ * - `SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_VERSION_NUMBER`: Certain
+ * feature checks are only possible on Windows 11 by default. By setting
+ * this alongside `SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_PATH_STRING`
+ * and vendoring D3D12Core.dll from the D3D12 Agility SDK, you can make
+ * those feature checks possible on older platforms. The version you provide
+ * must match the one given in the DLL.
+ * - `SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_PATH_STRING`: Certain
+ * feature checks are only possible on Windows 11 by default. By setting
+ * this alongside
+ * `SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_VERSION_NUMBER` and
+ * vendoring D3D12Core.dll from the D3D12 Agility SDK, you can make those
+ * feature checks possible on older platforms. The path you provide must be
+ * relative to the executable path of your app. Be sure not to put the DLL
+ * in the same directory as the exe; Microsoft strongly advises against
+ * this!
*
* With the Vulkan backend:
*
@@ -2321,6 +2337,15 @@ extern SDL_DECLSPEC SDL_GPUDevice * SDLCALL SDL_CreateGPUDevice(
* increasing the API version and opting into extensions aside from the
* minimal set SDL requires.
*
+ * With the Metal backend: -
+ * `SDL_PROP_GPU_DEVICE_CREATE_METAL_ALLOW_MACFAMILY1_BOOLEAN`: By default,
+ * macOS support requires what Apple calls "MTLGPUFamilyMac2" hardware or
+ * newer. However, an application can set this property to true to enable
+ * support for "MTLGPUFamilyMac1" hardware, if (and only if) the application
+ * does not write to sRGB textures. (For history's sake: MacFamily1 also does
+ * not support indirect command buffers, MSAA depth resolve, and stencil
+ * resolve/feedback, but these are not exposed features in SDL_GPU.)
+ *
* \param props the properties to use.
* \returns a GPU context on success or NULL on failure; call SDL_GetError()
* for more information.
@@ -2351,8 +2376,11 @@ extern SDL_DECLSPEC SDL_GPUDevice * SDLCALL SDL_CreateGPUDeviceWithProperties(
#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN "SDL.gpu.device.create.shaders.metallib"
#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_ALLOW_FEWER_RESOURCE_SLOTS_BOOLEAN "SDL.gpu.device.create.d3d12.allowtier1resourcebinding"
#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING "SDL.gpu.device.create.d3d12.semantic"
-#define SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION_BOOLEAN "SDL.gpu.device.create.vulkan.requirehardwareacceleration"
+#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_VERSION_NUMBER "SDL.gpu.device.create.d3d12.agility_sdk_version"
+#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_PATH_STRING "SDL.gpu.device.create.d3d12.agility_sdk_path"
+#define SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION_BOOLEAN "SDL.gpu.device.create.vulkan.requirehardwareacceleration"
#define SDL_PROP_GPU_DEVICE_CREATE_VULKAN_OPTIONS_POINTER "SDL.gpu.device.create.vulkan.options"
+#define SDL_PROP_GPU_DEVICE_CREATE_METAL_ALLOW_MACFAMILY1_BOOLEAN "SDL.gpu.device.create.metal.allowmacfamily1"
/**
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_guid.h b/Source/ThirdParty/SDL/SDL3/SDL_guid.h
index 312c42c03..cf9df31ce 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_guid.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_guid.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_haptic.h b/Source/ThirdParty/SDL/SDL3/SDL_haptic.h
index 9a20396d3..ef91904ae 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_haptic.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_haptic.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -1392,7 +1392,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ResumeHaptic(SDL_Haptic *haptic);
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_RunHapticEffect
- * \sa SDL_StopHapticEffects
+ * \sa SDL_StopHapticEffect
*/
extern SDL_DECLSPEC bool SDLCALL SDL_StopHapticEffects(SDL_Haptic *haptic);
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_hidapi.h b/Source/ThirdParty/SDL/SDL3/SDL_hidapi.h
index 67e29c2a1..90e574c41 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_hidapi.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_hidapi.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_hints.h b/Source/ThirdParty/SDL/SDL3/SDL_hints.h
index 474e97f04..74f5bca07 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_hints.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_hints.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -402,6 +402,11 @@ extern "C" {
* - "Movie" - Music or sound with dialog
* - "Media" - Music or sound without dialog
*
+ * Android's AAudio target supports this hint as of SDL 3.4.4. Android does
+ * not support the exact same options as WASAPI, but for portability, will
+ * attempt to map these same strings to the `aaudio_usage_t` constants. For
+ * example, "Movie" and "Media" will both map to `AAUDIO_USAGE_MEDIA`, etc.
+ *
* If your application applies its own echo cancellation, gain control, and
* noise reduction it should also set SDL_HINT_AUDIO_DEVICE_RAW_STREAM.
*
@@ -1095,7 +1100,7 @@ extern "C" {
*
* This hint should be set before SDL is initialized.
*
- * \since This hint is available since SDL 3.2.0.
+ * \since This hint is available since SDL 3.4.0.
*/
#define SDL_HINT_HIDAPI_LIBUSB_GAMECUBE "SDL_HIDAPI_LIBUSB_GAMECUBE"
@@ -1407,6 +1412,26 @@ extern "C" {
*/
#define SDL_HINT_JOYSTICK_GAMEINPUT "SDL_JOYSTICK_GAMEINPUT"
+/**
+ * A variable controlling whether GameInput should be used for handling
+ * GIP devices that require raw report processing, but aren't supported
+ * by HIDRAW, such as Xbox One Guitars.
+ *
+ * Note that this is only supported with GameInput 3 or newer.
+ *
+ * The variable can be set to the following values:
+ *
+ * - "0": GameInput is not used to handle raw GIP devices.
+ * - "1": GameInput is used.
+ *
+ * The default is "1" when using GameInput 3 or newer, and is "0" otherwise.
+ *
+ * This hint should be set before SDL is initialized.
+ *
+ * \since This hint is available since SDL 3.4.4.
+ */
+#define SDL_HINT_JOYSTICK_GAMEINPUT_RAW "SDL_JOYSTICK_GAMEINPUT_RAW"
+
/**
* A variable containing a list of devices known to have a GameCube form
* factor.
@@ -1778,10 +1803,16 @@ extern "C" {
* A variable controlling whether the HIDAPI driver for HORI licensed Steam
* controllers should be used.
*
- * This variable can be set to the following values: "0" - HIDAPI driver is
- * not used "1" - HIDAPI driver is used
+ * The variable can be set to the following values:
*
- * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
+ * - "0": HIDAPI driver is not used.
+ * - "1": HIDAPI driver is used.
+ *
+ * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
+ *
+ * This hint should be set before initializing joysticks and gamepads.
+ *
+ * \since This hint is available since SDL 3.2.0.
*/
#define SDL_HINT_JOYSTICK_HIDAPI_STEAM_HORI "SDL_JOYSTICK_HIDAPI_STEAM_HORI"
@@ -1789,12 +1820,16 @@ extern "C" {
* A variable controlling whether the HIDAPI driver for some Logitech wheels
* should be used.
*
- * This variable can be set to the following values:
+ * The variable can be set to the following values:
*
- * - "0": HIDAPI driver is not used
- * - "1": HIDAPI driver is used
+ * - "0": HIDAPI driver is not used.
+ * - "1": HIDAPI driver is used.
*
- * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
+ * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
+ *
+ * This hint should be set before initializing joysticks and gamepads.
+ *
+ * \since This hint is available since SDL 3.4.0.
*/
#define SDL_HINT_JOYSTICK_HIDAPI_LG4FF "SDL_JOYSTICK_HIDAPI_LG4FF"
@@ -1802,11 +1837,16 @@ extern "C" {
* A variable controlling whether the HIDAPI driver for 8BitDo controllers
* should be used.
*
- * This variable can be set to the following values:
+ * The variable can be set to the following values:
*
- * "0" - HIDAPI driver is not used. "1" - HIDAPI driver is used.
+ * - "0": HIDAPI driver is not used.
+ * - "1": HIDAPI driver is used.
*
- * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
+ * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
+ *
+ * This hint should be set before initializing joysticks and gamepads.
+ *
+ * \since This hint is available since SDL 3.4.0.
*/
#define SDL_HINT_JOYSTICK_HIDAPI_8BITDO "SDL_JOYSTICK_HIDAPI_8BITDO"
@@ -1816,11 +1856,16 @@ extern "C" {
*
* More info - https://github.com/HandHeldLegend/SInput-HID
*
- * This variable can be set to the following values:
+ * The variable can be set to the following values:
*
- * "0" - HIDAPI driver is not used. "1" - HIDAPI driver is used.
+ * - "0": HIDAPI driver is not used.
+ * - "1": HIDAPI driver is used.
*
- * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
+ * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
+ *
+ * This hint should be set before initializing joysticks and gamepads.
+ *
+ * \since This hint is available since SDL 3.4.0.
*/
#define SDL_HINT_JOYSTICK_HIDAPI_SINPUT "SDL_JOYSTICK_HIDAPI_SINPUT"
@@ -1828,11 +1873,16 @@ extern "C" {
* A variable controlling whether the HIDAPI driver for ZUIKI controllers
* should be used.
*
- * This variable can be set to the following values:
+ * The variable can be set to the following values:
*
- * "0" - HIDAPI driver is not used. "1" - HIDAPI driver is used.
+ * - "0": HIDAPI driver is not used.
+ * - "1": HIDAPI driver is used.
*
- * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
+ * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
+ *
+ * This hint should be set before initializing joysticks and gamepads.
+ *
+ * \since This hint is available since SDL 3.4.0.
*/
#define SDL_HINT_JOYSTICK_HIDAPI_ZUIKI "SDL_JOYSTICK_HIDAPI_ZUIKI"
@@ -1840,11 +1890,16 @@ extern "C" {
* A variable controlling whether the HIDAPI driver for Flydigi controllers
* should be used.
*
- * This variable can be set to the following values:
+ * The variable can be set to the following values:
*
- * "0" - HIDAPI driver is not used. "1" - HIDAPI driver is used.
+ * - "0": HIDAPI driver is not used.
+ * - "1": HIDAPI driver is used.
*
- * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
+ * The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
+ *
+ * This hint should be set before initializing joysticks and gamepads.
+ *
+ * \since This hint is available since SDL 3.4.0.
*/
#define SDL_HINT_JOYSTICK_HIDAPI_FLYDIGI "SDL_JOYSTICK_HIDAPI_FLYDIGI"
@@ -2619,8 +2674,8 @@ extern "C" {
*
* The variable can be set to the following values:
*
- * - "0": Holding a key will open the accents menu for that key.
- * - "1": Holding a key will repeat the pressed key. (default)
+ * - "0": Holding a key will repeat the pressed key.
+ * - "1": Holding a key will open the accents menu for that key. (default)
*
* This hint needs to be set before SDL_Init().
*
@@ -2976,6 +3031,46 @@ extern "C" {
*/
#define SDL_HINT_OPENGL_ES_DRIVER "SDL_OPENGL_ES_DRIVER"
+/**
+ * A variable controlling whether to force an sRGB-capable OpenGL context.
+ *
+ * At OpenGL context creation time, some platforms can request an sRGB-capable
+ * context. However, sometimes any form of the request can cause surprising
+ * results on some drivers, platforms, and hardware. Usually the surprise is
+ * in the form of rendering that is either a little darker or a little
+ * brighter than intended.
+ *
+ * This hint allows the user to override the app's sRGB requests and either
+ * force a specific value, or avoid requesting anything at all, depending on
+ * what makes things work correctly for their system.
+ *
+ * This is meant as a fail-safe; apps should probably not explicitly set this,
+ * and most users should not, either.
+ *
+ * Note that some platforms cannot make this request at all, and on all
+ * platforms this request can be denied by the operating system.
+ *
+ * In addition to attempting to obtain the type of sRGB-capable OpenGL context
+ * requested by this hint, SDL will try to force the state of
+ * GL_FRAMEBUFFER_SRGB on the new context, if appropriate.
+ *
+ * The variable can be set to the following values:
+ *
+ * - "0": Force a request for an OpenGL context that is _not_ sRGB-capable.
+ * - "1": Force a request for an OpenGL context that _is_ sRGB-capable.
+ * - "skip": Don't make any request for an sRGB-capable context (don't specify
+ * the attribute at all during context creation time).
+ * - any other string is undefined behavior.
+ *
+ * If unset, or set to an empty string, SDL will make a request using the
+ * value the app specified with the SDL_GL_FRAMEBUFFER_SRGB_CAPABLE attribute.
+ *
+ * This hint should be set before an OpenGL context is created.
+ *
+ * \since This hint is available since SDL 3.4.2.
+ */
+#define SDL_HINT_OPENGL_FORCE_SRGB_FRAMEBUFFER "SDL_OPENGL_FORCE_SRGB_FRAMEBUFFER"
+
/**
* Mechanism to specify openvr_api library location
*
@@ -3300,33 +3395,45 @@ extern "C" {
#define SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED "SDL_ROG_GAMEPAD_MICE_EXCLUDED"
/**
- * Variable controlling the width of the PS2's framebuffer in pixels
+ * A variable controlling the width of the PS2's framebuffer in pixels.
*
- * By default, this variable is "640"
+ * By default, the variable is "640".
+ *
+ * \since This hint is available since SDL 3.4.0.
*/
#define SDL_HINT_PS2_GS_WIDTH "SDL_PS2_GS_WIDTH"
/**
- * Variable controlling the height of the PS2's framebuffer in pixels
+ * A variable controlling the height of the PS2's framebuffer in pixels.
*
- * By default, this variable is "448"
+ * By default, the variable is "448".
+ *
+ * \since This hint is available since SDL 3.4.0.
*/
#define SDL_HINT_PS2_GS_HEIGHT "SDL_PS2_GS_HEIGHT"
/**
- * Variable controlling whether the signal is interlaced or progressive
+ * A variable controlling whether the signal is interlaced or progressive.
+ *
+ * The variable can be set to the following values:
*
* - "0": Image is interlaced. (default)
- * - "1": Image is progressive
+ * - "1": Image is progressive.
+ *
+ * \since This hint is available since SDL 3.4.0.
*/
#define SDL_HINT_PS2_GS_PROGRESSIVE "SDL_PS2_GS_PROGRESSIVE"
/**
- * Variable controlling the video mode of the console
+ * A variable controlling the video mode of the console.
+ *
+ * The variable can be set to the following values:
*
* - "": Console-native. (default)
- * - "NTSC": 60hz region
- * - "PAL": 50hz region
+ * - "NTSC": 60hz region.
+ * - "PAL": 50hz region.
+ *
+ * \since This hint is available since SDL 3.4.0.
*/
#define SDL_HINT_PS2_GS_MODE "SDL_PS2_GS_MODE"
@@ -4436,6 +4543,23 @@ extern "C" {
*/
#define SDL_HINT_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS "SDL_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS"
+/**
+ * A variable controlling whether the RIDEV_INPUTSINK flag is set when
+ * enabling Windows raw keyboard events.
+ *
+ * This enables the window to still receive input even if not in foreground.
+ *
+ * Focused windows that receive text input will still prevent input events from triggering.
+ *
+ * - "0": Input is not received when not in focus or foreground. (default)
+ * - "1": Input will be received even when not in focus or foreground.
+ *
+ * This hint can be set anytime.
+ *
+ * \since This hint is available since SDL 3.4.4.
+ */
+#define SDL_HINT_WINDOWS_RAW_KEYBOARD_INPUTSINK "SDL_WINDOWS_RAW_KEYBOARD_INPUTSINK"
+
/**
* A variable controlling whether SDL uses Kernel Semaphores on Windows.
*
@@ -4766,7 +4890,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetHintBoolean(const char *name, bool defau
* A callback used to send notifications of hint value changes.
*
* This is called an initial time during SDL_AddHintCallback with the hint's
- * current value, and then again each time the hint's value changes.
+ * current value, and then again each time the hint's value changes. In the
+ * initial call, the current value is in both `oldValue` and `newValue`.
*
* \param userdata what was passed as `userdata` to SDL_AddHintCallback().
* \param name what was passed as `name` to SDL_AddHintCallback().
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_init.h b/Source/ThirdParty/SDL/SDL3/SDL_init.h
index 557f2b995..d75ccc31d 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_init.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_init.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -224,6 +224,8 @@ typedef void (SDLCALL *SDL_AppQuit_func)(void *appstate, SDL_AppResult result);
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety This function should only be called on the main thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_SetAppMetadata
@@ -244,6 +246,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_Init(SDL_InitFlags flags);
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety This function should only be called on the main thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_Init
@@ -260,6 +264,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_InitSubSystem(SDL_InitFlags flags);
*
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
*
+ * \threadsafety This function is not thread safe.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_InitSubSystem
@@ -274,6 +280,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_QuitSubSystem(SDL_InitFlags flags);
* \returns a mask of all initialized subsystems if `flags` is 0, otherwise it
* returns the initialization status of the specified subsystems.
*
+ * \threadsafety This function is not thread safe.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_Init
@@ -292,6 +300,8 @@ extern SDL_DECLSPEC SDL_InitFlags SDLCALL SDL_WasInit(SDL_InitFlags flags);
* application is shutdown, but it is not wise to do this from a library or
* other dynamically loaded code.
*
+ * \threadsafety This function should only be called on the main thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_Init
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_intrin.h b/Source/ThirdParty/SDL/SDL3/SDL_intrin.h
index 802c1953b..a2e968080 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_intrin.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_intrin.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -217,9 +217,9 @@
/* Need to do this here because intrin.h has C++ code in it */
/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
-#ifdef __clang__
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
+#if defined(__clang__) && !SDL_HAS_BUILTIN(_m_prefetch)
#ifndef __PRFCHWINTRIN_H
#define __PRFCHWINTRIN_H
static __inline__ void __attribute__((__always_inline__, __nodebug__))
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_iostream.h b/Source/ThirdParty/SDL/SDL3/SDL_iostream.h
index dfe6f6a9c..f369fde17 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_iostream.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_iostream.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_joystick.h b/Source/ThirdParty/SDL/SDL3/SDL_joystick.h
index af04f0979..c93b35210 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_joystick.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_joystick.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_keyboard.h b/Source/ThirdParty/SDL/SDL3/SDL_keyboard.h
index eb984de58..d14ab6fb2 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_keyboard.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_keyboard.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_keycode.h b/Source/ThirdParty/SDL/SDL3/SDL_keycode.h
index c43660eef..1818ee3e4 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_keycode.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_keycode.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_loadso.h b/Source/ThirdParty/SDL/SDL3/SDL_loadso.h
index f8649d758..51d0d8811 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_loadso.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_loadso.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_locale.h b/Source/ThirdParty/SDL/SDL3/SDL_locale.h
index 902843e81..9f03aa90d 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_locale.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_locale.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
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,8 @@ typedef struct SDL_Locale
* allocation that should be freed with SDL_free() when it is no
* longer needed.
*
+ * \threadsafety This function is not thread safe.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC SDL_Locale ** SDLCALL SDL_GetPreferredLocales(int *count);
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_log.h b/Source/ThirdParty/SDL/SDL3/SDL_log.h
index aceaabe77..f193abfb3 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_log.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_log.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -487,7 +487,8 @@ typedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, int category, SDL_
/**
* Get the default log output function.
*
- * \returns the default log output callback.
+ * \returns the default log output callback. It should be called with NULL for
+ * the userdata argument.
*
* \threadsafety It is safe to call this function from any thread.
*
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_main.h b/Source/ThirdParty/SDL/SDL3/SDL_main.h
index ff497a4c3..771572f29 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_main.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_main.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -257,7 +257,7 @@
#else
/* usually this is empty */
#define SDLMAIN_DECLSPEC
-#endif /* SDL_MAIN_EXPORTED */
+#endif /* SDL_WIKI_DOCUMENTATION_SECTION */
#if defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE) || defined(SDL_MAIN_USE_CALLBACKS)
#define main SDL_main
@@ -333,6 +333,9 @@ extern "C" {
* \returns SDL_APP_FAILURE to terminate with an error, SDL_APP_SUCCESS to
* terminate with success, SDL_APP_CONTINUE to continue.
*
+ * \threadsafety This function is called once by SDL, at startup, on a single
+ * thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_AppIterate
@@ -537,6 +540,8 @@ extern SDLMAIN_DECLSPEC int SDLCALL SDL_main(int argc, char *argv[]);
* will not be changed it is necessary to define SDL_MAIN_HANDLED before
* including SDL.h.
*
+ * \threadsafety This function is not thread safe.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_Init
@@ -629,6 +634,8 @@ extern SDL_DECLSPEC int SDLCALL SDL_EnterAppMainCallbacks(int argc, char *argv[]
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety This function is not thread safe.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_RegisterApp(const char *name, Uint32 style, void *hInst);
@@ -646,6 +653,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RegisterApp(const char *name, Uint32 style,
* deregistered when the registration counter in SDL_RegisterApp decrements to
* zero through calls to this function.
*
+ * \threadsafety This function is not thread safe.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC void SDLCALL SDL_UnregisterApp(void);
@@ -655,10 +664,26 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnregisterApp(void);
/**
* Callback from the application to let the suspend continue.
*
+ * This should be called from an event watch in response to an
+ * `SDL_EVENT_DID_ENTER_BACKGROUND` event.
+ *
+ * When using SDL_Render, your event watch should be added _after_ creating
+ * the `SDL_Renderer`; this allows the timing of the D3D12 command queue
+ * suspension to execute in the correct order.
+ *
+ * When using SDL_GPU, this should be called after calling SDL_GDKSuspendGPU.
+ *
+ * If you're writing your own D3D12 renderer, this should be called after
+ * calling `ID3D12CommandQueue::SuspendX`.
+ *
* This function is only needed for Xbox GDK support; all other platforms will
* do nothing and set an "unsupported" error message.
*
+ * \threadsafety This function is not thread safe.
+ *
* \since This function is available since SDL 3.2.0.
+ *
+ * \sa SDL_AddEventWatch
*/
extern SDL_DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void);
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_main_impl.h b/Source/ThirdParty/SDL/SDL3/SDL_main_impl.h
index 14ebb4291..bf5f58363 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_main_impl.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_main_impl.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_messagebox.h b/Source/ThirdParty/SDL/SDL3/SDL_messagebox.h
index 365ae36a5..af604e2c7 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_messagebox.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_messagebox.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -168,6 +168,8 @@ typedef struct SDL_MessageBoxData
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety This function should only be called on the main thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_ShowSimpleMessageBox
@@ -210,6 +212,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ShowMessageBox(const SDL_MessageBoxData *me
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety This function should only be called on the main thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_ShowMessageBox
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_metal.h b/Source/ThirdParty/SDL/SDL3/SDL_metal.h
index 14b1bc87a..6b0e171b4 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_metal.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_metal.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
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,8 @@ typedef void *SDL_MetalView;
* \param window the window.
* \returns handle NSView or UIView.
*
+ * \threadsafety This function should only be called on the main thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_Metal_DestroyView
@@ -80,6 +82,8 @@ extern SDL_DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window *windo
*
* \param view the SDL_MetalView object.
*
+ * \threadsafety This function should only be called on the main thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_Metal_CreateView
@@ -92,6 +96,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view);
* \param view the SDL_MetalView object.
* \returns a pointer.
*
+ * \threadsafety This function should only be called on the main thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC void * SDLCALL SDL_Metal_GetLayer(SDL_MetalView view);
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_misc.h b/Source/ThirdParty/SDL/SDL3/SDL_misc.h
index 3dd6fcddd..654c00558 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_misc.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_misc.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
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,8 @@ extern "C" {
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety This function should only be called on the main thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_OpenURL(const char *url);
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_mouse.h b/Source/ThirdParty/SDL/SDL3/SDL_mouse.h
index d502005a7..fb03c0178 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_mouse.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_mouse.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_mutex.h b/Source/ThirdParty/SDL/SDL3/SDL_mutex.h
index 024ce0b37..29e8f1a1c 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_mutex.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_mutex.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -308,6 +308,8 @@ typedef struct SDL_Mutex SDL_Mutex;
* \returns the initialized and unlocked mutex or NULL on failure; call
* SDL_GetError() for more information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_DestroyMutex
@@ -334,6 +336,8 @@ extern SDL_DECLSPEC SDL_Mutex * SDLCALL SDL_CreateMutex(void);
*
* \param mutex the mutex to lock.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_TryLockMutex
@@ -355,6 +359,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_LockMutex(SDL_Mutex *mutex) SDL_ACQUIRE(mut
* \param mutex the mutex to try to lock.
* \returns true on success, false if the mutex would block.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_LockMutex
@@ -374,6 +380,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_TryLockMutex(SDL_Mutex *mutex) SDL_TRY_ACQU
*
* \param mutex the mutex to unlock.
*
+ * \threadsafety This call must be paired with a previous locking call on the
+ * same thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_LockMutex
@@ -392,6 +401,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnlockMutex(SDL_Mutex *mutex) SDL_RELEASE(m
*
* \param mutex the mutex to destroy.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_CreateMutex
@@ -457,6 +468,8 @@ typedef struct SDL_RWLock SDL_RWLock;
* \returns the initialized and unlocked read/write lock or NULL on failure;
* call SDL_GetError() for more information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_DestroyRWLock
@@ -497,6 +510,8 @@ extern SDL_DECLSPEC SDL_RWLock * SDLCALL SDL_CreateRWLock(void);
*
* \param rwlock the read/write lock to lock.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_LockRWLockForWriting
@@ -528,6 +543,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_LockRWLockForReading(SDL_RWLock *rwlock) SD
*
* \param rwlock the read/write lock to lock.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_LockRWLockForReading
@@ -553,6 +570,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_LockRWLockForWriting(SDL_RWLock *rwlock) SD
* \param rwlock the rwlock to try to lock.
* \returns true on success, false if the lock would block.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_LockRWLockForReading
@@ -583,6 +602,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_TryLockRWLockForReading(SDL_RWLock *rwlock)
* \param rwlock the rwlock to try to lock.
* \returns true on success, false if the lock would block.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_LockRWLockForWriting
@@ -607,6 +628,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_TryLockRWLockForWriting(SDL_RWLock *rwlock)
*
* \param rwlock the rwlock to unlock.
*
+ * \threadsafety This call must be paired with a previous locking call on the
+ * same thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_LockRWLockForReading
@@ -627,6 +651,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnlockRWLock(SDL_RWLock *rwlock) SDL_RELEAS
*
* \param rwlock the rwlock to destroy.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_CreateRWLock
@@ -670,6 +696,8 @@ typedef struct SDL_Semaphore SDL_Semaphore;
* \returns a new semaphore or NULL on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_DestroySemaphore
@@ -689,6 +717,8 @@ extern SDL_DECLSPEC SDL_Semaphore * SDLCALL SDL_CreateSemaphore(Uint32 initial_v
*
* \param sem the semaphore to destroy.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_CreateSemaphore
@@ -707,6 +737,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_Semaphore *sem);
*
* \param sem the semaphore wait on.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_SignalSemaphore
@@ -726,6 +758,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_WaitSemaphore(SDL_Semaphore *sem);
* \param sem the semaphore to wait on.
* \returns true if the wait succeeds, false if the wait would block.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_SignalSemaphore
@@ -746,6 +780,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_TryWaitSemaphore(SDL_Semaphore *sem);
* indefinitely.
* \returns true if the wait succeeds or false if the wait times out.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_SignalSemaphore
@@ -759,6 +795,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WaitSemaphoreTimeout(SDL_Semaphore *sem, Si
*
* \param sem the semaphore to increment.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_TryWaitSemaphore
@@ -773,6 +811,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_SignalSemaphore(SDL_Semaphore *sem);
* \param sem the semaphore to query.
* \returns the current value of the semaphore.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC Uint32 SDLCALL SDL_GetSemaphoreValue(SDL_Semaphore *sem);
@@ -806,6 +846,8 @@ typedef struct SDL_Condition SDL_Condition;
* \returns a new condition variable or NULL on failure; call SDL_GetError()
* for more information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_BroadcastCondition
@@ -821,6 +863,8 @@ extern SDL_DECLSPEC SDL_Condition * SDLCALL SDL_CreateCondition(void);
*
* \param cond the condition variable to destroy.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_CreateCondition
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_oldnames.h b/Source/ThirdParty/SDL/SDL3/SDL_oldnames.h
index c93607e3f..cbf045330 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_oldnames.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_oldnames.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -796,6 +796,7 @@
#define SDL_TEXTEDITING_EXT SDL_TEXTEDITING_EXT_renamed_SDL_EVENT_TEXT_EDITING_EXT
#define SDL_TEXTINPUT SDL_TEXTINPUT_renamed_SDL_EVENT_TEXT_INPUT
#define SDL_USEREVENT SDL_USEREVENT_renamed_SDL_EVENT_USER
+#define SDL_WINDOWEVENT SDL_WINDOWEVENT_deprecated_use_SDL_EVENT_WINDOW_NAME
#define SDL_WINDOWEVENT_CLOSE SDL_WINDOWEVENT_CLOSE_renamed_SDL_EVENT_WINDOW_CLOSE_REQUESTED
#define SDL_WINDOWEVENT_DISPLAY_CHANGED SDL_WINDOWEVENT_DISPLAY_CHANGED_renamed_SDL_EVENT_WINDOW_DISPLAY_CHANGED
#define SDL_WINDOWEVENT_ENTER SDL_WINDOWEVENT_ENTER_renamed_SDL_EVENT_WINDOW_MOUSE_ENTER
@@ -870,6 +871,7 @@
#define SDL_GameControllerBindType SDL_GameControllerBindType_renamed_SDL_GamepadBindingType
#define SDL_GameControllerButton SDL_GameControllerButton_renamed_SDL_GamepadButton
#define SDL_GameControllerClose SDL_GameControllerClose_renamed_SDL_CloseGamepad
+#define SDL_GameControllerEventState SDL_GameControllerEventState_deprecated_use_SDL_SetGamepadEventsEnabled_true_false
#define SDL_GameControllerFromInstanceID SDL_GameControllerFromInstanceID_renamed_SDL_GetGamepadFromID
#define SDL_GameControllerFromPlayerIndex SDL_GameControllerFromPlayerIndex_renamed_SDL_GetGamepadFromPlayerIndex
#define SDL_GameControllerGetAppleSFSymbolsNameForAxis SDL_GameControllerGetAppleSFSymbolsNameForAxis_renamed_SDL_GetGamepadAppleSFSymbolsNameForAxis
@@ -947,6 +949,7 @@
/* ##SDL_hints.h */
#define SDL_DelHintCallback SDL_DelHintCallback_renamed_SDL_RemoveHintCallback
+#define SDL_HINT_ACCELEROMETER_AS_JOYSTICK SDL_HINT_ACCELEROMETER_AS_JOYSTICK_deprecated_use_SDL_GamepadHasSensor_and_SDL_SetGamepadSensorEnabled
#define SDL_HINT_ALLOW_TOPMOST SDL_HINT_ALLOW_TOPMOST_renamed_SDL_HINT_WINDOW_ALLOW_TOPMOST
#define SDL_HINT_DIRECTINPUT_ENABLED SDL_HINT_DIRECTINPUT_ENABLED_renamed_SDL_HINT_JOYSTICK_DIRECTINPUT
#define SDL_HINT_GDK_TEXTINPUT_DEFAULT SDL_HINT_GDK_TEXTINPUT_DEFAULT_renamed_SDL_HINT_GDK_TEXTINPUT_DEFAULT_TEXT
@@ -957,6 +960,8 @@
#define SDL_HINT_LINUX_HAT_DEADZONES SDL_HINT_LINUX_HAT_DEADZONES_renamed_SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES
#define SDL_HINT_LINUX_JOYSTICK_CLASSIC SDL_HINT_LINUX_JOYSTICK_CLASSIC_renamed_SDL_HINT_JOYSTICK_LINUX_CLASSIC
#define SDL_HINT_LINUX_JOYSTICK_DEADZONES SDL_HINT_LINUX_JOYSTICK_DEADZONES_renamed_SDL_HINT_JOYSTICK_LINUX_DEADZONES
+#define SDL_HINT_RENDER_SCALE_QUALITY SDL_HINT_RENDER_SCALE_QUALITY_deprecated_use_SDL_SetTextureScaleMode_with_SDL_SCALEMODE_NEAREST
+#define SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS_deprecated_remove_this_line
/* ##SDL_joystick.h */
#define SDL_JOYSTICK_TYPE_GAMECONTROLLER SDL_JOYSTICK_TYPE_GAMECONTROLLER_renamed_SDL_JOYSTICK_TYPE_GAMEPAD
@@ -999,6 +1004,7 @@
#define SDL_JoystickSetVirtualButton SDL_JoystickSetVirtualButton_renamed_SDL_SetJoystickVirtualButton
#define SDL_JoystickSetVirtualHat SDL_JoystickSetVirtualHat_renamed_SDL_SetJoystickVirtualHat
#define SDL_JoystickUpdate SDL_JoystickUpdate_renamed_SDL_UpdateJoysticks
+#define SDL_NumJoysticks SDL_NumJoysticks_deprecated_use_SDL_GetJoysticks
/* ##SDL_keyboard.h */
#define SDL_IsScreenKeyboardShown SDL_IsScreenKeyboardShown_renamed_SDL_ScreenKeyboardShown
@@ -1147,6 +1153,8 @@
/* ##SDL_render.h */
#define SDL_GetRendererOutputSize SDL_GetRendererOutputSize_renamed_SDL_GetCurrentRenderOutputSize
+#define SDL_RENDERER_ACCELERATED SDL_RENDERER_ACCELERATED_deprecated_remove_this_line
+#define SDL_RENDERER_PRESENTVSYNC SDL_RENDERER_PRESENTVSYNC_deprecated_use_SDL_SetRenderVSync
#define SDL_RenderCopy SDL_RenderCopy_renamed_SDL_RenderTexture
#define SDL_RenderCopyEx SDL_RenderCopyEx_renamed_SDL_RenderTextureRotated
#define SDL_RenderCopyExF SDL_RenderCopyExF_renamed_SDL_RenderTextureRotated
@@ -1291,6 +1299,7 @@
/* ##SDL_thread.h */
#define SDL_SetThreadPriority SDL_SetThreadPriority_renamed_SDL_SetCurrentThreadPriority
+#define SDL_SetWindowInputFocus SDL_SetWindowInputFocus_deprecated_use_SDL_RaiseWindow
#define SDL_TLSCleanup SDL_TLSCleanup_renamed_SDL_CleanupTLS
#define SDL_TLSGet SDL_TLSGet_renamed_SDL_GetTLS
#define SDL_TLSSet SDL_TLSSet_renamed_SDL_SetTLS
@@ -1316,10 +1325,13 @@
#define SDL_GetWindowDisplayIndex SDL_GetWindowDisplayIndex_renamed_SDL_GetDisplayForWindow
#define SDL_GetWindowDisplayMode SDL_GetWindowDisplayMode_renamed_SDL_GetWindowFullscreenMode
#define SDL_HasWindowSurface SDL_HasWindowSurface_renamed_SDL_WindowHasSurface
+#define SDL_INIT_EVERYTHING SDL_INIT_EVERYTHING_deprecated_list_flags_explicitly
#define SDL_IsScreenSaverEnabled SDL_IsScreenSaverEnabled_renamed_SDL_ScreenSaverEnabled
#define SDL_SetWindowDisplayMode SDL_SetWindowDisplayMode_renamed_SDL_SetWindowFullscreenMode
#define SDL_WINDOW_ALLOW_HIGHDPI SDL_WINDOW_ALLOW_HIGHDPI_renamed_SDL_WINDOW_HIGH_PIXEL_DENSITY
+#define SDL_WINDOW_FULLSCREEN_DESKTOP SDL_WINDOW_FULLSCREEN_DESKTOP_deprecated_use_SDL_SetWindowFullscreen_with_bool
#define SDL_WINDOW_INPUT_GRABBED SDL_WINDOW_INPUT_GRABBED_renamed_SDL_WINDOW_MOUSE_GRABBED
+#define SDL_WINDOW_SHOWN SDL_WINDOW_SHOWN_deprecated_windows_are_shown_by_default
#define SDL_WINDOW_SKIP_TASKBAR SDL_WINDOW_SKIP_TASKBAR_renamed_SDL_WINDOW_UTILITY
#endif /* SDL_ENABLE_OLD_NAMES */
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_opengl.h b/Source/ThirdParty/SDL/SDL3/SDL_opengl.h
index d1b8b02a3..733f2b51a 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_opengl.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_opengl.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_opengles.h b/Source/ThirdParty/SDL/SDL3/SDL_opengles.h
index 4fb9a4b70..227f51be4 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_opengles.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_opengles.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_opengles2.h b/Source/ThirdParty/SDL/SDL3/SDL_opengles2.h
index 365898a65..2c746143f 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_opengles2.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_opengles2.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_openxr.h b/Source/ThirdParty/SDL/SDL3/SDL_openxr.h
new file mode 100644
index 000000000..ceb9790c5
--- /dev/null
+++ b/Source/ThirdParty/SDL/SDL3/SDL_openxr.h
@@ -0,0 +1,237 @@
+/*
+ Simple DirectMedia Layer
+ Copyright (C) 1997-2026 Sam Lantinga
+
+ 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.
+*/
+
+/**
+ * # CategoryOpenXR
+ *
+ * Functions for creating OpenXR handles for SDL_gpu contexts.
+ *
+ * For the most part, OpenXR operates independent of SDL, but
+ * the graphics initialization depends on direct support from SDL_gpu.
+ *
+ */
+
+#ifndef SDL_openxr_h_
+#define SDL_openxr_h_
+
+#include
+#include
+
+#include
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(OPENXR_H_)
+#define NO_SDL_OPENXR_TYPEDEFS 1
+#endif /* OPENXR_H_ */
+
+#if !defined(NO_SDL_OPENXR_TYPEDEFS)
+#define XR_NULL_HANDLE 0
+
+#if !defined(XR_DEFINE_HANDLE)
+ #define XR_DEFINE_HANDLE(object) typedef Uint64 object;
+#endif /* XR_DEFINE_HANDLE */
+
+typedef enum XrStructureType {
+ XR_TYPE_SESSION_CREATE_INFO = 8,
+ XR_TYPE_SWAPCHAIN_CREATE_INFO = 9,
+} XrStructureType;
+
+XR_DEFINE_HANDLE(XrInstance)
+XR_DEFINE_HANDLE(XrSystemId)
+XR_DEFINE_HANDLE(XrSession)
+XR_DEFINE_HANDLE(XrSwapchain)
+
+typedef struct {
+ XrStructureType type;
+ const void* next;
+} XrSessionCreateInfo;
+typedef struct {
+ XrStructureType type;
+ const void* next;
+} XrSwapchainCreateInfo;
+
+typedef enum XrResult {
+ XR_ERROR_FUNCTION_UNSUPPORTED = -7,
+ XR_ERROR_HANDLE_INVALID = -12,
+} XrResult;
+
+#define PFN_xrGetInstanceProcAddr SDL_FunctionPointer
+#endif /* NO_SDL_OPENXR_TYPEDEFS */
+
+/**
+ * Creates an OpenXR session.
+ *
+ * The OpenXR system ID is pulled from the passed GPU context.
+ *
+ * \param device a GPU context.
+ * \param createinfo the create info for the OpenXR session, sans the system
+ * ID.
+ * \param session a pointer filled in with an OpenXR session created for the
+ * given device.
+ * \returns the result of the call.
+ *
+ * \since This function is available since SDL 3.6.0.
+ *
+ * \sa SDL_CreateGPUDeviceWithProperties
+ */
+extern SDL_DECLSPEC XrResult SDLCALL SDL_CreateGPUXRSession(SDL_GPUDevice *device, const XrSessionCreateInfo *createinfo, XrSession *session);
+
+/**
+ * Queries the GPU device for supported XR swapchain image formats.
+ *
+ * The returned pointer should be allocated with SDL_malloc() and will be
+ * passed to SDL_free().
+ *
+ * \param device a GPU context.
+ * \param session an OpenXR session created for the given device.
+ * \param num_formats a pointer filled with the number of supported XR
+ * swapchain formats.
+ * \returns a 0 terminated array of supported formats or NULL on failure; call
+ * SDL_GetError() for more information. This should be freed with
+ * SDL_free() when it is no longer needed.
+ *
+ * \since This function is available since SDL 3.6.0.
+ *
+ * \sa SDL_CreateGPUXRSwapchain
+ */
+extern SDL_DECLSPEC SDL_GPUTextureFormat * SDLCALL SDL_GetGPUXRSwapchainFormats(SDL_GPUDevice *device, XrSession session, int *num_formats);
+
+/**
+ * Creates an OpenXR swapchain.
+ *
+ * The array returned via `textures` is sized according to
+ * `xrEnumerateSwapchainImages`, and thus should only be accessed via index
+ * values returned from `xrAcquireSwapchainImage`.
+ *
+ * Applications are still allowed to call `xrEnumerateSwapchainImages` on the
+ * returned XrSwapchain if they need to get the exact size of the array.
+ *
+ * \param device a GPU context.
+ * \param session an OpenXR session created for the given device.
+ * \param createinfo the create info for the OpenXR swapchain, sans the
+ * format.
+ * \param format a supported format for the OpenXR swapchain.
+ * \param swapchain a pointer filled in with the created OpenXR swapchain.
+ * \param textures a pointer filled in with the array of created swapchain
+ * images.
+ * \returns the result of the call.
+ *
+ * \since This function is available since SDL 3.6.0.
+ *
+ * \sa SDL_CreateGPUDeviceWithProperties
+ * \sa SDL_CreateGPUXRSession
+ * \sa SDL_GetGPUXRSwapchainFormats
+ * \sa SDL_DestroyGPUXRSwapchain
+ */
+extern SDL_DECLSPEC XrResult SDLCALL SDL_CreateGPUXRSwapchain(
+ SDL_GPUDevice *device,
+ XrSession session,
+ const XrSwapchainCreateInfo *createinfo,
+ SDL_GPUTextureFormat format,
+ XrSwapchain *swapchain,
+ SDL_GPUTexture ***textures);
+
+/**
+ * Destroys and OpenXR swapchain previously returned by
+ * SDL_CreateGPUXRSwapchain.
+ *
+ * \param device a GPU context.
+ * \param swapchain a swapchain previously returned by
+ * SDL_CreateGPUXRSwapchain.
+ * \param swapchainImages an array of swapchain images returned by the same
+ * call to SDL_CreateGPUXRSwapchain.
+ * \returns the result of the call.
+ *
+ * \since This function is available since SDL 3.6.0.
+ *
+ * \sa SDL_CreateGPUDeviceWithProperties
+ * \sa SDL_CreateGPUXRSession
+ * \sa SDL_CreateGPUXRSwapchain
+ */
+extern SDL_DECLSPEC XrResult SDLCALL SDL_DestroyGPUXRSwapchain(SDL_GPUDevice *device, XrSwapchain swapchain, SDL_GPUTexture **swapchainImages);
+
+/**
+ * Dynamically load the OpenXR loader.
+ *
+ * This can be called at any time.
+ *
+ * SDL keeps a reference count of the OpenXR loader, calling this function
+ * multiple times will increment that count, rather than loading the library
+ * multiple times.
+ *
+ * If not called, this will be implicitly called when creating a GPU device
+ * with OpenXR.
+ *
+ * This function will use the platform default OpenXR loader name, unless the
+ * `SDL_HINT_OPENXR_LIBRARY` hint is set.
+ *
+ * \returns true on success or false on failure; call SDL_GetError() for more
+ * information.
+ *
+ * \threadsafety This function is not thread safe.
+ *
+ * \since This function is available since SDL 3.6.0.
+ *
+ * \sa SDL_HINT_OPENXR_LIBRARY
+ */
+extern SDL_DECLSPEC bool SDLCALL SDL_OpenXR_LoadLibrary(void);
+
+/**
+ * Unload the OpenXR loader previously loaded by SDL_OpenXR_LoadLibrary.
+ *
+ * SDL keeps a reference count of the OpenXR loader, calling this function
+ * will decrement that count. Once the reference count reaches zero, the
+ * library is unloaded.
+ *
+ * \threadsafety This function is not thread safe.
+ *
+ * \since This function is available since SDL 3.6.0.
+ */
+extern SDL_DECLSPEC void SDLCALL SDL_OpenXR_UnloadLibrary(void);
+
+/**
+ * Get the address of the `xrGetInstanceProcAddr` function.
+ *
+ * This should be called after either calling SDL_OpenXR_LoadLibrary() or
+ * creating an OpenXR SDL_GPUDevice.
+ *
+ * The actual type of the returned function pointer is
+ * PFN_xrGetInstanceProcAddr, but that isn't always available. You should
+ * include the OpenXR headers before this header, or cast the return value of
+ * this function to the correct type.
+ *
+ * \returns the function pointer for `xrGetInstanceProcAddr` or NULL on
+ * failure; call SDL_GetError() for more information.
+ *
+ * \since This function is available since SDL 3.6.0.
+ */
+extern SDL_DECLSPEC PFN_xrGetInstanceProcAddr SDLCALL SDL_OpenXR_GetXrGetInstanceProcAddr(void);
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include
+
+#endif /* SDL_openxr_h_ */
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_pen.h b/Source/ThirdParty/SDL/SDL3/SDL_pen.h
index 97c22e506..63f32bb68 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_pen.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_pen.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -54,11 +54,11 @@
* example, some platforms can manage multiple devices at the same time, but
* others will make any connected pens look like a single logical device, much
* how all USB mice connected to a computer will move the same system cursor.
- * cursor. Other platforms might not support pen buttons, or the distance
- * axis, etc. Very few platforms can even report _what_ functionality the pen
- * supports in the first place, so best practices is to either build UI to let
- * the user configure their pens, or be prepared to handle new functionality
- * for a pen the first time an event is reported.
+ * Other platforms might not support pen buttons, or the distance axis, etc.
+ * Very few platforms can even report _what_ functionality the pen supports in
+ * the first place, so best practices is to either build UI to let the user
+ * configure their pens, or be prepared to handle new functionality for a pen
+ * the first time an event is reported.
*/
#ifndef SDL_pen_h_
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_pixels.h b/Source/ThirdParty/SDL/SDL3/SDL_pixels.h
index 54ef954ed..475e5f9c3 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_pixels.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_pixels.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_platform.h b/Source/ThirdParty/SDL/SDL3/SDL_platform.h
index e40f009ba..9ad380bab 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_platform.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_platform.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -51,6 +51,8 @@ extern "C" {
* \returns the name of the platform. If the correct platform name is not
* available, returns a string beginning with the text "Unknown".
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC const char * SDLCALL SDL_GetPlatform(void);
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_platform_defines.h b/Source/ThirdParty/SDL/SDL3/SDL_platform_defines.h
index 7de110e03..79631491d 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_platform_defines.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_platform_defines.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_power.h b/Source/ThirdParty/SDL/SDL3/SDL_power.h
index bc2d9d53e..0616cc275 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_power.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_power.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -93,6 +93,8 @@ typedef enum SDL_PowerState
* \returns the current battery state or `SDL_POWERSTATE_ERROR` on failure;
* call SDL_GetError() for more information.
*
+ * \threadsafety This function is not thread safe.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *seconds, int *percent);
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_process.h b/Source/ThirdParty/SDL/SDL3/SDL_process.h
index 57e3afd94..b797890d8 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_process.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_process.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_properties.h b/Source/ThirdParty/SDL/SDL3/SDL_properties.h
index 8e87dfce4..abd7b2aa5 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_properties.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_properties.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -111,6 +111,8 @@ typedef enum SDL_PropertyType
* \returns a valid property ID on success or 0 on failure; call
* SDL_GetError() for more information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetGlobalProperties(void);
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_rect.h b/Source/ThirdParty/SDL/SDL3/SDL_rect.h
index 56eb6ffe6..5f395ec44 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_rect.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_rect.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -237,6 +237,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasRectIntersection(const SDL_Rect *A, cons
* rectangles `A` and `B`.
* \returns true if there is an intersection, false otherwise.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_HasRectIntersection
@@ -253,6 +255,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRectIntersection(const SDL_Rect *A, cons
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_GetRectUnion(const SDL_Rect *A, const SDL_Rect *B, SDL_Rect *result);
@@ -272,6 +276,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRectUnion(const SDL_Rect *A, const SDL_R
* \returns true if any points were enclosed or false if all the points were
* outside of the clipping rectangle.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_GetRectEnclosingPoints(const SDL_Point *points, int count, const SDL_Rect *clip, SDL_Rect *result);
@@ -292,6 +298,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRectEnclosingPoints(const SDL_Point *poi
* \param Y2 a pointer to the ending Y-coordinate of the line.
* \returns true if there is an intersection, false otherwise.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_GetRectAndLineIntersection(const SDL_Rect *rect, int *X1, int *Y1, int *X2, int *Y2);
@@ -423,9 +431,11 @@ SDL_FORCE_INLINE bool SDL_RectsEqualFloat(const SDL_FRect *a, const SDL_FRect *b
* \param B an SDL_FRect structure representing the second rectangle.
* \returns true if there is an intersection, false otherwise.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
- * \sa SDL_GetRectIntersection
+ * \sa SDL_GetRectIntersectionFloat
*/
extern SDL_DECLSPEC bool SDLCALL SDL_HasRectIntersectionFloat(const SDL_FRect *A, const SDL_FRect *B);
@@ -440,6 +450,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasRectIntersectionFloat(const SDL_FRect *A
* rectangles `A` and `B`.
* \returns true if there is an intersection, false otherwise.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_HasRectIntersectionFloat
@@ -456,6 +468,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRectIntersectionFloat(const SDL_FRect *A
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_GetRectUnionFloat(const SDL_FRect *A, const SDL_FRect *B, SDL_FRect *result);
@@ -476,6 +490,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRectUnionFloat(const SDL_FRect *A, const
* \returns true if any points were enclosed or false if all the points were
* outside of the clipping rectangle.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_GetRectEnclosingPointsFloat(const SDL_FPoint *points, int count, const SDL_FRect *clip, SDL_FRect *result);
@@ -497,6 +513,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRectEnclosingPointsFloat(const SDL_FPoin
* \param Y2 a pointer to the ending Y-coordinate of the line.
* \returns true if there is an intersection, false otherwise.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_GetRectAndLineIntersectionFloat(const SDL_FRect *rect, float *X1, float *Y1, float *X2, float *Y2);
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_render.h b/Source/ThirdParty/SDL/SDL3/SDL_render.h
index 3d5139f59..986130ce4 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_render.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_render.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -754,8 +754,6 @@ extern SDL_DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Rende
*
* - `SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_NUMBER`: the GLuint texture
* associated with the texture, if you want to wrap an existing texture.
- * - `SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_NUMBER`: the GLuint texture
- * associated with the texture, if you want to wrap an existing texture.
* - `SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_UV_NUMBER`: the GLuint texture
* associated with the UV plane of an NV12 texture, if you want to wrap an
* existing texture.
@@ -2509,6 +2507,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderGeometryRaw(SDL_Renderer *renderer,
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety This function should only be called on the main thread.
+ *
* \since This function is available since SDL 3.4.0.
*
* \sa SDL_RenderGeometry
@@ -2530,6 +2530,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderTextureAddressMode(SDL_Renderer *r
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety This function should only be called on the main thread.
+ *
* \since This function is available since SDL 3.4.0.
*
* \sa SDL_SetRenderTextureAddressMode
@@ -2963,7 +2965,7 @@ typedef struct SDL_GPURenderState SDL_GPURenderState;
* \sa SDL_SetGPURenderState
* \sa SDL_DestroyGPURenderState
*/
-extern SDL_DECLSPEC SDL_GPURenderState * SDLCALL SDL_CreateGPURenderState(SDL_Renderer *renderer, SDL_GPURenderStateCreateInfo *createinfo);
+extern SDL_DECLSPEC SDL_GPURenderState * SDLCALL SDL_CreateGPURenderState(SDL_Renderer *renderer, const SDL_GPURenderStateCreateInfo *createinfo);
/**
* Set fragment shader uniform variables in a custom GPU render state.
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_revision.h b/Source/ThirdParty/SDL/SDL3/SDL_revision.h
index e6996ec37..a23e4fca1 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_revision.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_revision.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -31,9 +31,9 @@
/* #undef SDL_VENDOR_INFO */
#ifdef SDL_VENDOR_INFO
-#define SDL_REVISION "SDL-3.4.0-release-3.4.0 (" SDL_VENDOR_INFO ")"
+#define SDL_REVISION "SDL-3.4.4-release-3.4.4 (" SDL_VENDOR_INFO ")"
#else
-#define SDL_REVISION "SDL-3.4.0-release-3.4.0"
+#define SDL_REVISION "SDL-3.4.4-release-3.4.4"
#endif
#endif /* SDL_revision_h_ */
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_scancode.h b/Source/ThirdParty/SDL/SDL3/SDL_scancode.h
index 6e9be47e6..cd5a1376a 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_scancode.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_scancode.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_sensor.h b/Source/ThirdParty/SDL/SDL3/SDL_sensor.h
index 43366f135..bf890472f 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_sensor.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_sensor.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_stdinc.h b/Source/ThirdParty/SDL/SDL3/SDL_stdinc.h
index f15ab727b..205f9bc3b 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_stdinc.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_stdinc.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -254,12 +254,6 @@ void *alloca(size_t);
/**
* Macro useful for building other macros with strings in them.
*
- * For example:
- *
- * ```c
- * #define LOG_ERROR(X) OutputDebugString(SDL_STRINGIFY_ARG(__FUNCTION__) ": " X "\n")`
- * ```
- *
* \param arg the text to turn into a string literal.
*
* \since This macro is available since SDL 3.2.0.
@@ -1802,6 +1796,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroyEnvironment(SDL_Environment *env);
/**
* Get the value of a variable in the environment.
*
+ * The name of the variable is case sensitive on all platforms.
+ *
* This function uses SDL's cached copy of the environment and is thread-safe.
*
* \param name the name of the variable to get.
@@ -1820,6 +1816,11 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_getenv(const char *name);
* This function bypasses SDL's cached copy of the environment and is not
* thread-safe.
*
+ * On some platforms, this may make case-insensitive matches, while other
+ * platforms are case-sensitive. It is best to be precise with strings used
+ * for queries through this interface. SDL_getenv is always case-sensitive,
+ * however.
+ *
* \param name the name of the variable to get.
* \returns a pointer to the value of the variable or NULL if it can't be
* found.
@@ -5821,6 +5822,8 @@ typedef struct SDL_iconv_data_t *SDL_iconv_t;
* \returns a handle that must be freed with SDL_iconv_close, or
* SDL_ICONV_ERROR on failure.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_iconv
@@ -5836,6 +5839,8 @@ extern SDL_DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode,
* \param cd The character set conversion handle.
* \returns 0 on success, or -1 on failure.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_iconv
@@ -5874,6 +5879,8 @@ extern SDL_DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);
* \param outbytesleft The number of bytes in the output buffer.
* \returns the number of conversions on success, or a negative error code.
*
+ * \threadsafety Do not use the same SDL_iconv_t from two threads at once.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_iconv_open
@@ -5909,6 +5916,8 @@ extern SDL_DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf,
* \param inbytesleft the size of the input string _in bytes_.
* \returns a new string, converted to the new encoding, or NULL on error.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_iconv_open
@@ -5932,6 +5941,8 @@ extern SDL_DECLSPEC char * SDLCALL SDL_iconv_string(const char *tocode,
* \param S the string to convert.
* \returns a new string, converted to the new encoding, or NULL on error.
*
+ * \threadsafety It is safe to call this macro from any thread.
+ *
* \since This macro is available since SDL 3.2.0.
*/
#define SDL_iconv_utf8_locale(S) SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1)
@@ -5946,6 +5957,8 @@ extern SDL_DECLSPEC char * SDLCALL SDL_iconv_string(const char *tocode,
* \param S the string to convert.
* \returns a new string, converted to the new encoding, or NULL on error.
*
+ * \threadsafety It is safe to call this macro from any thread.
+ *
* \since This macro is available since SDL 3.2.0.
*/
#define SDL_iconv_utf8_ucs2(S) SDL_reinterpret_cast(Uint16 *, SDL_iconv_string("UCS-2", "UTF-8", S, SDL_strlen(S)+1))
@@ -5960,6 +5973,8 @@ extern SDL_DECLSPEC char * SDLCALL SDL_iconv_string(const char *tocode,
* \param S the string to convert.
* \returns a new string, converted to the new encoding, or NULL on error.
*
+ * \threadsafety It is safe to call this macro from any thread.
+ *
* \since This macro is available since SDL 3.2.0.
*/
#define SDL_iconv_utf8_ucs4(S) SDL_reinterpret_cast(Uint32 *, SDL_iconv_string("UCS-4", "UTF-8", S, SDL_strlen(S)+1))
@@ -5974,6 +5989,8 @@ extern SDL_DECLSPEC char * SDLCALL SDL_iconv_string(const char *tocode,
* \param S the string to convert.
* \returns a new string, converted to the new encoding, or NULL on error.
*
+ * \threadsafety It is safe to call this macro from any thread.
+ *
* \since This macro is available since SDL 3.2.0.
*/
#define SDL_iconv_wchar_utf8(S) SDL_iconv_string("UTF-8", "WCHAR_T", SDL_reinterpret_cast(const char *, S), (SDL_wcslen(S)+1)*sizeof(wchar_t))
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_storage.h b/Source/ThirdParty/SDL/SDL3/SDL_storage.h
index 1b20b34ad..4391daada 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_storage.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_storage.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -568,7 +568,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_EnumerateStorageDirectory(SDL_Storage *stor
* Remove a file or an empty directory in a writable storage container.
*
* \param storage a storage container.
- * \param path the path of the directory to enumerate.
+ * \param path the path to remove from the filesystem.
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_surface.h b/Source/ThirdParty/SDL/SDL3/SDL_surface.h
index 717aeb89a..885f8f5d9 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_surface.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_surface.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_system.h b/Source/ThirdParty/SDL/SDL3/SDL_system.h
index 625db182e..ec23a1fe7 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_system.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_system.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -86,6 +86,8 @@ typedef bool (SDLCALL *SDL_WindowsMessageHook)(void *userdata, MSG *msg);
* \param callback the SDL_WindowsMessageHook function to call.
* \param userdata a pointer to pass to every iteration of `callback`.
*
+ * \threadsafety This function should only be called on the main thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_WindowsMessageHook
@@ -169,6 +171,8 @@ typedef bool (SDLCALL *SDL_X11EventHook)(void *userdata, XEvent *xevent);
* \param callback the SDL_X11EventHook function to call.
* \param userdata a pointer to pass to every iteration of `callback`.
*
+ * \threadsafety This function should only be called on the main thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC void SDLCALL SDL_SetX11EventHook(SDL_X11EventHook callback, void *userdata);
@@ -186,6 +190,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetX11EventHook(SDL_X11EventHook callback,
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_SetLinuxThreadPriority(Sint64 threadID, int priority);
@@ -202,6 +208,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetLinuxThreadPriority(Sint64 threadID, int
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_SetLinuxThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int schedPolicy);
@@ -264,6 +272,8 @@ typedef void (SDLCALL *SDL_iOSAnimationCallback)(void *userdata);
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety This function should only be called on the main thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_SetiOSEventPump
@@ -277,6 +287,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetiOSAnimationCallback(SDL_Window *window,
*
* \param enabled true to enable the event pump, false to disable it.
*
+ * \threadsafety This function should only be called on the main thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_SetiOSAnimationCallback
@@ -370,6 +382,8 @@ extern SDL_DECLSPEC void * SDLCALL SDL_GetAndroidActivity(void);
*
* \returns the Android API level.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void);
@@ -379,6 +393,8 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void);
*
* \returns true if this is a Chromebook, false otherwise.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_IsChromebook(void);
@@ -388,6 +404,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_IsChromebook(void);
*
* \returns true if this is a DeX docking station, false otherwise.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_IsDeXMode(void);
@@ -605,6 +623,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SendAndroidMessage(Uint32 command, int para
*
* \returns true if the device is a tablet, false otherwise.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_IsTablet(void);
@@ -616,6 +636,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_IsTablet(void);
*
* \returns true if the device is a TV, false otherwise.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_IsTV(void);
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_test.h b/Source/ThirdParty/SDL/SDL3/SDL_test.h
index 8b285807c..59a3dd846 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_test.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_test.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_test_assert.h b/Source/ThirdParty/SDL/SDL3/SDL_test_assert.h
index c067608a5..ff41b31b9 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_test_assert.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_test_assert.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_test_common.h b/Source/ThirdParty/SDL/SDL3/SDL_test_common.h
index 81cea7788..6afd85779 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_test_common.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_test_common.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_test_compare.h b/Source/ThirdParty/SDL/SDL3/SDL_test_compare.h
index 1903549c5..58e55134e 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_test_compare.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_test_compare.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_test_crc32.h b/Source/ThirdParty/SDL/SDL3/SDL_test_crc32.h
index 94fe1a345..f563d5dd2 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_test_crc32.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_test_crc32.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_test_font.h b/Source/ThirdParty/SDL/SDL3/SDL_test_font.h
index fb4079497..f5b567454 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_test_font.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_test_font.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_test_fuzzer.h b/Source/ThirdParty/SDL/SDL3/SDL_test_fuzzer.h
index caf11f252..e8ebc45c9 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_test_fuzzer.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_test_fuzzer.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_test_harness.h b/Source/ThirdParty/SDL/SDL3/SDL_test_harness.h
index 5d4963e77..37710455b 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_test_harness.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_test_harness.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_test_log.h b/Source/ThirdParty/SDL/SDL3/SDL_test_log.h
index 718baa5b7..13933da95 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_test_log.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_test_log.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_test_md5.h b/Source/ThirdParty/SDL/SDL3/SDL_test_md5.h
index e9d96398a..7b86b05f7 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_test_md5.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_test_md5.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_test_memory.h b/Source/ThirdParty/SDL/SDL3/SDL_test_memory.h
index 1bd946674..f07f1cba9 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_test_memory.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_test_memory.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_thread.h b/Source/ThirdParty/SDL/SDL3/SDL_thread.h
index bde1bbcd7..1842c035f 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_thread.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_thread.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -208,6 +208,8 @@ typedef int (SDLCALL *SDL_ThreadFunction) (void *data);
* new thread could not be created; call SDL_GetError() for more
* information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_CreateThreadWithProperties
@@ -274,6 +276,8 @@ extern SDL_DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread(SDL_ThreadFunction fn,
* new thread could not be created; call SDL_GetError() for more
* information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_CreateThread
@@ -329,6 +333,8 @@ extern SDL_DECLSPEC SDL_Thread * SDLCALL SDL_CreateThreadWithProperties(SDL_Prop
* new thread could not be created; call SDL_GetError() for more
* information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC SDL_Thread * SDLCALL SDL_CreateThreadRuntime(SDL_ThreadFunction fn, const char *name, void *data, SDL_FunctionPointer pfnBeginThread, SDL_FunctionPointer pfnEndThread);
@@ -343,6 +349,8 @@ extern SDL_DECLSPEC SDL_Thread * SDLCALL SDL_CreateThreadRuntime(SDL_ThreadFunct
* new thread could not be created; call SDL_GetError() for more
* information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC SDL_Thread * SDLCALL SDL_CreateThreadWithPropertiesRuntime(SDL_PropertiesID props, SDL_FunctionPointer pfnBeginThread, SDL_FunctionPointer pfnEndThread);
@@ -363,6 +371,8 @@ extern SDL_DECLSPEC SDL_Thread * SDLCALL SDL_CreateThreadWithPropertiesRuntime(S
* \returns a pointer to a UTF-8 string that names the specified thread, or
* NULL if it doesn't have a name.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC const char * SDLCALL SDL_GetThreadName(SDL_Thread *thread);
@@ -379,6 +389,8 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetThreadName(SDL_Thread *thread);
*
* \returns the ID of the current thread.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_GetThreadID
@@ -396,6 +408,8 @@ extern SDL_DECLSPEC SDL_ThreadID SDLCALL SDL_GetCurrentThreadID(void);
* \returns the ID of the specified thread, or the ID of the current thread if
* `thread` is NULL.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_GetCurrentThreadID
@@ -413,6 +427,8 @@ extern SDL_DECLSPEC SDL_ThreadID SDLCALL SDL_GetThreadID(SDL_Thread *thread);
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_SetCurrentThreadPriority(SDL_ThreadPriority priority);
@@ -445,6 +461,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetCurrentThreadPriority(SDL_ThreadPriority
* function by its 'return', or -1 if the thread has been
* detached or isn't valid, may be NULL.
*
+ * \threadsafety It is safe to call this function from any thread, but only a
+ * single thread can wait any specific thread to finish.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_CreateThread
@@ -459,6 +478,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread *thread, int *status)
* \returns the current state of a thread, or SDL_THREAD_UNKNOWN if the thread
* isn't valid.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_ThreadState
@@ -494,6 +515,8 @@ extern SDL_DECLSPEC SDL_ThreadState SDLCALL SDL_GetThreadState(SDL_Thread *threa
* \param thread the SDL_Thread pointer that was returned from the
* SDL_CreateThread() call that started this thread.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_CreateThread
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_time.h b/Source/ThirdParty/SDL/SDL3/SDL_time.h
index b6d3f6d0d..2ae6022f9 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_time.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_time.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
-Copyright (C) 1997-2025 Sam Lantinga
+Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -106,6 +106,8 @@ typedef enum SDL_TimeFormat
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety This function is not thread safe.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_GetDateTimeLocalePreferences(SDL_DateFormat *dateFormat, SDL_TimeFormat *timeFormat);
@@ -118,6 +120,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetDateTimeLocalePreferences(SDL_DateFormat
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_GetCurrentTime(SDL_Time *ticks);
@@ -134,6 +138,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetCurrentTime(SDL_Time *ticks);
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_TimeToDateTime(SDL_Time ticks, SDL_DateTime *dt, bool localTime);
@@ -149,6 +155,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_TimeToDateTime(SDL_Time ticks, SDL_DateTime
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_DateTimeToTime(const SDL_DateTime *dt, SDL_Time *ticks);
@@ -165,6 +173,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_DateTimeToTime(const SDL_DateTime *dt, SDL_
* \param dwHighDateTime a pointer filled in with the high portion of the
* Windows FILETIME value.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC void SDLCALL SDL_TimeToWindows(SDL_Time ticks, Uint32 *dwLowDateTime, Uint32 *dwHighDateTime);
@@ -180,6 +190,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_TimeToWindows(SDL_Time ticks, Uint32 *dwLow
* \param dwHighDateTime the high portion of the Windows FILETIME value.
* \returns the converted SDL time.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC SDL_Time SDLCALL SDL_TimeFromWindows(Uint32 dwLowDateTime, Uint32 dwHighDateTime);
@@ -192,6 +204,8 @@ extern SDL_DECLSPEC SDL_Time SDLCALL SDL_TimeFromWindows(Uint32 dwLowDateTime, U
* \returns the number of days in the requested month or -1 on failure; call
* SDL_GetError() for more information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC int SDLCALL SDL_GetDaysInMonth(int year, int month);
@@ -205,6 +219,8 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetDaysInMonth(int year, int month);
* \returns the day of year [0-365] if the date is valid or -1 on failure;
* call SDL_GetError() for more information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC int SDLCALL SDL_GetDayOfYear(int year, int month, int day);
@@ -218,6 +234,8 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetDayOfYear(int year, int month, int day);
* \returns a value between 0 and 6 (0 being Sunday) if the date is valid or
* -1 on failure; call SDL_GetError() for more information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC int SDLCALL SDL_GetDayOfWeek(int year, int month, int day);
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_timer.h b/Source/ThirdParty/SDL/SDL3/SDL_timer.h
index 490d13562..dfeec31f2 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_timer.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_timer.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_touch.h b/Source/ThirdParty/SDL/SDL3/SDL_touch.h
index 64845a156..e5576a5bc 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_touch.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_touch.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_tray.h b/Source/ThirdParty/SDL/SDL3/SDL_tray.h
index 1780b0ba5..688278a1d 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_tray.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_tray.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_version.h b/Source/ThirdParty/SDL/SDL3/SDL_version.h
index 3aa1605b6..12f157f8f 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_version.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_version.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -62,7 +62,7 @@ extern "C" {
*
* \since This macro is available since SDL 3.2.0.
*/
-#define SDL_MICRO_VERSION 0
+#define SDL_MICRO_VERSION 4
/**
* This macro turns the version numbers into a numeric value.
@@ -85,6 +85,8 @@ extern "C" {
*
* \param version the version number.
*
+ * \threadsafety It is safe to call this macro from any thread.
+ *
* \since This macro is available since SDL 3.2.0.
*/
#define SDL_VERSIONNUM_MAJOR(version) ((version) / 1000000)
@@ -96,6 +98,8 @@ extern "C" {
*
* \param version the version number.
*
+ * \threadsafety It is safe to call this macro from any thread.
+ *
* \since This macro is available since SDL 3.2.0.
*/
#define SDL_VERSIONNUM_MINOR(version) (((version) / 1000) % 1000)
@@ -107,6 +111,8 @@ extern "C" {
*
* \param version the version number.
*
+ * \threadsafety It is safe to call this macro from any thread.
+ *
* \since This macro is available since SDL 3.2.0.
*/
#define SDL_VERSIONNUM_MICRO(version) ((version) % 1000)
@@ -114,6 +120,8 @@ extern "C" {
/**
* This is the version number macro for the current SDL version.
*
+ * \threadsafety It is safe to call this macro from any thread.
+ *
* \since This macro is available since SDL 3.2.0.
*
* \sa SDL_GetVersion
@@ -124,6 +132,8 @@ extern "C" {
/**
* This macro will evaluate to true if compiled with SDL at least X.Y.Z.
*
+ * \threadsafety It is safe to call this macro from any thread.
+ *
* \since This macro is available since SDL 3.2.0.
*/
#define SDL_VERSION_ATLEAST(X, Y, Z) \
@@ -141,6 +151,8 @@ extern "C" {
*
* \returns the version of the linked library.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_GetRevision
@@ -168,6 +180,8 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetVersion(void);
* \returns an arbitrary string, uniquely identifying the exact revision of
* the SDL library in use.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_GetVersion
diff --git a/Source/ThirdParty/SDL/SDL3/SDL_video.h b/Source/ThirdParty/SDL/SDL3/SDL_video.h
index 31dac5f7a..2f062959f 100644
--- a/Source/ThirdParty/SDL/SDL3/SDL_video.h
+++ b/Source/ThirdParty/SDL/SDL3/SDL_video.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2025 Sam Lantinga
+ Copyright (C) 1997-2026 Sam Lantinga
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Source/Tools/Flax.Build/Deploy/Deployment.Editor.cs b/Source/Tools/Flax.Build/Deploy/Deployment.Editor.cs
index ef5f959c8..b3ff862bb 100644
--- a/Source/Tools/Flax.Build/Deploy/Deployment.Editor.cs
+++ b/Source/Tools/Flax.Build/Deploy/Deployment.Editor.cs
@@ -348,6 +348,7 @@ namespace Flax.Deploy
DeployFile(src, dst, "MoltenVK_icd.json");
DeployFiles(src, dst, "*.dll");
DeployFiles(src, dst, "*.dylib");
+ DeployFile(src, dst, "Logo.png");
// Optimize package size
Utilities.Run("strip", "FlaxEditor", null, dst, Utilities.RunOptions.None);
diff --git a/Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs b/Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs
index 7a16e7322..54fe19565 100644
--- a/Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs
+++ b/Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs
@@ -53,6 +53,7 @@ namespace Flax.Deps.Dependencies
"-DSDL_CAMERA=OFF",
"-DSDL_DIALOG=OFF",
"-DSDL_OFFSCREEN=OFF",
+ "-DSDL_TRAY=OFF",
"-DSDL_RENDER=OFF",
"-DSDL_RENDER_D3D=OFF",
@@ -88,7 +89,7 @@ namespace Flax.Deps.Dependencies
CloneGitRepo(root, "https://github.com/libsdl-org/SDL");
GitFetch(root);
- GitResetToCommit(root, "a962f40bbba175e9716557a25d5d7965f134a3d3"); // 3.4.0
+ GitResetToCommit(root, "5848e584a1b606de26e3dbd1c7e4ecbc34f807a6"); // 3.4.4
foreach (var platform in options.Platforms)
{