docs: fix window flags in README-migration.md

Use correct SDL macro instead of invalid "flags" string.
Also add a comment about preferred approach.
This commit is contained in:
anton-kl
2024-10-22 07:35:08 +01:00
committed by Sam Lantinga
parent b0982e8982
commit f9bffa31b6

View File

@@ -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) {