diff options
| -rw-r--r-- | base/commandLine.cpp | 27 | 
1 files changed, 16 insertions, 11 deletions
| diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 8846f4bcc6..7dbf4e0fe1 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -631,17 +631,22 @@ static void listSaves(const char *target) {  		return;  	} -	// Query the plugin for a list of savegames -	SaveStateList saveList = (*plugin)->listSaves(target); - -	// TODO: Include more info about the target (desc, engine name, ...) ??? -	printf("Saves for target '%s':\n", target); -	printf("  Slot Description                                           \n" -	       "  ---- ------------------------------------------------------\n"); - -	for (SaveStateList::const_iterator x = saveList.begin(); x != saveList.end(); ++x) { -		printf("  %-4s %s\n", x->save_slot().c_str(), x->description().c_str()); -		// TODO: Could also iterate over the full hashmap, printing all key-value pairs +	if (!(*plugin)->hasFeature(MetaEngine::kSupportsListSaves)) { +		// TODO: Include more info about the target (desc, engine name, ...) ??? +		printf("Target '%s' does not support listing of its save states.\n", target); +	} else { +		// Query the plugin for a list of savegames +		SaveStateList saveList = (*plugin)->listSaves(target); + +		// TODO: Include more info about the target (desc, engine name, ...) ??? +		printf("Saves for target '%s':\n", target); +		printf("  Slot Description                                           \n" +		       "  ---- ------------------------------------------------------\n"); + +		for (SaveStateList::const_iterator x = saveList.begin(); x != saveList.end(); ++x) { +			printf("  %-4s %s\n", x->save_slot().c_str(), x->description().c_str()); +			// TODO: Could also iterate over the full hashmap, printing all key-value pairs +		}  	}  	// Revert to the old active domain | 
