fix
This commit is contained in:
@@ -93,5 +93,5 @@ void WindowControl::nextFrame(bool waitForRefresh) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
window.swapBuffers();
|
window.swapBuffers();
|
||||||
input.pollEvents(waitForRefresh);
|
input.pollEvents(waitForRefresh && !window.checkShouldRefresh());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -382,11 +382,11 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void setShouldRefresh() override {
|
void setShouldRefresh() override {
|
||||||
shouldRefresh = 2;
|
shouldRefresh = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool checkShouldRefresh() override {
|
bool checkShouldRefresh() override {
|
||||||
if ((--shouldRefresh) == 0) {
|
if (shouldRefresh) {
|
||||||
shouldRefresh = false;
|
shouldRefresh = false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -573,7 +573,7 @@ private:
|
|||||||
double prevSwap = 0.0;
|
double prevSwap = 0.0;
|
||||||
int posX = 0;
|
int posX = 0;
|
||||||
int posY = 0;
|
int posY = 0;
|
||||||
int shouldRefresh = 1;
|
bool shouldRefresh = true;
|
||||||
};
|
};
|
||||||
static_assert(!std::is_abstract<GLFWWindow>());
|
static_assert(!std::is_abstract<GLFWWindow>());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user