}
struct ConfigStruct {
- TCHAR Name[MAX_DPATH];
+ TCHAR Name[MAX_PATH];
TCHAR Path[MAX_DPATH];
TCHAR Fullpath[MAX_DPATH];
TCHAR HostLink[MAX_DPATH];
int Type, Directory;
struct ConfigStruct *Parent, *Child;
int host, hardware;
+ bool expanded;
HTREEITEM item;
FILETIME t;
};
}
regsetstr(NULL, configregfolder[type], config_folder);
regsetstr(NULL, configregsearch[type], config_search);
+ int idx = 0;
+ int exp = 1;
+ UAEREG *fkey = NULL;
+ while (idx < configstoresize) {
+ config = configstore[idx];
+ if (config->Directory && config->expanded) {
+ if (!fkey) {
+ fkey = regcreatetree(NULL, _T("ConfigurationListView"));
+ }
+ if (fkey) {
+ TCHAR tmp[100];
+ _stprintf(tmp, _T("Expanded%03d"), exp++);
+ regsetstr(fkey, tmp, config->Path);
+ }
+ }
+ idx++;
+ }
+ if (fkey) {
+ while (exp < 1000) {
+ TCHAR tmp[100];
+ _stprintf(tmp, _T("Expanded%03d"), exp++);
+ if (!regexists(fkey, tmp)) {
+ break;
+ }
+ regdelete(fkey, tmp);
+ }
+ }
+ regclosetree(fkey);
}
static void ConfigToRegistry2(DWORD ct, int type, DWORD noauto)
{
if (config2)
config = config2;
}
+
+ if (regexiststree(NULL, _T("ConfigurationListView"))) {
+ UAEREG *fkey = regcreatetree(NULL, _T("ConfigurationListView"));
+ if (fkey) {
+ int exp = 1;
+ while (exp < 1000) {
+ TCHAR tmp[100];
+ TCHAR name[MAX_DPATH];
+ _stprintf(tmp, _T("Expanded%03d"), exp++);
+ if (!regexists(fkey, tmp)) {
+ break;
+ }
+ int size = sizeof(name) / sizeof(TCHAR);
+ if (regquerystr(fkey, tmp, name, &size)) {
+ int idx = 0;
+ while (idx < configstoresize) {
+ struct ConfigStruct *config2 = configstore[idx];
+ if (config2->Directory) {
+ if (!_tcscmp(name, config2->Path)) {
+ TreeView_Expand(lv, config2->item, TVE_EXPAND);
+ config2->expanded = true;
+ break;
+ }
+ }
+ idx++;
+ }
+ }
+ }
+ regclosetree(fkey);
+ }
+ }
+
config = fixloadconfig (hDlg, config);
SetWindowRedraw(lv, TRUE);
return TRUE;
}
break;
+ case TVN_ITEMEXPANDED:
+ {
+ LPNMTREEVIEW tv = (LPNMTREEVIEW)lParam;
+ struct ConfigStruct *c = (struct ConfigStruct*)tv->itemNew.lParam;
+ if (tv->action == TVE_EXPAND) {
+ c->expanded = true;
+ } else if (tv->action == TVE_COLLAPSE) {
+ c->expanded = false;
+ }
+ break;
+ }
}
+ break;
}
- break;
}
+ break;
}
return FALSE;
static void resetregistry (void)
{
regdeletetree(NULL, _T("DetectedROMs"));
+ regdeletetree(NULL, _T("ConfigurationListView"));
regdelete(NULL, _T("QuickStartMode"));
regdelete(NULL, _T("ConfigFile"));
regdelete(NULL, _T("ConfigFileHardware"));