mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 08:25:35 +00:00
Pass objects by (const) ref instead of value; only set game description in the config file if one has been specified
svn-id: r25243
This commit is contained in:
parent
d32b1b1b7a
commit
aae330b4c1
@ -690,11 +690,12 @@ void LauncherDialog::addGame() {
|
||||
}
|
||||
|
||||
|
||||
void LauncherDialog::addGameToConf(FilesystemNode dir, GameDescriptor result, bool suppressEditDialog) {
|
||||
void LauncherDialog::addGameToConf(const FilesystemNode &dir, const GameDescriptor &result, bool suppressEditDialog) {
|
||||
// The auto detector or the user made a choice.
|
||||
// Pick a domain name which does not yet exist (after all, we
|
||||
// are *adding* a game to the config, not replacing).
|
||||
String domain(result.gameid());
|
||||
assert(!domain.empty());
|
||||
if (ConfMan.hasGameDomain(domain)) {
|
||||
int suffixN = 1;
|
||||
char suffix[16];
|
||||
@ -718,6 +719,7 @@ void LauncherDialog::addGameToConf(FilesystemNode dir, GameDescriptor result, bo
|
||||
// game target, we can change this (currently, you can only query
|
||||
// for the generic gameid description; it's not possible to obtain
|
||||
// a description which contains extended information like language, etc.).
|
||||
if (!result.description().empty())
|
||||
ConfMan.set("description", result.description(), domain);
|
||||
|
||||
ConfMan.set("gameid", result.gameid(), domain);
|
||||
|
@ -68,7 +68,7 @@ protected:
|
||||
|
||||
void selectGame(const String &name);
|
||||
|
||||
void addGameToConf(FilesystemNode dir, GameDescriptor result, bool suppressEditDialog);
|
||||
void addGameToConf(const FilesystemNode &dir, const GameDescriptor &result, bool suppressEditDialog);
|
||||
void addGameRecursive(FilesystemNode dir);
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user