Use relative paths to load textures and sounds

This commit is contained in:
pjht 2024-02-29 08:16:08 -06:00
parent 63096025bd
commit b048386a1d
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E
2 changed files with 10 additions and 10 deletions

View File

@ -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
};

View File

@ -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(),
}