Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions es-app/src/FileData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,14 @@ void FileData::launchGame(Window* window)
const std::string rom = Utils::FileSystem::getEscapedPath(getPath());
const std::string basename = Utils::FileSystem::getStem(getPath());
const std::string rom_raw = Utils::FileSystem::getPreferredPath(getPath());
const std::string es_home = Utils::FileSystem::getHomePath();
const std::string rom_dir = Utils::FileSystem::getParent(getPath());

command = Utils::String::replace(command, "%ROM%", rom);
command = Utils::String::replace(command, "%BASENAME%", basename);
command = Utils::String::replace(command, "%ROM_RAW%", rom_raw);
command = Utils::String::replace(command, "%ES_HOME%", es_home);
command = Utils::String::replace(command, "%ROM_DIR%", rom_dir);

Scripting::fireEvent("game-start", rom, basename);

Expand Down