mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-13 06:38:34 +02:00
[opengl] Fix SwapBuffers warning when window is not exposed (#3429)
This fixes an annoying warning when opening any game using OpenGL. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3429 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: Lizzie <lizzie@eden-emu.dev> Co-authored-by: MaranBr <maranbr@outlook.com> Co-committed-by: MaranBr <maranbr@outlook.com>
This commit is contained in:
parent
2b7b44c3e4
commit
b2b73ecb62
1 changed files with 8 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
@ -193,6 +193,13 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwapBuffers() override {
|
void SwapBuffers() override {
|
||||||
|
if (auto window = dynamic_cast<QWindow*>(surface)) {
|
||||||
|
if (!window->isExposed()) {
|
||||||
|
LOG_DEBUG(Frontend, "SwapBuffers ignored: window not exposed");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
context->swapBuffers(surface);
|
context->swapBuffers(surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue