mirror of
https://github.com/Oibaf66/uae-wii.git
synced 2024-11-15 07:15:09 +01:00
More readble code for hardfile patch
This commit is contained in:
parent
bb717201a4
commit
98ef6ae924
@ -490,7 +490,11 @@ static void dup_mountinfo (const struct uaedev_mount_info *mip, struct uaedev_mo
|
|||||||
if (uip->rootdir)
|
if (uip->rootdir)
|
||||||
uip->rootdir = my_strdup (uip->rootdir);
|
uip->rootdir = my_strdup (uip->rootdir);
|
||||||
if (uip->hf.handle)
|
if (uip->hf.handle)
|
||||||
|
#ifdef GEKKO //work arround for the lack of dup function
|
||||||
|
hdf_open (&uip->hf, uip->hf.path);
|
||||||
|
#else
|
||||||
hdf_dup (&uip->hf, &uip->hf);
|
hdf_dup (&uip->hf, &uip->hf);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -513,17 +517,6 @@ struct hardfiledata *get_hardfile_data (int nr)
|
|||||||
return &uip[nr].hf;
|
return &uip[nr].hf;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void reopen_hdfile (struct uaedev_mount_info *mip)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < mip->num_units; i++) {
|
|
||||||
UnitInfo *uip = mip->ui + i;
|
|
||||||
if (uip->hf.handle)
|
|
||||||
hdf_open (&uip->hf, uip->hf.path);
|
|
||||||
//hdf_open (&uip->hf, "/uae/harddisks/hardfile.hdf");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* minimal AmigaDOS definitions */
|
/* minimal AmigaDOS definitions */
|
||||||
|
|
||||||
@ -3731,7 +3724,6 @@ void filesys_start_threads (void)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
free_mountinfo (¤t_mountinfo);
|
free_mountinfo (¤t_mountinfo);
|
||||||
reopen_hdfile (&options_mountinfo);
|
|
||||||
dup_mountinfo (&options_mountinfo, ¤t_mountinfo);
|
dup_mountinfo (&options_mountinfo, ¤t_mountinfo);
|
||||||
|
|
||||||
uip = current_mountinfo.ui;
|
uip = current_mountinfo.ui;
|
||||||
|
Loading…
Reference in New Issue
Block a user