mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 19:50:12 +01:00
minor crash fix
This commit is contained in:
@@ -56,6 +56,7 @@ def main():
|
||||
global_data.config = get_config()
|
||||
screen_width: int = global_data.config["video"]["screen_width"]
|
||||
screen_height: int = global_data.config["video"]["screen_height"]
|
||||
'''
|
||||
render_width, render_height = ray.get_render_width(), ray.get_render_height()
|
||||
dpi_scale = ray.get_window_scale_dpi()
|
||||
if dpi_scale.x == 0:
|
||||
@@ -63,11 +64,13 @@ def main():
|
||||
dpi_scale = screen_width, screen_height
|
||||
else:
|
||||
dpi_scale = int(render_width/dpi_scale.x), int(render_height/dpi_scale.y)
|
||||
'''
|
||||
|
||||
if global_data.config["video"]["vsync"]:
|
||||
ray.set_config_flags(ray.ConfigFlags.FLAG_VSYNC_HINT)
|
||||
ray.set_config_flags(ray.ConfigFlags.FLAG_MSAA_4X_HINT)
|
||||
ray.set_trace_log_level(ray.TraceLogLevel.LOG_ERROR)
|
||||
ray.hide_cursor()
|
||||
ray.set_trace_log_level(ray.TraceLogLevel.LOG_WARNING)
|
||||
|
||||
ray.init_window(screen_width, screen_height, "PyTaiko")
|
||||
if global_data.config["video"]["borderless"]:
|
||||
|
||||
@@ -116,7 +116,7 @@ class MoveAnimation(BaseAnimation):
|
||||
self.attribute = self.start_position + (self.total_distance * progress)
|
||||
|
||||
class TextureChangeAnimation(BaseAnimation):
|
||||
def __init__(self, duration: float, textures: list[tuple[float, float, int]], delay: float):
|
||||
def __init__(self, duration: float, textures: list[tuple[float, float, int]], delay: float = 0.0):
|
||||
super().__init__(duration)
|
||||
self.textures = textures
|
||||
self.delay = delay
|
||||
|
||||
Reference in New Issue
Block a user