mirror of
https://github.com/csd4ni3l/music-player.git
synced 2026-01-01 20:23:42 +01:00
fix download text having whitespace, fix display mode None crashing, and removed files and folders crashing
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
from arcade.gui.widgets.buttons import UITextureButton
|
||||
import copy, pypresence, json
|
||||
|
||||
import arcade, arcade.gui
|
||||
@@ -163,7 +162,10 @@ class Settings(arcade.gui.UIView):
|
||||
if self.settings_dict['vsync']:
|
||||
self.window.set_vsync(True)
|
||||
display_mode = self.window.display.get_default_screen().get_mode()
|
||||
refresh_rate = display_mode.rate
|
||||
if display_mode:
|
||||
refresh_rate = display_mode.rate
|
||||
else:
|
||||
refresh_rate = 60
|
||||
self.window.set_update_rate(1 / refresh_rate)
|
||||
self.window.set_draw_rate(1 / refresh_rate)
|
||||
|
||||
@@ -218,7 +220,6 @@ class Settings(arcade.gui.UIView):
|
||||
file.write(json.dumps(self.settings_dict, indent=4))
|
||||
|
||||
def update(self, setting=None, button_state=None, setting_type="bool"):
|
||||
setting_dict = settings[self.current_category][setting]
|
||||
config_key = settings[self.current_category][setting]["config_key"]
|
||||
|
||||
if setting_type == "option":
|
||||
|
||||
Reference in New Issue
Block a user