diff --git a/src/osdep/amiberry.cpp b/src/osdep/amiberry.cpp index d377ce78..c50b477a 100644 --- a/src/osdep/amiberry.cpp +++ b/src/osdep/amiberry.cpp @@ -1343,8 +1343,7 @@ void whdload_auto_prefs (struct uae_prefs* p, char* filepath) //_tcscpy(last_loaded_config, _T(filename)); // OPTIONSFILENAME = filename; //ConfigFileInfo->Name = filename; - - + // SOMEWHERE HERE WE NEED TO SET THE GAME 'NAME' FOR SAVESTATE ETC PURPOSES @@ -1356,9 +1355,10 @@ void whdload_auto_prefs (struct uae_prefs* p, char* filepath) // DO A CHECK FOR AGA const int is_aga = strstr(filename,"_AGA") != NULL; + const int is_cd32 = strstr(filename,"_CD32") != NULL; // A1200 no AGA - if (is_aga == false) + if (is_aga == false && is_cd32 == false) { _tcscpy(p->description, _T("WHDLoad AutoBoot Configuration")); @@ -1406,7 +1406,10 @@ void whdload_auto_prefs (struct uae_prefs* p, char* filepath) //SET/GET THE HOST SETTINGS - + if (is_cd32 == true) + { p->jports[0].mode = 7; + p->jports[1].mode = 7; } + // SET THE GAME SETTINGS char WHDPath[MAX_DPATH]; @@ -1429,12 +1432,10 @@ void whdload_auto_prefs (struct uae_prefs* p, char* filepath) // APPLY SPECIAL OPTIONS E.G. MOUSE OR ALT. JOYSTICK SETTINGS - - - - extractFileName(filepath, last_loaded_config); - + extractFileName(filepath, last_loaded_config); + + // CLEAN UP SETTINGS (MAYBE??) // fixup_prefs(&currprefs, true); diff --git a/src/osdep/gui/PanelConfig.cpp b/src/osdep/gui/PanelConfig.cpp index deae8746..3db119fd 100644 --- a/src/osdep/gui/PanelConfig.cpp +++ b/src/osdep/gui/PanelConfig.cpp @@ -293,9 +293,17 @@ void InitPanelConfig(const struct _ConfigCategory& category) category.panel->add(txtDesc, DISTANCE_BORDER + lblDesc->getWidth() + 8, txtName->getY() + txtName->getHeight() + DISTANCE_NEXT_Y); if (strlen(last_active_config) == 0) + { + if (strlen(last_loaded_config) == 0) strncpy(last_active_config, OPTIONSFILENAME, MAX_DPATH); + else + { + strcpy(last_active_config, last_loaded_config); + removeFileExtension(last_active_config); + } + } txtName->setText(last_active_config); - txtDesc->setText(changed_prefs.description); + txtDesc->setText(changed_prefs.description); ensureVisible = -1; RefreshPanelConfig(); }