Skip to content

Commit

Permalink
Implement getting UIKit framebuffer on SDL3
Browse files Browse the repository at this point in the history
  • Loading branch information
Susko3 committed Dec 20, 2024
1 parent beb2fa2 commit 35b5cf9
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions osu.Framework/Platform/SDL3/SDL3GraphicsSurface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,10 @@ private IntPtr getProcAddress(string symbol)
if (window.SDLWindowHandle == null)
return null;

// TODO: Migrate to SDL3 when https://github.com/libsdl-org/SDL/issues/9430 is resolved
// var wmInfo = window.GetWindowSystemInformation();
//
// switch (wmInfo.subsystem)
// {
// case SDL_SYSWM_TYPE.SDL_SYSWM_UIKIT:
// return (int)wmInfo.info.uikit.framebuffer;
// }
var props = SDL_GetWindowProperties(window.SDLWindowHandle);

if (SDL_HasProperty(props, SDL_PROP_WINDOW_UIKIT_OPENGL_FRAMEBUFFER_NUMBER))
return (int)SDL_GetNumberProperty(props, SDL_PROP_WINDOW_UIKIT_OPENGL_FRAMEBUFFER_NUMBER, 0);

return null;
}
Expand Down

0 comments on commit 35b5cf9

Please sign in to comment.