mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-18 16:03:05 +00:00
COMPOSER: Split out filename mangling into a separate function.
This commit is contained in:
parent
c3339c15fa
commit
bdc24b6565
@ -275,6 +275,11 @@ Common::String ComposerEngine::getStringFromConfig(const Common::String §ion
|
||||
Common::String ComposerEngine::getFilename(const Common::String §ion, uint id) {
|
||||
Common::String key = Common::String::format("%d", id);
|
||||
Common::String filename = getStringFromConfig(section, key);
|
||||
|
||||
return mangleFilename(filename);
|
||||
}
|
||||
|
||||
Common::String ComposerEngine::mangleFilename(Common::String filename) {
|
||||
while (filename.size() && (filename[0] == '~' || filename[0] == ':' || filename[0] == '\\'))
|
||||
filename = filename.c_str() + 1;
|
||||
|
||||
|
@ -172,6 +172,7 @@ private:
|
||||
|
||||
Common::String getStringFromConfig(const Common::String §ion, const Common::String &key);
|
||||
Common::String getFilename(const Common::String §ion, uint id);
|
||||
Common::String mangleFilename(Common::String filename);
|
||||
void loadLibrary(uint id);
|
||||
void unloadLibrary(uint id);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user