fix(libSceVideoOut): read the window size after a flip on the main thread on macOS

This commit is contained in:
Emanuele committed 2026-10-26 12:07:59 +01:00
1 parent 30cc4ea2e6
commit b05ca4e4bf
1 file changed
+1 -1
@@ -740,7 +740,7 @@ void VideoOutDriver::presentLoop(std::stop_token token, std::promise<void>& star
processFlip(*current);
int windowWidth = 0;
int windowHeight = 0;
if (window.Handle() != nullptr) SDL_GetWindowSize(window.Handle(), &windowWidth, &windowHeight);
if (window.Handle() != nullptr) OnMainThread([&] { SDL_GetWindowSize(window.Handle(), &windowWidth, &windowHeight); });
if (windowWidth > 0 && windowHeight > 0) {
const auto presented = AgcDriver::ComputeContainSize_nid_postfix(current->width, current->height, static_cast<std::uint32_t>(windowWidth), static_cast<std::uint32_t>(windowHeight), true);
mouseInput->SetPresentation(current->width, current->height, presented.width, presented.height);