Skip to content

Commit

Permalink
Merge pull request #6468 from Susko3/uikit-framebuffer-sdl3
Browse files Browse the repository at this point in the history
Implement getting OpenGL iOS main framebuffer on SDL3
  • Loading branch information
frenzibyte authored Dec 21, 2024
2 parents beb2fa2 + 35b5cf9 commit 1022955
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 1022955

Please sign in to comment.