From b048386a1db750c24267f404e06b2f9bcb614cf2 Mon Sep 17 00:00:00 2001 From: pjht Date: Thu, 29 Feb 2024 08:16:08 -0600 Subject: [PATCH] Use relative paths to load textures and sounds --- src/audio.rs | 8 ++++---- src/frontpanel.rs | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/audio.rs b/src/audio.rs index 61f1063..194106a 100644 --- a/src/audio.rs +++ b/src/audio.rs @@ -76,28 +76,28 @@ impl AudioThread { let fan_startup = { let mut fan_startup = Wav::default(); fan_startup - .load("/home/pjht/projects/altair_emu/resources/fan1.wav") + .load("resources/fan1.wav") .unwrap(); fan_startup }; let fan_loop = { let mut fan_loop = Wav::default(); fan_loop - .load("/home/pjht/projects/altair_emu/resources/fan2.wav") + .load("resources/fan2.wav") .unwrap(); fan_loop }; let fan_shutdown = { let mut fan_shutdown = Wav::default(); fan_shutdown - .load("/home/pjht/projects/altair_emu/resources/fan3.wav") + .load("resources/fan3.wav") .unwrap(); fan_shutdown }; let sw_click = { let mut sw_click = Wav::default(); sw_click - .load("/home/pjht/projects/altair_emu/resources/click2.wav") + .load("resources/click2.wav") .unwrap(); sw_click }; diff --git a/src/frontpanel.rs b/src/frontpanel.rs index 1a4e65f..19ab429 100644 --- a/src/frontpanel.rs +++ b/src/frontpanel.rs @@ -236,37 +236,37 @@ impl Textures { fp: Self::load_texture( ctx, "fp", - "/home/pjht/projects/altair_emu/resources/altair800.png", + "resources/altair800.png", ) .unwrap(), sw_up: Self::load_texture( ctx, "sw_up", - "/home/pjht/projects/altair_emu/resources/Togup.png", + "resources/Togup.png", ) .unwrap(), sw_neut: Self::load_texture( ctx, "sw_neut", - "/home/pjht/projects/altair_emu/resources/Togneut.png", + "resources/Togneut.png", ) .unwrap(), sw_down: Self::load_texture( ctx, "sw_down", - "/home/pjht/projects/altair_emu/resources/Togdown.png", + "resources/Togdown.png", ) .unwrap(), led_off: Self::load_texture( ctx, "led_off", - "/home/pjht/projects/altair_emu/resources/Led_off.png", + "resources/Led_off.png", ) .unwrap(), led_on: Self::load_texture( ctx, "led_on", - "/home/pjht/projects/altair_emu/resources/Led_on.png", + "resources/Led_on.png", ) .unwrap(), }