mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +00:00
Added %BASENAME% tag.
This commit is contained in:
parent
3acbd0af9c
commit
12a0843045
18
README.md
18
README.md
|
@ -74,6 +74,24 @@ F4 - Close EmulationStation (should work as long as ES hasn't frozen)
|
|||
|
||||
Unfortunately, there is no built-in way to change keyboard mappings - if you need to, check out `src/InputManager.cpp`. There's a switch statement with a list of keys; it should be pretty simple to change them.
|
||||
|
||||
Writing an es_systems.cfg
|
||||
=========================
|
||||
The file `~/.emulationstation/es_systems.cfg` contains the system configuration data for EmulationStation. A system is a NAME, PATH, EXTENSION, and COMMAND. You can define any number of systems. You can switch between them by pressing left and right. They will cycle in the order they are defined.
|
||||
|
||||
The NAME is what ES will show in the header if you're not using a theme.
|
||||
|
||||
The PATH is where ES will start the search for ROMs. All subdirectories (and links!) will be included.
|
||||
|
||||
**NOTE:** A system *must* have at least one game present in its PATH directory, or ES will ignore it.
|
||||
|
||||
The EXTENSION is a list of extensions ES will consider valid and add to the list when searching. Each extension *must* start with a period. The list is delimited by a space.
|
||||
|
||||
The COMMAND is the shell command ES will execute to start your emulator. As it is evaluated by the shell (i.e. bash), you can do some clever tricks if need be.
|
||||
|
||||
The following "tags" are replaced by ES in COMMANDs:
|
||||
%ROM% - Replaced with absolute path to the selected ROM.
|
||||
%BASENAME% - Replaced with the "base" name of the path to the selected ROM. For example, a path of "/foo/bar.rom", this tag would be "bar". This tag is useful for setting up AdvanceMAME.
|
||||
|
||||
gamelist.xml
|
||||
============
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
December 14, 2012
|
||||
-Added %BASENAME% tag for launch commands. Useful for AdvMAME.
|
||||
|
||||
December 8, 2012
|
||||
-Fixed a segfault when opening the menu (related to sounds). Woops!
|
||||
-Fixed PAGEDOWN/PAGEUP not appearing in the input config GUI.
|
||||
|
|
|
@ -42,6 +42,13 @@ std::string GameData::getBashPath()
|
|||
return path;
|
||||
}
|
||||
|
||||
//returns the boost::filesystem stem of our path - e.g. for "/foo/bar.rom" returns "bar"
|
||||
std::string GameData::getBaseName()
|
||||
{
|
||||
boost::filesystem::path path(mPath);
|
||||
return path.stem().string();
|
||||
}
|
||||
|
||||
void GameData::set(std::string name, std::string description, std::string imagePath)
|
||||
{
|
||||
if(!name.empty())
|
||||
|
|
|
@ -16,6 +16,7 @@ public:
|
|||
std::string getName();
|
||||
std::string getPath();
|
||||
std::string getBashPath();
|
||||
std::string getBaseName();
|
||||
|
||||
std::string getDescription();
|
||||
std::string getImagePath();
|
||||
|
|
|
@ -81,6 +81,7 @@ void SystemData::launchGame(GameData* game)
|
|||
std::string command = mLaunchCommand;
|
||||
|
||||
command = strreplace(command, "%ROM%", game->getBashPath());
|
||||
command = strreplace(command, "%BASENAME%", game->getBaseName());
|
||||
|
||||
std::cout << " " << command << "\n";
|
||||
std::cout << "=====================================================\n";
|
||||
|
|
Loading…
Reference in a new issue