mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-04-14 14:32:27 +09:00
Reduce cpu usage when ui is not visible
This commit is contained in:
@@ -279,20 +279,20 @@ namespace gsr {
|
||||
process_key_bindings(event);
|
||||
}
|
||||
|
||||
void Overlay::draw() {
|
||||
bool Overlay::draw() {
|
||||
update_notification_process_status();
|
||||
update_gsr_process_status();
|
||||
|
||||
if(!visible)
|
||||
return;
|
||||
return false;
|
||||
|
||||
if(page_stack.empty()) {
|
||||
hide();
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!window)
|
||||
return;
|
||||
return false;
|
||||
|
||||
window->clear();
|
||||
|
||||
@@ -312,6 +312,8 @@ namespace gsr {
|
||||
page_stack.draw(*window, mgl::vec2f(0.0f, 0.0f));
|
||||
|
||||
window->display();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Overlay::show() {
|
||||
|
||||
Reference in New Issue
Block a user