Skip to content

Commit

Permalink
fix windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Lochlan Wansbrough committed Oct 9, 2024
1 parent 860ee52 commit 68063ab
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions crates/rune/src/runtime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ use winit::{
error::EventLoopError,
event::{Event, WindowEvent},
event_loop::{ControlFlow, EventLoop, EventLoopBuilder},
platform::macos::WindowBuilderExtMacOS,
raw_window_handle::{HasDisplayHandle, HasWindowHandle},
window::{Window, WindowBuilder},
};

#[cfg(target_os = "macos")]
use winit::platform::macos::WindowBuilderExtMacOS;

use crate::{game::Game, wgpu_id_2};

enum GameEvent {}
Expand Down Expand Up @@ -229,11 +231,13 @@ pub fn run(input_path: PathBuf, binary: Vec<u8>) {
.build()
.unwrap();

let window = WindowBuilder::new()
.with_title("Game")
.with_titlebar_hidden(true)
.build(&event_loop)
.unwrap();
let window_builder = WindowBuilder::new()
.with_title("Game");

#[cfg(target_os = "macos")]
let window_builder = window_builder.with_titlebar_hidden(true);

let window = window_builder.build(&event_loop).unwrap();

// #[cfg(not(target_arch = "wasm32"))]
// {
Expand Down

0 comments on commit 68063ab

Please sign in to comment.