refactor: reduce idle frame count to 1
This commit is contained in:
parent
29f31f122c
commit
184755a06f
1 changed files with 3 additions and 1 deletions
|
@ -60,6 +60,8 @@ sigwinch_signal: ?tp.signal = null,
|
|||
no_sleep: bool = false,
|
||||
mods: ModState = .{},
|
||||
|
||||
const idle_frames = 1;
|
||||
|
||||
const ModState = struct {
|
||||
ctrl: bool = false,
|
||||
shift: bool = false,
|
||||
|
@ -342,7 +344,7 @@ fn render(self: *Self, current_time: i64) void {
|
|||
else
|
||||
self.idle_frame_count + 1;
|
||||
|
||||
if (more or self.idle_frame_count < 5 or self.no_sleep) {
|
||||
if (more or self.idle_frame_count < idle_frames or self.no_sleep) {
|
||||
self.unrendered_input_events_count = 0;
|
||||
if (!self.frame_clock_running) {
|
||||
self.frame_clock.start() catch {};
|
||||
|
|
Loading…
Add table
Reference in a new issue