diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 34726e5..dda40c3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -34,9 +34,9 @@ jobs: - name: Build the site run: | - wget https://github.com/electronstudio/pygbag-raylib/releases/download/v5.5.0.0/raylib-5.5.0.0-cp310-abi3-wasm32_bi_emscripten.whl - unzip raylib-5.5.0.0-cp310-abi3-wasm32_bi_emscripten.whl - rm raylib-5.5.0.0-cp310-abi3-wasm32_bi_emscripten.whl + wget https://github.com/electronstudio/pygbag-raylib/releases/download/v5.5.0.1/raylib-5.5.0.1-cp310-abi3-wasm32_bi_emscripten.whl + unzip raylib-5.5.0.1-cp310-abi3-wasm32_bi_emscripten.whl + rm raylib-5.5.0.1-cp310-abi3-wasm32_bi_emscripten.whl python3 -m pygbag --build --PYBUILD 3.12 --ume_block 0 --template noctx.tmpl --git main.py - name: Upload artifact diff --git a/main.py b/main.py index bbdb54d..b0e6fff 100644 --- a/main.py +++ b/main.py @@ -26,6 +26,8 @@ def init_gloom_shader() -> Shader: icon = load_image(os.path.join(os.path.dirname(__file__), "icon.png")) def setup_window(): init_window(SCREEN_WIDTH, SCREEN_HEIGHT, "Tempest Raylib") + if platform.system() == "Emscripten": + platform.window.window_resize() set_window_icon(icon) set_target_fps(TARGET_FPS) @@ -96,8 +98,7 @@ async def main(): # Engine setup setup_window() - if platform.system() != "Emscripten": # audio does not work on current version of emscripten - init_audio_device() + init_audio_device() sound_volume = 0.7 sound_manager = SoundManager(sound_volume) @@ -111,7 +112,7 @@ async def main(): # Main game loop while not window_should_close(): - if is_key_pressed(KeyboardKey.KEY_F) or get_touch_point_count()>0 and not renderer.fullscreen: + if is_key_pressed(KeyboardKey.KEY_F): renderer.toggle_fullscreen() # Update game game.update_frame()