Skip to content

Commit f27d152

Browse files
authored
Add setting for Godots low processor usage mode (#1056)
* Add setting for Godots low processor usage mode * Update name and description of low processor usage mode setting in preferences * Fix a tiny mistake
1 parent 7d30aed commit f27d152

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

src/Autoload/Global.gd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,10 @@ var fps_limit := 0:
475475
## Found in Preferences. Affects the per_pixel_transparency project setting.
476476
## If [code]true[/code], it allows for the window to be transparent.
477477
## This affects performance, so keep it [code]false[/code] if you don't need it.
478+
var update_continuously := false:
479+
set(value):
480+
update_continuously = value
481+
OS.low_processor_usage_mode = !value
478482
var window_transparency := false:
479483
set(value):
480484
if value == window_transparency:

src/Preferences/PreferencesDialog.gd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,12 @@ var preferences: Array[Preference] = [
175175
"button_pressed",
176176
true
177177
),
178+
Preference.new(
179+
"update_continuously",
180+
"Performance/PerformanceContainer/UpdateContinuously",
181+
"button_pressed",
182+
false
183+
),
178184
Preference.new(
179185
"window_transparency",
180186
"Performance/PerformanceContainer/WindowTransparency",

src/Preferences/PreferencesDialog.tscn

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,19 @@ mouse_default_cursor_shape = 2
10581058
button_pressed = true
10591059
text = "On"
10601060

1061+
[node name="UpdateContinuouslyLabel" type="Label" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Performance/PerformanceContainer"]
1062+
layout_mode = 2
1063+
tooltip_text = "If this is toggled on, the application will redraw the screen continuously, even while it's not used. Turning this off helps lower CPU and GPU usage when idle."
1064+
mouse_filter = 0
1065+
text = "Update Continuously"
1066+
1067+
[node name="UpdateContinuously" type="CheckBox" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Performance/PerformanceContainer"]
1068+
layout_mode = 2
1069+
tooltip_text = "If this is toggled on, the application will redraw the screen continuously, even while it's not used. Turning this off helps lower CPU and GPU usage when idle."
1070+
mouse_default_cursor_shape = 2
1071+
button_pressed = true
1072+
text = "On"
1073+
10611074
[node name="WindowTransparencyLabel" type="Label" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Performance/PerformanceContainer"]
10621075
layout_mode = 2
10631076
tooltip_text = "If enabled, the application window can become transparent. This affects performance, so keep it off if you don't need it."

0 commit comments

Comments
 (0)