mirror of
https://github.com/csd4ni3l/shatterstack.git
synced 2026-01-01 04:23:48 +01:00
Add controller support
This commit is contained in:
5
run.py
5
run.py
@@ -7,7 +7,8 @@ import logging, datetime, os, json, sys, arcade
|
||||
from utils.utils import get_closest_resolution, print_debug_info, on_exception
|
||||
from utils.constants import log_dir, menu_background_color
|
||||
from menus.main import Main
|
||||
from utils.preload import theme_sound # type: ignore # needed for preload
|
||||
from utils.preload import theme_sound # needed for preload
|
||||
from arcade.experimental.controller_window import ControllerWindow
|
||||
|
||||
sys.excepthook = on_exception
|
||||
|
||||
@@ -72,7 +73,7 @@ else:
|
||||
if settings.get("music", True):
|
||||
theme_sound.play(volume=settings.get("music_volume", 50) / 100, loop=True)
|
||||
|
||||
window = arcade.Window(width=resolution[0], height=resolution[1], title='ShatterStack', samples=antialiasing, antialiasing=antialiasing > 0, fullscreen=fullscreen, vsync=vsync, resizable=False, style=style)
|
||||
window = ControllerWindow(width=resolution[0], height=resolution[1], title='ShatterStack', samples=antialiasing, antialiasing=antialiasing > 0, fullscreen=fullscreen, vsync=vsync, resizable=False, style=style)
|
||||
|
||||
if vsync:
|
||||
window.set_vsync(True)
|
||||
|
||||
Reference in New Issue
Block a user