mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-15 03:20:30 +00:00
Replace SDL2 with SDL3 in comments / string literals
This commit is contained in:
@@ -44,7 +44,7 @@ namespace osu.Framework.Tests.Visual.Platform
|
||||
|
||||
WindowMode startingMode = getWindowModeForState(startingState);
|
||||
|
||||
// this shouldn't be necessary, but SDL2DesktopWindow doesn't set the config WindowMode when changing the WindowState only.
|
||||
// this shouldn't be necessary, but SDL3DesktopWindow doesn't set the config WindowMode when changing the WindowState only.
|
||||
AddStep($"switch to {startingMode}", () => window.WindowMode.Value = startingMode);
|
||||
|
||||
AddStep($"switch to {startingState}", () => window.WindowState = startingState);
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace osu.Framework.Extensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Temporary extension functions for bridging between osuTK, System.Drawing, and System.Numerics
|
||||
/// Can be removed when the SDL2 migration is complete.
|
||||
/// Can be removed when the SDL3 migration is complete.
|
||||
/// </summary>
|
||||
public static class BridgingExtensions
|
||||
{
|
||||
|
||||
@@ -732,7 +732,7 @@ namespace osu.Framework.Platform
|
||||
|
||||
ChooseAndSetupRenderer();
|
||||
|
||||
// Window creation may fail in the case of a catastrophic failure (ie. graphics driver or SDL2 level).
|
||||
// Window creation may fail in the case of a catastrophic failure (ie. graphics driver or SDL3 level).
|
||||
// In such cases, we want to throw here to immediately mark this renderer setup as failed.
|
||||
if (RequireWindowExists && Window == null)
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace osu.Framework.Platform.Linux
|
||||
|
||||
foreach (var h in handlers.OfType<MouseHandler>())
|
||||
{
|
||||
// There are several bugs we need to fix with Linux / SDL2 cursor handling before switching this on.
|
||||
// There are several bugs we need to fix with Linux / SDL3 cursor handling before switching this on.
|
||||
h.UseRelativeMode.Value = false;
|
||||
h.UseRelativeMode.Default = false;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace osu.Framework.Platform.MacOS
|
||||
|
||||
foreach (var h in handlers.OfType<MouseHandler>())
|
||||
{
|
||||
// There are several bugs we need to fix with macOS / SDL2 cursor handling before switching this on.
|
||||
// There are several bugs we need to fix with macOS / SDL3 cursor handling before switching this on.
|
||||
h.UseRelativeMode.Value = false;
|
||||
h.UseRelativeMode.Default = false;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ namespace osu.Framework.Platform
|
||||
/// osuTK's reference to the current <see cref="DisplayResolution"/> instance is private.
|
||||
/// Instead we construct a <see cref="DisplayMode"/> based on the metrics of <see cref="CurrentDisplayBindable"/>,
|
||||
/// as it defers to the current resolution. Note that we round the refresh rate, as osuTK can sometimes
|
||||
/// report refresh rates such as 59.992863 where SDL2 will report 60.
|
||||
/// report refresh rates such as 59.992863 where SDL3 will report 60.
|
||||
/// </summary>
|
||||
public virtual IBindable<DisplayMode> CurrentDisplayMode
|
||||
{
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace osu.Framework.Platform.SDL
|
||||
context = SDL3.SDL_GL_CreateContext(window.SDLWindowHandle);
|
||||
|
||||
if (context == IntPtr.Zero)
|
||||
throw new InvalidOperationException($"Failed to create an SDL2 GL context ({SDL3.SDL_GetError()})");
|
||||
throw new InvalidOperationException($"Failed to create an SDL3 GL context ({SDL3.SDL_GetError()})");
|
||||
|
||||
SDL3.SDL_GL_MakeCurrent(window.SDLWindowHandle, context);
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ namespace osu.Framework.Platform
|
||||
SDL3.SDL_SetHint(SDL3.SDL_HINT_TOUCH_MOUSE_EVENTS, "0"u8); // disable touch events generating synthetic mouse events on desktop platforms
|
||||
SDL3.SDL_SetHint(SDL3.SDL_HINT_MOUSE_TOUCH_EVENTS, "0"u8); // disable mouse events generating synthetic touch events on mobile platforms
|
||||
|
||||
// we want text input to only be active when SDL2DesktopWindowTextInput is active.
|
||||
// we want text input to only be active when SDL3DesktopWindowTextInput is active.
|
||||
// SDL activates it by default on some platforms: https://github.com/libsdl-org/SDL/blob/release-2.0.16/src/video/SDL_video.c#L573-L582
|
||||
// so we deactivate it on startup.
|
||||
SDL3.SDL_StopTextInput();
|
||||
@@ -271,7 +271,7 @@ namespace osu.Framework.Platform
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// As per SDL's recommendation, application events should always be handled via the event filter.
|
||||
/// See: https://wiki.libsdl.org/SDL2/SDL_EventType#android_ios_and_winrt_events
|
||||
/// See: https://wiki.libsdl.org/SDL3/SDL_EventType#android_ios_and_winrt_events
|
||||
/// </remarks>
|
||||
protected virtual void HandleEventFromFilter(SDL_Event evt)
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace osu.Framework.Platform
|
||||
private bool relativeMouseMode;
|
||||
|
||||
/// <summary>
|
||||
/// Set the state of SDL2's RelativeMouseMode (https://wiki.libsdl.org/SDL_SetRelativeMouseMode).
|
||||
/// Set the state of SDL3's RelativeMouseMode (https://wiki.libsdl.org/SDL_SetRelativeMouseMode).
|
||||
/// On all platforms, this will lock the mouse to the window (although escaping by setting <see cref="ConfineMouseMode"/> is still possible via a local implementation).
|
||||
/// On windows, this will use raw input if available.
|
||||
/// </summary>
|
||||
|
||||
@@ -8,7 +8,7 @@ using osuTK;
|
||||
namespace osu.Framework.Platform.Windows
|
||||
{
|
||||
/// <summary>
|
||||
/// A windows specific mouse input handler which overrides the SDL2 implementation of raw input.
|
||||
/// A windows specific mouse input handler which overrides the SDL3 implementation of raw input.
|
||||
/// This is done to better handle quirks of some devices.
|
||||
/// </summary>
|
||||
[SupportedOSPlatform("windows")]
|
||||
|
||||
Reference in New Issue
Block a user