aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/config-file.cpp9
-rw-r--r--common/config-file.h1
-rw-r--r--common/platform.cpp2
-rw-r--r--common/platform.h2
4 files changed, 12 insertions, 2 deletions
diff --git a/common/config-file.cpp b/common/config-file.cpp
index fe042e9eda..0ce6dcf0c8 100644
--- a/common/config-file.cpp
+++ b/common/config-file.cpp
@@ -226,6 +226,15 @@ bool ConfigFile::saveToStream(WriteStream &stream) {
return !stream.err();
}
+void ConfigFile::addSection(const String &section) {
+ Section *s = getSection(section);
+ if (s)
+ return;
+
+ Section newSection;
+ newSection.name = section;
+ _sections.push_back(newSection);
+}
void ConfigFile::removeSection(const String &section) {
assert(isValidName(section));
diff --git a/common/config-file.h b/common/config-file.h
index 8bd731c038..8bba851110 100644
--- a/common/config-file.h
+++ b/common/config-file.h
@@ -106,6 +106,7 @@ public:
bool saveToStream(WriteStream &stream);
bool hasSection(const String &section) const;
+ void addSection(const String &section);
void removeSection(const String &section);
void renameSection(const String &oldName, const String &newName);
diff --git a/common/platform.cpp b/common/platform.cpp
index 899e3f45ae..20ed970385 100644
--- a/common/platform.cpp
+++ b/common/platform.cpp
@@ -31,7 +31,7 @@ const PlatformDescription g_platforms[] = {
{ "amiga", "ami", "amiga", "Amiga", kPlatformAmiga },
{ "atari", "atari-st", "st", "Atari ST", kPlatformAtariST },
{ "c64", "c64", "c64", "Commodore 64", kPlatformC64 },
- { "pc", "dos", "ibm", "DOS", kPlatformPC },
+ { "pc", "dos", "ibm", "DOS", kPlatformDOS },
{ "pc98", "pc98", "pc98", "PC-98", kPlatformPC98 },
{ "wii", "wii", "wii", "Nintendo Wii", kPlatformWii },
{ "coco3", "coco3", "coco3", "CoCo3", kPlatformCoCo3 },
diff --git a/common/platform.h b/common/platform.h
index 72f0991409..ac8772fa94 100644
--- a/common/platform.h
+++ b/common/platform.h
@@ -35,7 +35,7 @@ class String;
* game in question.
*/
enum Platform {
- kPlatformPC,
+ kPlatformDOS,
kPlatformAmiga,
kPlatformAtariST,
kPlatformMacintosh,