Skip to content

Commit

Permalink
Do not query idle state unnecessarily
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosfrm committed Nov 18, 2023
1 parent 50a5fd3 commit 85af152
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fah/client/OS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "OS.h"

#include <fah/client/App.h>
#include <fah/client/Config.h>

#if defined(_WIN32)
#include "win/WinOSImpl.h"
Expand Down Expand Up @@ -90,7 +91,7 @@ void OS::togglePause() const {


void OS::update() {
if (isSystemIdle() != idle) {
if (app.getConfig().getOnIdle() && isSystemIdle() != idle) {
idle = !idle;
app.triggerUpdate();
}
Expand Down

0 comments on commit 85af152

Please sign in to comment.