[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] GEM=ROM default directory
Hello.
We have noticed that when using GEM=ROM, FreeMiNT sets the default directory
to u:\ before running the ROM AES.
This is unnatural for such ROM software, and has adverse effects:
1) On both TOS 4.04 and EmuTOS, this prevents the ROM AES to load the
accessories (they are searched in u:\*.acc).
2) On EmuTOS, it also sets the AES clipboard to U:\CLIPBRD. Helmut
discovered that it caused a later crash when XaAES calls the underlying
appl_init() to determine if the physical workstation needs to be opened or not.
Here is a kernel patch which sets the default directory to the boot drive.
It only affects GEM=ROM, so I believe that it can't cause trouble.
Please commit, in both the trunk and 1.18.
sysdrv.patch
Default to the boot drive when using GEM=ROM. Contributed by Vincent Riviere.
--
Vincent Rivière
diff -aurN -x CVS freemint.orig/sys/init.c freemint/sys/init.c
--- freemint.orig/sys/init.c 2013-02-07 23:04:14.718750000 +0100
+++ freemint/sys/init.c 2013-02-07 22:59:51.250000000 +0100
@@ -1065,8 +1065,11 @@
stop_and_ask();
}
- /* we default to U:\ before starting init */
- sys_d_setdrv('u' - 'a');
+ /* If we are starting the GEM, default to the boot drive,
+ * so it can properly load the accessories.
+ * Otherwise, default to U:\ before starting INIT.
+ */
+ sys_d_setdrv(init_is_gem ? sysdrv : 'u' - 'a');
sys_d_setpath("/");
stop_and_ask();