From f9bffa31b6f1234fed431d7dacec9c825ff44478 Mon Sep 17 00:00:00 2001 From: anton-kl Date: Tue, 22 Oct 2024 07:35:08 +0100 Subject: [PATCH] docs: fix window flags in README-migration.md Use correct SDL macro instead of invalid "flags" string. Also add a comment about preferred approach. --- docs/README-migration.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/README-migration.md b/docs/README-migration.md index 0d45145322..0715181abc 100644 --- a/docs/README-migration.md +++ b/docs/README-migration.md @@ -2134,7 +2134,9 @@ SDL_CreateWindow() has been simplified and no longer takes a window position. Yo SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_Y_NUMBER, y); SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_WIDTH_NUMBER, width); SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_HEIGHT_NUMBER, height); - SDL_SetNumberProperty(props, "flags", flags); + // For window flags you should use separate window creation properties, + // but for easier migration from SDL2 you can use the following: + SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_FLAGS_NUMBER, flags); pWindow = SDL_CreateWindowWithProperties(props); SDL_DestroyProperties(props); if (window) {