From f57e2eabe0a10c9732c83532e01654a499fb8dcf Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Mon, 21 Jun 2021 17:47:13 -0400 Subject: many, many changes; settings is broken --- src/kernel/window.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/kernel/window.c') diff --git a/src/kernel/window.c b/src/kernel/window.c index 69babe4..9398420 100644 --- a/src/kernel/window.c +++ b/src/kernel/window.c @@ -409,7 +409,7 @@ struct window_action next_window_action(struct window *w) { return *action; } -#define RUN_COMMAND_FILE "sys/winspace.rc" +#define RUN_COMMAND_FILE "/sys/winspace.rc" enum wm_action { WM_MOVE_LEFT, @@ -462,7 +462,10 @@ void init_win() { mouse_y = (VBE_MODE_INFO->height - MOUSE_HEIGHT) / 2; blit_mouse(); - const file_id_t fid = drives->get_file(drives, RUN_COMMAND_FILE); + const struct drive *d; + const char *f; + map_path(RUN_COMMAND_FILE, &d, &f); + const file_id_t fid = drives->get_file(d, f); if (!fid) PANIC("Couldn't open " RUN_COMMAND_FILE "."); @@ -519,8 +522,11 @@ void on_action(struct window_action packet) { paint_all(); } break; + const struct drive *d; + const char *f; case WM_RUN_COMMAND: - if (!try_elf_run(drives, run_command, run_command_pass, 0)) + map_path(run_command, &d, &f); + if (!try_elf_run(d, f, run_command_pass, 0)) logf(LOG_ERROR, "Couldn't run program listed in " RUN_COMMAND_FILE "."); break; } -- cgit v1.2.3