hecrj / coffee

An opinionated 2D game engine for Rust
https://docs.rs/coffee
MIT License
1.08k stars 55 forks source link

interface 'wl_output' has no event 4 #145

Closed ghost closed 1 year ago

ghost commented 1 year ago

Error on Hyprland.

interface 'wl_output' has no event 4
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 0, kind: Uncategorized, message: "Success" }', /home/mutex/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.2/src/platform_impl/linux/wayland/event_loop.rs:405:10
stack backtrace:
   0: rust_begin_unwind
             at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_fmt
             at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/panicking.rs:64:14
   2: core::result::unwrap_failed
             at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/result.rs:1791:5
   3: core::result::Result<T,E>::unwrap
             at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/result.rs:1113:23
   4: winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::new
             at /home/mutex/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.2/src/platform_impl/linux/wayland/event_loop.rs:337:19
   5: winit::platform_impl::platform::EventLoop<T>::new_wayland_any_thread
             at /home/mutex/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.2/src/platform_impl/linux/mod.rs:579:9
   6: winit::platform_impl::platform::EventLoop<T>::new_any_thread
             at /home/mutex/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.2/src/platform_impl/linux/mod.rs:555:33
   7: winit::platform_impl::platform::EventLoop<T>::new
             at /home/mutex/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.2/src/platform_impl/linux/mod.rs:533:9
   8: winit::event_loop::EventLoop<T>::with_user_event
             at /home/mutex/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.2/src/event_loop.rs:129:25
   9: winit::event_loop::EventLoop<()>::new
             at /home/mutex/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.2/src/event_loop.rs:115:9
  10: coffee::game::loop::Loop::run
             at /home/mutex/.cargo/registry/src/github.com-1ecc6299db9ec823/coffee-0.4.1/src/game/loop.rs:40:26
  11: coffee::game::Game::run
             at /home/mutex/.cargo/registry/src/github.com-1ecc6299db9ec823/coffee-0.4.1/src/game.rs:186:9
  12: amino::main
             at ./src/main.rs:6:5
  13: core::ops::function::FnOnce::call_once
             at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/ops/function.rs:507:5
use coffee::graphics::{Color, Frame, Window, WindowSettings};
use coffee::load::Task;
use coffee::{Game, Result, Timer};

fn main() -> Result<()> {
    MyGame::run(WindowSettings {
        title: String::from("A caffeinated game"),
        size: (1280, 1024),
        resizable: true,
        fullscreen: false,
        maximized: false,
    })
}

struct MyGame {
    // Your game state and assets go here...
}

impl Game for MyGame {
    type Input = (); // No input data
    type LoadingScreen = (); // No loading screen

    fn load(_window: &Window) -> Task<MyGame> {
        // Load your game assets here. Check out the `load` module!
        Task::succeed(|| MyGame { /* ... */ })
    }

    fn draw(&mut self, frame: &mut Frame, _timer: &Timer) {
        // Clear the current frame
        frame.clear(Color::BLACK);

        // Draw your game here. Check out the `graphics` module!
    }
}
ghost commented 1 year ago

Maybe related? https://github.com/electron/electron/issues/32487

ghost commented 1 year ago

Didn't notice the project was dead.