Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
markusmoenig committed Jan 15, 2024
1 parent 001617d commit 5dbe0bb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions creator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ image_rs = { version = "0.24.8", package = "image" }
name = "Eldiron"
identifier = "com.moenig.eldiron"
icon = ["../build/Eldiron.icns"]
resources = ["../assets", "../game", "../resources"]
copyright = "Copyright (c) Markus Moenig 2023. All rights reserved."
resources = []
copyright = "Copyright (c) Markus Moenig 2024. All rights reserved."
category = "Game"
short_description = "A game creator for retro RPGs."
long_description = """
Expand Down
15 changes: 8 additions & 7 deletions creator/src/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,16 @@ impl TheTrait for Editor {

#[cfg(not(target_os = "macos"))]
fn window_icon(&self) -> Option<(Vec<u8>, u32, u32)> {
let image =
image_rs::load_from_memory(include_bytes!("../../build/windows/Eldiron.ico")).unwrap();
if let Some(image) = image_rs::load_from_memory(include_bytes!("../../build/windows/Eldiron.ico")) {
let image = image.into_rgba8();

let image = image.into_rgba8();
let (width, height) = image.dimensions();

let (width, height) = image.dimensions();

let icon = (image.into_raw(), width, height);
Some(icon)
let icon = (image.into_raw(), width, height);
Some(icon)
} else {
None
}
}

fn init_ui(&mut self, ui: &mut TheUI, ctx: &mut TheContext) {
Expand Down

0 comments on commit 5dbe0bb

Please sign in to comment.