The nvr directory is now automatically created if it does not exist.
This commit is contained in:
@@ -107,6 +107,8 @@ extern int find_status_bar_part(int tag);
|
||||
extern void cdrom_close(uint8_t id);
|
||||
extern void update_tip(int meaning);
|
||||
|
||||
extern BOOL DirectoryExists(LPCTSTR szPath);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
11
src/config.c
11
src/config.c
@@ -835,6 +835,7 @@ static void loadconfig_machine(void)
|
||||
{
|
||||
char *cat = "Machine";
|
||||
wchar_t *wp;
|
||||
wchar_t last;
|
||||
char *p;
|
||||
|
||||
p = config_get_string(cat, "model", NULL);
|
||||
@@ -883,6 +884,16 @@ static void loadconfig_machine(void)
|
||||
|
||||
path_len = wcslen(nvr_path);
|
||||
|
||||
#ifndef __unix
|
||||
last = nvr_path[wcslen(nvr_path) - 1];
|
||||
nvr_path[wcslen(nvr_path) - 1] = 0;
|
||||
if (!DirectoryExists(nvr_path))
|
||||
{
|
||||
CreateDirectory(nvr_path, NULL);
|
||||
}
|
||||
nvr_path[wcslen(nvr_path)] = last;
|
||||
#endif
|
||||
|
||||
cpu_use_dynarec = !!config_get_int(cat, "cpu_use_dynarec", 0);
|
||||
|
||||
enable_external_fpu = !!config_get_int(cat, "cpu_enable_fpu", 0);
|
||||
|
||||
Reference in New Issue
Block a user