Update fundamental and Rack

This commit is contained in:
falkTX 2022-01-01 16:22:17 +00:00
parent 87b46a938e
commit d5d2d5befc
4 changed files with 38 additions and 80 deletions

View file

@ -143,6 +143,7 @@ struct Window::Internal {
std::map<std::string, std::shared_ptr<ImageWithOriginalContext>> imageCache;
bool fbDirtyOnSubpixelChange = true;
int fbCount = 0;
Internal()
: hiddenApp(false),
@ -343,6 +344,7 @@ void Window::step() {
double lastFrameTime = internal->frameTime;
internal->frameTime = frameTime;
internal->lastFrameDuration = frameTime - lastFrameTime;
internal->fbCount = 0;
// DEBUG("%.2lf Hz", 1.0 / internal->lastFrameDuration);
// Make event handlers and step() have a clean NanoVG context
@ -515,6 +517,11 @@ bool& Window::fbDirtyOnSubpixelChange() {
}
int& Window::fbCount() {
return internal->fbCount;
}
} // namespace window
} // namespace rack