Merge branch 'master' into unstable

This commit is contained in:
Aloshi 2013-07-08 19:06:55 -05:00
commit c99324060b
4 changed files with 35 additions and 13 deletions

View file

@ -6,6 +6,20 @@ A cross-platform graphical front-end for emulators with controller navigation.
**Raspberry Pi users:**
A cool guy named petrockblog made a script which automatically installs many emulators and ES. It also includes options for configuring your RPi and setting it up to boot directly into ES. You can find it here: https://github.com/petrockblog/RetroPie-Setup
I found a bug! I have a problem!
================================
- First, try to check the [issue list](https://github.com/Aloshi/EmulationStation/issues?state=open) if there are already some entries that might match your issue. Then make sure to check closed bugs too, to find a solution to already solved problems.
- Try to update to the latest version of EmulationStation using git (You might need to delete you `es_input.cfg` and `es_settings.cfg` after that to reset them to default values after this):
```
cd EmulationStation
git pull
cmake .
make
```
- If your problem still isn't gone, the best way to report a bug is to post an issue on GitHub. Try to post the simplest steps possible to reproduce the bug. Include files you think might be related (except for ROMs, of course). If you haven't re-run ES since the crash, the log file `~/.emulationstation/es_log.txt` is also helpful.
Building
========
@ -139,11 +153,6 @@ The path element should be the absolute path of the ROM. Special characters SHOU
The switch `--gamelist-only` can be used to skip automatic searching, and only display games defined in the system's gamelist.xml.
The switch `--ignore-gamelist` can be used to ignore the gamelist and use the non-detailed view.
I found a bug!
==============
The best way to report a bug is to post an issue on GitHub. Try to post the simplest steps possible to reproduce the bug. Include files you think might be related (except for ROMs, of course). If you haven't re-run ES since the crash, the log file `~/.emulationstation/es_log.txt` is also helpful.
Themes
======

View file

@ -159,7 +159,7 @@ void SystemData::populateFolder(FolderData* folder)
//add directories that also do not match an extension as folders
if(!isGame && fs::is_directory(filePath))
{
FolderData* newFolder = new FolderData(this, filePath.string(), filePath.stem().string());
FolderData* newFolder = new FolderData(this, filePath.generic_string(), filePath.stem().string());
populateFolder(newFolder);
//ignore folders that do not contain games
@ -233,7 +233,11 @@ void SystemData::loadConfig()
sysPath = varValue.substr(0, varValue.length() - 1);
else
sysPath = varValue;
}else if(varName == "EXTENSION")
//convert path to generic directory seperators
boost::filesystem::path genericPath(sysPath);
sysPath = genericPath.generic_string();
}
else if(varName == "EXTENSION")
sysExtension = varValue;
else if(varName == "COMMAND")
sysCommand = varValue;

View file

@ -133,7 +133,9 @@ void parseGamelist(SystemData* system)
continue;
}
std::string path = pathNode.text().get();
//convert path to generic directory seperators
boost::filesystem::path gamePath(pathNode.text().get());
std::string path = gamePath.generic_string();
//expand "."
if(path[0] == '.')
@ -169,7 +171,7 @@ void parseGamelist(SystemData* system)
{
newImage.erase(0, 1);
boost::filesystem::path pathname(xmlpath);
newImage.insert(0, pathname.parent_path().string() );
newImage.insert(0, pathname.parent_path().generic_string() );
}
//if the image exist, set it
@ -218,7 +220,9 @@ void addGameDataNode(pugi::xml_node & parent, const GameData * game)
//add values
if (!game->getPath().empty()) {
pugi::xml_node pathNode = newGame.append_child(GameData::xmlTagPath.c_str());
pathNode.text().set(game->getPath().c_str());
//store path with generic directory seperators
boost::filesystem::path gamePath(game->getPath());
pathNode.text().set(gamePath.generic_string().c_str());
}
if (!game->getName().empty()) {
pugi::xml_node nameNode = newGame.append_child(GameData::xmlTagName.c_str());
@ -294,8 +298,10 @@ void updateGamelist(SystemData* system)
LOG(LogError) << "<" << GameData::xmlTagGame << "> node contains no <" << GameData::xmlTagPath << "> child!";
continue;
}
//check path
if (pathNode.text().get() == game->getPath()) {
//check paths. use the same directory separators
boost::filesystem::path nodePath(pathNode.text().get());
boost::filesystem::path gamePath(game->getPath());
if (nodePath.generic_string() == gamePath.generic_string()) {
//found the game. remove it. it will be added again later with updated values
root.remove_child(gameNode);
//break node search loop

View file

@ -1,5 +1,6 @@
#include "platform.h"
#include <stdlib.h>
#include <boost/filesystem.hpp>
std::string getHomePath()
@ -31,5 +32,7 @@ std::string getHomePath()
}
#endif
return homePath;
//convert path to generic directory seperators
boost::filesystem::path genericPath(homePath);
return genericPath.generic_string();
}