mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-06-05 02:16:48 +02:00
Fixed crash on launch close. Fixed launch and rom search paths for merged collections .Removed verbose debug statement.
This commit is contained in:
@@ -169,12 +169,20 @@ CollectionInfo *CollectionInfoBuilder::buildCollection(std::string name)
|
|||||||
std::string extensions;
|
std::string extensions;
|
||||||
std::string metadataType = name;
|
std::string metadataType = name;
|
||||||
std::string metadataPath;
|
std::string metadataPath;
|
||||||
|
std::string mergedCollectionName;
|
||||||
|
|
||||||
|
// temporarily set currentCollection in case this is a subcollection
|
||||||
|
conf_.getProperty("currentCollection", mergedCollectionName);
|
||||||
|
conf_.setProperty("currentCollection", name);
|
||||||
conf_.getCollectionAbsolutePath(name, listItemsPath);
|
conf_.getCollectionAbsolutePath(name, listItemsPath);
|
||||||
|
|
||||||
(void)conf_.getProperty(extensionsKey, extensions);
|
(void)conf_.getProperty(extensionsKey, extensions);
|
||||||
(void)conf_.getProperty(metadataTypeKey, metadataType);
|
(void)conf_.getProperty(metadataTypeKey, metadataType);
|
||||||
(void)conf_.getProperty(metadataPathKey, metadataPath);
|
(void)conf_.getProperty(metadataPathKey, metadataPath);
|
||||||
|
|
||||||
|
// restore old collection name
|
||||||
|
conf_.setProperty("currentCollection", mergedCollectionName);
|
||||||
|
|
||||||
if(!conf_.getProperty(launcherKey, launcherName))
|
if(!conf_.getProperty(launcherKey, launcherName))
|
||||||
{
|
{
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
|
|||||||
@@ -209,7 +209,10 @@ void UserInput::resetStates()
|
|||||||
{
|
{
|
||||||
for(unsigned int i = 0; i < KeyCodeMax; ++i)
|
for(unsigned int i = 0; i < KeyCodeMax; ++i)
|
||||||
{
|
{
|
||||||
keyHandlers_[i]->reset();
|
if(keyHandlers_[i])
|
||||||
|
{
|
||||||
|
keyHandlers_[i]->reset();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool UserInput::update(SDL_Event &e)
|
bool UserInput::update(SDL_Event &e)
|
||||||
|
|||||||
@@ -272,11 +272,19 @@ bool Launcher::extensions(std::string &extensions, std::string collection)
|
|||||||
bool Launcher::collectionDirectory(std::string &directory, std::string collection)
|
bool Launcher::collectionDirectory(std::string &directory, std::string collection)
|
||||||
{
|
{
|
||||||
std::string itemsPathValue;
|
std::string itemsPathValue;
|
||||||
|
std::string mergedCollectionName;
|
||||||
|
|
||||||
|
// temporarily set currentCollection in case this is a subcollection
|
||||||
|
config_.getProperty("currentCollection", mergedCollectionName);
|
||||||
|
config_.setProperty("currentCollection", collection);
|
||||||
|
|
||||||
// find the items path folder (i.e. ROM path)
|
// find the items path folder (i.e. ROM path)
|
||||||
config_.getCollectionAbsolutePath(collection, itemsPathValue);
|
config_.getCollectionAbsolutePath(collection, itemsPathValue);
|
||||||
directory += itemsPathValue + Utils::pathSeparator;
|
directory += itemsPathValue + Utils::pathSeparator;
|
||||||
|
|
||||||
|
// restore old collection name
|
||||||
|
config_.setProperty("currentCollection", mergedCollectionName);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -340,7 +340,6 @@ Component *ReloadableMedia::findComponent(std::string collection, std::string ty
|
|||||||
|
|
||||||
// check the system folder
|
// check the system folder
|
||||||
config_.getMediaPropertyAbsolutePath(collection, type, systemMode, imagePath);
|
config_.getMediaPropertyAbsolutePath(collection, type, systemMode, imagePath);
|
||||||
std::cout << "searching path: " << imagePath << " =>" << basename << std::endl;
|
|
||||||
|
|
||||||
if(type == "video")
|
if(type == "video")
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user