summaryrefslogtreecommitdiff
path: root/src/kernel/window.c
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-06-21 17:47:13 -0400
committerBenji Dial <benji6283@gmail.com>2021-06-21 17:47:13 -0400
commitf57e2eabe0a10c9732c83532e01654a499fb8dcf (patch)
treecbf91a23fcdd65e0ea7ed55b0940ca7042d59bef /src/kernel/window.c
parent83835306d57461205a7bcfef9f4c3e06bc504006 (diff)
downloadportland-os-f57e2eabe0a10c9732c83532e01654a499fb8dcf.tar.gz
many, many changes; settings is broken
Diffstat (limited to 'src/kernel/window.c')
-rw-r--r--src/kernel/window.c12
1 files changed, 9 insertions, 3 deletions
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;
}