File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -24,12 +24,13 @@ var _user_profile := UserProfiles.get_profile()
2424
2525
2626func _init () -> void :
27- OS .low_processor_usage_mode = true
28- # TODO: Update whenever https://github.com/godotengine/godot/issues/117875 is fixed
27+ # TODO: Remove feature guard whenever https://github.com/godotengine/godot/issues/117875 is fixed
2928 # also consider using Engine.max_fps instead when it's fixed
30- OS .low_processor_usage_mode_sleep_usec = 1
31- _update_framerate (_user_profile .framerate_limit )
32- _user_profile .framerate_limit_changed .connect (_update_framerate )
29+ if not OS .has_feature ("Web" ):
30+ OS .low_processor_usage_mode = true
31+ OS .low_processor_usage_mode_sleep_usec = 20000
32+ _update_framerate (_user_profile .framerate_limit )
33+ _user_profile .framerate_limit_changed .connect (_update_framerate )
3334
3435
3536func _ready () -> void :
@@ -161,6 +162,5 @@ func _update_welcome_button() -> void:
161162func _update_framerate (new_framerate : int ) -> void :
162163 if new_framerate == 0 :
163164 new_framerate = 1000
164- # TODO: Update whenever https://github.com/godotengine/godot/issues/117875 is fixed
165- # also consider using Engine.max_fps instead when it's fixed
166- # OS.low_processor_usage_mode_sleep_usec = 1_000_000 / new_framerate
165+ # TODO: Consider using Engine.max_fps instead
166+ OS .low_processor_usage_mode_sleep_usec = 1_000_000 / new_framerate
Original file line number Diff line number Diff line change 77[sub_resource type ="StyleBoxEmpty" id ="1" ]
88
99[node name ="GameView" type ="PanelContainer" unique_id =911031022 node_paths =PackedStringArray ("_viewport_container" , "_pause_rect" )]
10- visible = false
1110offset_left = 12.0
1211offset_top = 12.0
1312offset_right = 585.0
@@ -20,11 +19,12 @@ _pause_rect = NodePath("PauseRect")
2019
2120[node name ="SubViewportContainer" type ="SubViewportContainer" parent ="." unique_id =324934379 ]
2221process_mode = 1
23- custom_minimum_size = Vector2 (100 , 0 )
22+ custom_minimum_size = Vector2 (100 , 100 )
2423layout_mode = 2
2524stretch = true
2625
2726[node name ="PauseRect" type ="ColorRect" parent ="." unique_id =11987188 ]
27+ visible = false
2828layout_mode = 2
2929color = Color (0.0352941 , 0.0392157 , 0.129412 , 0.309804 )
3030
You can’t perform that action at this time.
0 commit comments