Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to latest SDL3-CS friendly overload and null-terminated UTF8 conversion #6245

Merged
merged 5 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions osu.Framework/Platform/SDL/SDL3Clipboard.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using System.Text;
using SDL;
using SixLabors.ImageSharp;

Expand All @@ -14,7 +13,7 @@
// assume that empty text means no text.
public override string? GetText() => SDL3.SDL_HasClipboardText() == SDL_bool.SDL_TRUE ? SDL3.SDL_GetClipboardText() : null;

public override void SetText(string text) => SDL3.SDL_SetClipboardText(Encoding.UTF8.GetBytes(text));
public override void SetText(string text) => SDL3.SDL_SetClipboardText(text);

Check failure on line 16 in osu.Framework/Platform/SDL/SDL3Clipboard.cs

View workflow job for this annotation

GitHub Actions / Test (macOS, macos-latest, Debug, MultiThreaded)

Argument 1: cannot convert from 'string' to 'byte*'

Check failure on line 16 in osu.Framework/Platform/SDL/SDL3Clipboard.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, Debug, MultiThreaded)

Argument 1: cannot convert from 'string' to 'byte*'

public override Image<TPixel>? GetImage<TPixel>()
{
Expand Down
3 changes: 1 addition & 2 deletions osu.Framework/Platform/SDL/SDL3GraphicsSurface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using osuTK.Graphics;
using osuTK.Graphics.ES30;
using SDL;
Expand Down Expand Up @@ -141,7 +140,7 @@
// Prevent logging calls to SDL_GL_GetProcAddress() that fail on systems which don't have the requested symbol (typically macOS).
SDL3.SDL_LogSetPriority(error_category, SDL_LogPriority.SDL_LOG_PRIORITY_INFO);

IntPtr ret = SDL3.SDL_GL_GetProcAddress(Encoding.UTF8.GetBytes(symbol));
IntPtr ret = SDL3.SDL_GL_GetProcAddress(symbol);

Check failure on line 143 in osu.Framework/Platform/SDL/SDL3GraphicsSurface.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Debug, MultiThreaded)

Argument 1: cannot convert from 'string' to 'byte*'

Check failure on line 143 in osu.Framework/Platform/SDL/SDL3GraphicsSurface.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Release, SingleThread)

Argument 1: cannot convert from 'string' to 'byte*'

Check failure on line 143 in osu.Framework/Platform/SDL/SDL3GraphicsSurface.cs

View workflow job for this annotation

GitHub Actions / Code Quality

Argument 1: cannot convert from 'string' to 'byte*'

Check failure on line 143 in osu.Framework/Platform/SDL/SDL3GraphicsSurface.cs

View workflow job for this annotation

GitHub Actions / Test (macOS, macos-latest, Debug, MultiThreaded)

Argument 1: cannot convert from 'string' to 'byte*'

Check failure on line 143 in osu.Framework/Platform/SDL/SDL3GraphicsSurface.cs

View workflow job for this annotation

GitHub Actions / Test (macOS, macos-latest, Debug, SingleThread)

Argument 1: cannot convert from 'string' to 'byte*'

Check failure on line 143 in osu.Framework/Platform/SDL/SDL3GraphicsSurface.cs

View workflow job for this annotation

GitHub Actions / Build only (Android)

Argument 1: cannot convert from 'string' to 'byte*'

Check failure on line 143 in osu.Framework/Platform/SDL/SDL3GraphicsSurface.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, Debug, SingleThread)

Argument 1: cannot convert from 'string' to 'byte*'

Check failure on line 143 in osu.Framework/Platform/SDL/SDL3GraphicsSurface.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, Debug, MultiThreaded)

Argument 1: cannot convert from 'string' to 'byte*'

// Reset the logging behaviour.
SDL3.SDL_LogSetPriority(error_category, oldPriority);
Expand Down
18 changes: 8 additions & 10 deletions osu.Framework/Platform/SDL3Window.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Configuration;
Expand Down Expand Up @@ -70,7 +69,7 @@
set
{
title = value;
ScheduleCommand(() => SDL3.SDL_SetWindowTitle(SDLWindowHandle, Encoding.UTF8.GetBytes(title)));
ScheduleCommand(() => SDL3.SDL_SetWindowTitle(SDLWindowHandle, title));

Check failure on line 72 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Debug, MultiThreaded)

Argument 2: cannot convert from 'string' to 'byte*'

Check failure on line 72 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Release, SingleThread)

Argument 2: cannot convert from 'string' to 'byte*'

Check failure on line 72 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Code Quality

Argument 2: cannot convert from 'string' to 'byte*'

Check failure on line 72 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Release, MultiThreaded)

Argument 2: cannot convert from 'string' to 'byte*'

Check failure on line 72 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Debug, SingleThread)

Argument 2: cannot convert from 'string' to 'byte*'

Check failure on line 72 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (macOS, macos-latest, Debug, MultiThreaded)

Argument 2: cannot convert from 'string' to 'byte*'

Check failure on line 72 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Build only (iOS)

Argument 2: cannot convert from 'string' to 'byte*'

Check failure on line 72 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (macOS, macos-latest, Debug, SingleThread)

Argument 2: cannot convert from 'string' to 'byte*'

Check failure on line 72 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Build only (Android)

Argument 2: cannot convert from 'string' to 'byte*'

Check failure on line 72 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, Debug, SingleThread)

Argument 2: cannot convert from 'string' to 'byte*'

Check failure on line 72 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, Debug, MultiThreaded)

Argument 2: cannot convert from 'string' to 'byte*'
}
}

Expand Down Expand Up @@ -202,7 +201,7 @@
// so we deactivate it on startup.
SDL3.SDL_StopTextInput();

SDLWindowHandle = SDL3.SDL_CreateWindow(Encoding.UTF8.GetBytes(title), Size.Width, Size.Height, flags);
SDLWindowHandle = SDL3.SDL_CreateWindow(title, Size.Width, Size.Height, flags);

Check failure on line 204 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Debug, MultiThreaded)

Argument 1: cannot convert from 'string' to 'byte*'

Check failure on line 204 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Release, SingleThread)

Argument 1: cannot convert from 'string' to 'byte*'

Check failure on line 204 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Code Quality

Argument 1: cannot convert from 'string' to 'byte*'

Check failure on line 204 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Release, MultiThreaded)

Argument 1: cannot convert from 'string' to 'byte*'

Check failure on line 204 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Debug, SingleThread)

Argument 1: cannot convert from 'string' to 'byte*'

Check failure on line 204 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (macOS, macos-latest, Debug, MultiThreaded)

Argument 1: cannot convert from 'string' to 'byte*'

Check failure on line 204 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Build only (iOS)

Argument 1: cannot convert from 'string' to 'byte*'

Check failure on line 204 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (macOS, macos-latest, Debug, SingleThread)

Argument 1: cannot convert from 'string' to 'byte*'

Check failure on line 204 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Build only (Android)

Argument 1: cannot convert from 'string' to 'byte*'

Check failure on line 204 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, Debug, SingleThread)

Argument 1: cannot convert from 'string' to 'byte*'

Check failure on line 204 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, Debug, MultiThreaded)

Argument 1: cannot convert from 'string' to 'byte*'

if (SDLWindowHandle == null)
throw new InvalidOperationException($"Failed to create SDL window. SDL Error: {SDL3.SDL_GetError()}");
Expand Down Expand Up @@ -275,7 +274,7 @@
/// </remarks>
protected virtual void HandleEventFromFilter(SDL_Event evt)
{
switch (evt.type)
switch (evt.Type)

Check failure on line 277 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Debug, MultiThreaded)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 277 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Release, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 277 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Code Quality

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 277 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Release, MultiThreaded)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 277 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Debug, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 277 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (macOS, macos-latest, Debug, MultiThreaded)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 277 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Build only (iOS)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 277 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (macOS, macos-latest, Debug, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 277 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Build only (Android)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 277 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, Debug, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 277 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, Debug, MultiThreaded)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)
{
case SDL_EventType.SDL_EVENT_TERMINATING:
handleQuitEvent(evt.quit);
Expand All @@ -297,7 +296,7 @@

protected void HandleEventFromWatch(SDL_Event evt)
{
switch (evt.type)
switch (evt.Type)

Check failure on line 299 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Debug, MultiThreaded)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 299 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Release, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 299 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Code Quality

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 299 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Release, MultiThreaded)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 299 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Debug, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 299 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (macOS, macos-latest, Debug, MultiThreaded)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 299 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Build only (iOS)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 299 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (macOS, macos-latest, Debug, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 299 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Build only (Android)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 299 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, Debug, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 299 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, Debug, MultiThreaded)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)
{
case SDL_EventType.SDL_EVENT_WINDOW_RESIZED:
// polling via SDL_PollEvent blocks on resizes (https://stackoverflow.com/a/50858339)
Expand Down Expand Up @@ -450,8 +449,7 @@

do
{
fixed (SDL_Event* buf = events)
eventsRead = SDL3.SDL_PeepEvents(buf, events_per_peep, SDL_eventaction.SDL_GETEVENT, SDL_EventType.SDL_EVENT_FIRST, SDL_EventType.SDL_EVENT_LAST);
eventsRead = SDL3.SDL_PeepEvents(events, SDL_eventaction.SDL_GETEVENT, SDL_EventType.SDL_EVENT_FIRST, SDL_EventType.SDL_EVENT_LAST);

Check failure on line 452 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Debug, MultiThreaded)

There is no argument given that corresponds to the required parameter 'maxType' of 'SDL3.SDL_PeepEvents(SDL_Event*, int, SDL_eventaction, SDL_EventType, SDL_EventType)'

Check failure on line 452 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Release, SingleThread)

There is no argument given that corresponds to the required parameter 'maxType' of 'SDL3.SDL_PeepEvents(SDL_Event*, int, SDL_eventaction, SDL_EventType, SDL_EventType)'

Check failure on line 452 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Code Quality

There is no argument given that corresponds to the required parameter 'maxType' of 'SDL3.SDL_PeepEvents(SDL_Event*, int, SDL_eventaction, SDL_EventType, SDL_EventType)'

Check failure on line 452 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Release, MultiThreaded)

There is no argument given that corresponds to the required parameter 'maxType' of 'SDL3.SDL_PeepEvents(SDL_Event*, int, SDL_eventaction, SDL_EventType, SDL_EventType)'

Check failure on line 452 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Debug, SingleThread)

There is no argument given that corresponds to the required parameter 'maxType' of 'SDL3.SDL_PeepEvents(SDL_Event*, int, SDL_eventaction, SDL_EventType, SDL_EventType)'

Check failure on line 452 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (macOS, macos-latest, Debug, MultiThreaded)

There is no argument given that corresponds to the required parameter 'maxType' of 'SDL3.SDL_PeepEvents(SDL_Event*, int, SDL_eventaction, SDL_EventType, SDL_EventType)'

Check failure on line 452 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Build only (iOS)

There is no argument given that corresponds to the required parameter 'maxType' of 'SDL3.SDL_PeepEvents(SDL_Event*, int, SDL_eventaction, SDL_EventType, SDL_EventType)'

Check failure on line 452 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (macOS, macos-latest, Debug, SingleThread)

There is no argument given that corresponds to the required parameter 'maxType' of 'SDL3.SDL_PeepEvents(SDL_Event*, int, SDL_eventaction, SDL_EventType, SDL_EventType)'

Check failure on line 452 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Build only (Android)

There is no argument given that corresponds to the required parameter 'maxType' of 'SDL3.SDL_PeepEvents(SDL_Event*, int, SDL_eventaction, SDL_EventType, SDL_EventType)'

Check failure on line 452 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, Debug, SingleThread)

There is no argument given that corresponds to the required parameter 'maxType' of 'SDL3.SDL_PeepEvents(SDL_Event*, int, SDL_eventaction, SDL_EventType, SDL_EventType)'

Check failure on line 452 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, Debug, MultiThreaded)

There is no argument given that corresponds to the required parameter 'maxType' of 'SDL3.SDL_PeepEvents(SDL_Event*, int, SDL_eventaction, SDL_EventType, SDL_EventType)'
for (int i = 0; i < eventsRead; i++)
HandleEvent(events[i]);
} while (eventsRead == events_per_peep);
Expand All @@ -462,19 +460,19 @@
/// </summary>
protected virtual void HandleEvent(SDL_Event e)
{
if (e.type >= SDL_EventType.SDL_EVENT_DISPLAY_FIRST && e.type <= SDL_EventType.SDL_EVENT_DISPLAY_LAST)
if (e.Type >= SDL_EventType.SDL_EVENT_DISPLAY_FIRST && e.Type <= SDL_EventType.SDL_EVENT_DISPLAY_LAST)

Check failure on line 463 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Debug, MultiThreaded)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 463 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Debug, MultiThreaded)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 463 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Release, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 463 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Release, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 463 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Code Quality

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 463 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Code Quality

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 463 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Release, MultiThreaded)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 463 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Release, MultiThreaded)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 463 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Debug, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 463 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Debug, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 463 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (macOS, macos-latest, Debug, MultiThreaded)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 463 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (macOS, macos-latest, Debug, MultiThreaded)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 463 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Build only (iOS)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 463 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Build only (iOS)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 463 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (macOS, macos-latest, Debug, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 463 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (macOS, macos-latest, Debug, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 463 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Build only (Android)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 463 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Build only (Android)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 463 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, Debug, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 463 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, Debug, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 463 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, Debug, MultiThreaded)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 463 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, Debug, MultiThreaded)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)
{
handleDisplayEvent(e.display);
return;
}

if (e.type >= SDL_EventType.SDL_EVENT_WINDOW_FIRST && e.type <= SDL_EventType.SDL_EVENT_WINDOW_LAST)
if (e.Type >= SDL_EventType.SDL_EVENT_WINDOW_FIRST && e.Type <= SDL_EventType.SDL_EVENT_WINDOW_LAST)

Check failure on line 469 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Debug, MultiThreaded)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 469 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Release, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 469 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Code Quality

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 469 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Release, MultiThreaded)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 469 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Release, MultiThreaded)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 469 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Debug, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 469 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Debug, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 469 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Build only (iOS)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 469 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Build only (iOS)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 469 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (macOS, macos-latest, Debug, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 469 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Build only (Android)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 469 in osu.Framework/Platform/SDL3Window.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, Debug, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)
{
handleWindowEvent(e.window);
return;
}

switch (e.type)
switch (e.Type)
{
case SDL_EventType.SDL_EVENT_QUIT:
handleQuitEvent(e.quit);
Expand Down
2 changes: 1 addition & 1 deletion osu.Framework/Platform/Windows/WindowsWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@

protected override void HandleEventFromFilter(SDL_Event evt)
{
switch (evt.type)
switch (evt.Type)

Check failure on line 96 in osu.Framework/Platform/Windows/WindowsWindow.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Debug, MultiThreaded)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 96 in osu.Framework/Platform/Windows/WindowsWindow.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Release, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 96 in osu.Framework/Platform/Windows/WindowsWindow.cs

View workflow job for this annotation

GitHub Actions / Code Quality

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 96 in osu.Framework/Platform/Windows/WindowsWindow.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Release, MultiThreaded)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 96 in osu.Framework/Platform/Windows/WindowsWindow.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, Debug, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 96 in osu.Framework/Platform/Windows/WindowsWindow.cs

View workflow job for this annotation

GitHub Actions / Test (macOS, macos-latest, Debug, MultiThreaded)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 96 in osu.Framework/Platform/Windows/WindowsWindow.cs

View workflow job for this annotation

GitHub Actions / Build only (iOS)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 96 in osu.Framework/Platform/Windows/WindowsWindow.cs

View workflow job for this annotation

GitHub Actions / Test (macOS, macos-latest, Debug, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 96 in osu.Framework/Platform/Windows/WindowsWindow.cs

View workflow job for this annotation

GitHub Actions / Build only (Android)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 96 in osu.Framework/Platform/Windows/WindowsWindow.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, Debug, SingleThread)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 96 in osu.Framework/Platform/Windows/WindowsWindow.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, Debug, MultiThreaded)

'SDL_Event' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'SDL_Event' could be found (are you missing a using directive or an assembly reference?)
{
case SDL_EventType.SDL_EVENT_WINDOW_FOCUS_LOST:
warpCursorFromFocusLoss();
Expand Down
Loading