mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-16 08:27:10 +00:00
Make resized() lock platform-dependent
This commit is contained in:
@@ -24,12 +24,13 @@ struct DeferredWindowEvents : public IWindowCallback
|
||||
|
||||
bool m_hasResize = false;
|
||||
SWindowRect m_latestResize;
|
||||
void resized(const SWindowRect& rect)
|
||||
void resized(const SWindowRect& rect, bool sync)
|
||||
{
|
||||
std::unique_lock<std::mutex> lk(m_mt);
|
||||
m_latestResize = rect;
|
||||
m_hasResize = true;
|
||||
m_resizeCv.wait_for(lk, std::chrono::milliseconds(500));
|
||||
if (sync)
|
||||
m_resizeCv.wait_for(lk, std::chrono::milliseconds(500));
|
||||
}
|
||||
|
||||
struct Command
|
||||
|
||||
@@ -173,7 +173,7 @@ struct ITextInputCallback
|
||||
class IWindowCallback
|
||||
{
|
||||
public:
|
||||
virtual void resized(const SWindowRect& rect)
|
||||
virtual void resized(const SWindowRect& rect, bool sync)
|
||||
{(void)rect;}
|
||||
virtual void mouseDown(const SWindowCoord& coord, EMouseButton button, EModifierKey mods)
|
||||
{(void)coord;(void)button;(void)mods;}
|
||||
|
||||
Reference in New Issue
Block a user