Esempio n. 1
0
Glib::ustring CSystem::getAsString(void){
	std::stringstream l_str;
	/*
	 id;"name";"description";"icon_file";"dat_file";"bios_file";"home_dir";""rom_dir";
	"snap_dir";"tittle_dir";"front_dir";"back_dir";"media_dir";emulator_id;
	"datname";"datDescription";"datcategory";datversion";"datauthor";datgames;
	*/

	l_str << getId() << CSV_SEPARATOR
		<< "\"" << Glib::strescape(getName()) << "\"" << CSV_SEPARATOR
		<< "\"" << Glib::strescape(getDescription()) << "\"" << CSV_SEPARATOR
		<< "\"" << Glib::strescape(getIconFile()) << "\"" << CSV_SEPARATOR
		<< "\"" << Glib::strescape(getDatFile()) << "\"" << CSV_SEPARATOR
		<< "\"" << Glib::strescape(getBiosFile()) << "\"" << CSV_SEPARATOR
		<< "\"" << Glib::strescape(getHomeDir()) << "\"" << CSV_SEPARATOR
		<< "\"" << Glib::strescape(getRomsDir()) << "\"" << CSV_SEPARATOR
		<< "\"" << Glib::strescape(getSnapDir()) << "\"" << CSV_SEPARATOR
		<< "\"" << Glib::strescape(getTitleDir()) << "\"" << CSV_SEPARATOR
		<< "\"" << Glib::strescape(getFrontDir()) << "\"" << CSV_SEPARATOR
		<< "\"" << Glib::strescape(getBackDir()) << "\"" << CSV_SEPARATOR
		<< "\"" << Glib::strescape(getMediaDir()) << "\"" << CSV_SEPARATOR
		<< getEmulatorId() << CSV_SEPARATOR
		<< "\"" << Glib::strescape(getDatName()) << "\"" << CSV_SEPARATOR
		<< "\"" << Glib::strescape(getDatDescription()) << "\"" << CSV_SEPARATOR
		<< "\"" << Glib::strescape(getDatCategory()) << "\"" << CSV_SEPARATOR
		<< "\"" << Glib::strescape(getDatVersion()) << "\"" << CSV_SEPARATOR
		<< "\"" << Glib::strescape(getDatAuthor()) << "\"" << CSV_SEPARATOR
		<< getDatGames() << CSV_SEPARATOR
		<< std::endl;
	return l_str.str();
}
Esempio n. 2
0
string CanvasNode::getEffectiveMediaDir()
{
    string sMediaDir = getMediaDir();
    if (!isAbsPath(sMediaDir)) {
        sMediaDir = Player::get()->getCurDirName()+sMediaDir;
    }
    if (sMediaDir[sMediaDir.length()-1] != '/') {
        sMediaDir += '/';
    }
    return sMediaDir;
}