SDL3 的 SDL_SetWindowModalFor() 在 Windows 上失败并显示“不支持该操作”?

问题描述 投票:0回答:1

这是要测试的最少代码:

SDL_Window* parent = SDL_CreateWindow("Parent", 800, 600, SDL_WINDOW_RESIZABLE);
if (parent)
{
    SDL_Window* child = SDL_CreateWindow("child", 150, 200, 0);
    if (child)
    {
        int returnValue = SDL_SetWindowModalFor(child, parent);
        if (returnValue < 0)
        {
            SDL_Log(SDL_GetError());
        }
    }
}

SDL_GetError() 返回:

不支持该操作。

我正在 Windows 11 上的 Visual Studio 2022 中使用 SDL2 进行编码,然后测试最新版本的 SDL3。

有谁知道问题是来自 Windows 还是已经在任何地方被问过?

编辑 SDL2 和 SDL3 都会发生这种情况。

c++ windows sdl
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.