mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-18 00:05:24 +00:00
blocking resize to keep OS in sync with boo buffers
This commit is contained in:
@@ -11,6 +11,7 @@ struct DeferredWindowEvents : public boo::IWindowCallback
|
||||
{
|
||||
Receiver& m_rec;
|
||||
std::mutex m_mt;
|
||||
std::condition_variable m_resizeCv;
|
||||
DeferredWindowEvents(Receiver& rec) : m_rec(rec) {}
|
||||
|
||||
bool m_destroyed = false;
|
||||
@@ -26,6 +27,7 @@ struct DeferredWindowEvents : public boo::IWindowCallback
|
||||
std::unique_lock<std::mutex> lk(m_mt);
|
||||
m_latestResize = rect;
|
||||
m_hasResize = true;
|
||||
m_resizeCv.wait_for(lk, std::chrono::milliseconds(500));
|
||||
}
|
||||
|
||||
struct Command
|
||||
|
||||
Reference in New Issue
Block a user