Skip to content

Commit

Permalink
Strip the utility flag when creating popup windows
Browse files Browse the repository at this point in the history
UE5 sets the SDL_WINDOW_UTILITY flags on popup windows, which SDL3 does not allow, causing popup window creation to fail. Strip the flag as it is unnecessary.
  • Loading branch information
Kontrabant committed Mar 28, 2024
1 parent 1713b3c commit 465007e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sdl2_compat.c
Expand Up @@ -6158,6 +6158,9 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
}

if (parent) {
/* UE5 mixes the utility flag with popup flags, which SDL3 does not allow. */
flags &= ~SDL_WINDOW_UTILITY;

window = SDL3_CreatePopupWindow(parent, x, y, w, h, flags);
SDL_SetWindowData(window, PROP_WINDOW_PARENT_POINTER, parent);
}
Expand Down

0 comments on commit 465007e

Please sign in to comment.