Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/elfmz/far2l.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelfmz <fenix1905@tut.by>2022-09-17 18:29:29 +0300
committerelfmz <fenix1905@tut.by>2022-09-17 18:29:29 +0300
commitb2c68d2f87e96d5bd42517cacccb3002db0cdfd3 (patch)
tree963a7087727c9bbad88a1c4b043f7e8ba294882c /far2l/src/console
parent9b15d1da51ca8b701d464ef32caaa6c52b8a2b0e (diff)
GUI: stop cursor blink and some other timer-related things after 30 seconds of no IO activity to save CPU time
Diffstat (limited to 'far2l/src/console')
-rw-r--r--far2l/src/console/keyboard.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/far2l/src/console/keyboard.cpp b/far2l/src/console/keyboard.cpp
index 9acb1109..3b398280 100644
--- a/far2l/src/console/keyboard.cpp
+++ b/far2l/src/console/keyboard.cpp
@@ -60,7 +60,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "console.hpp"
#include "palette.hpp"
#include "xlat.hpp"
-#include "InterThreadCall.hpp"
/* start Глобальные переменные */
@@ -474,6 +473,8 @@ DWORD IsMouseButtonPressed()
{
GetInputRecord(&rec);
}
+ // IsMouseButtonPressed used within loops, so lets sleep to avoid CPU hogging in that loops
+ // it would be nicer to sleep inside of that loops instead, but keep to original code for now
WINPORT(WaitConsoleInput)(10);
return MouseButtonState;
}