diff options
| author | Freya Murphy <freya@freyacat.org> | 2025-11-17 10:02:56 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2025-11-17 10:28:44 -0500 |
| commit | baae7dbc38ad4e131c107d9f0f638530ac250e2e (patch) | |
| tree | cb6c6dbab81424999617eef09885e798ee2c21c9 /graphics | |
| parent | Feedback and grade for Checkpoint (diff) | |
| download | DungeonCrawl-baae7dbc38ad4e131c107d9f0f638530ac250e2e.tar.gz DungeonCrawl-baae7dbc38ad4e131c107d9f0f638530ac250e2e.tar.bz2 DungeonCrawl-baae7dbc38ad4e131c107d9f0f638530ac250e2e.zip | |
wasm support!
Diffstat (limited to 'graphics')
| -rw-r--r-- | graphics/src/audio.rs | 2 | ||||
| -rw-r--r-- | graphics/src/render.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/graphics/src/audio.rs b/graphics/src/audio.rs index 3a20f62..981defb 100644 --- a/graphics/src/audio.rs +++ b/graphics/src/audio.rs @@ -4,7 +4,7 @@ use raylib::audio::RaylibAudio; macro_rules! load_audio { ($handle:expr, $filepath:expr) => { - if cfg!(feature = "static") { + if cfg!(any(feature = "static", target_arch = "wasm32")) { let bytes = include_bytes!(concat!("../../", $filepath)); let wave = $handle.new_wave_from_memory(".ogg", bytes)?; $handle.new_sound_from_wave(&wave)? diff --git a/graphics/src/render.rs b/graphics/src/render.rs index cbeb613..1c10f57 100644 --- a/graphics/src/render.rs +++ b/graphics/src/render.rs @@ -58,7 +58,7 @@ macro_rules! draw_text { macro_rules! load_texture { ($handle:expr, $thread:expr, $filepath:expr) => { - if cfg!(feature = "static") { + if cfg!(any(feature = "static", target_arch = "wasm32")) { let bytes = include_bytes!(concat!("../../", $filepath)); let image = ::raylib::texture::Image::load_image_from_mem(".bmp", bytes)?; $handle.load_texture_from_image($thread, &image)? |