Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setting for Godots low processor usage mode #1056

Merged
merged 3 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Autoload/Global.gd
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,10 @@ var fps_limit := 0:
## Found in Preferences. Affects the per_pixel_transparency project setting.
## If [code]true[/code], it allows for the window to be transparent.
## This affects performance, so keep it [code]false[/code] if you don't need it.
var update_continuously := false:
set(value):
update_continuously = value
OS.low_processor_usage_mode = !value
var window_transparency := false:
set(value):
if value == window_transparency:
Expand Down
6 changes: 6 additions & 0 deletions src/Preferences/PreferencesDialog.gd
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,12 @@ var preferences: Array[Preference] = [
"button_pressed",
true
),
Preference.new(
"update_continuously",
"Performance/PerformanceContainer/UpdateContinuously",
"button_pressed",
false
),
Preference.new(
"window_transparency",
"Performance/PerformanceContainer/WindowTransparency",
Expand Down
13 changes: 13 additions & 0 deletions src/Preferences/PreferencesDialog.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,19 @@ mouse_default_cursor_shape = 2
button_pressed = true
text = "On"

[node name="UpdateContinuouslyLabel" type="Label" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Performance/PerformanceContainer"]
layout_mode = 2
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."
mouse_filter = 0
text = "Update Continuously"

[node name="UpdateContinuously" type="CheckBox" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Performance/PerformanceContainer"]
layout_mode = 2
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."
mouse_default_cursor_shape = 2
button_pressed = true
text = "On"

[node name="WindowTransparencyLabel" type="Label" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Performance/PerformanceContainer"]
layout_mode = 2
tooltip_text = "If enabled, the application window can become transparent. This affects performance, so keep it off if you don't need it."
Expand Down
Loading