从 int 到 SDL_RendererFlip 的无效转换

Invalid conversion from int to SDL_RendererFlip

我正在尝试水平和垂直翻转图像。虽然它似乎没有用:

SDL_RenderCopyEx(renderer, ResourceManager::GetInstance().getTexture("rpg_pack"), &wood_corner, &rect, 0, 0, SDL_FLIP_HORIZONTAL | SDL_FLIP_VERTICAL);

我是 运行 SDL、图像、混音器、ttf 和网络。

尝试

SDL_RendererFlip flip = (SDL_RendererFlip)(SDL_FLIP_HORIZONTAL | SDL_FLIP_VERTICAL); 

SDL_RenderCopyEx(renderer, ResourceManager::GetInstance().getTexture("rpg_pack"), &wood_corner, &rect, 0, 0, flip);