aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/wince/wince-sdl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/wince/wince-sdl.cpp')
-rw-r--r--backends/platform/wince/wince-sdl.cpp25
1 files changed, 8 insertions, 17 deletions
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index 3f64cb7d5d..4d2d78086f 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -164,10 +164,6 @@ int handleException(EXCEPTION_POINTERS *exceptionPointers) {
}
#endif
-OSystem *OSystem_WINCE3_create() {
- return new OSystem_WINCE3();
-}
-
extern "C" char *getcwd(char *buf, int size);
int SDL_main(int argc, char **argv) {
FILE *newfp = NULL;
@@ -232,12 +228,17 @@ int SDL_main(int argc, char **argv) {
#if !defined(DEBUG) && !defined(__GNUC__)
__try {
#endif
- g_system = OSystem_WINCE3_create();
+ g_system = new OSystem_WINCE3();
assert(g_system);
+ // Pre initialize the backend
+ ((OSystem_WINCE3 *)g_system)->init();
+
// Invoke the actual ScummVM main entry point:
res = scummvm_main(argc, argv);
- g_system->quit(); // TODO: Consider removing / replacing this!
+
+ // Free OSystem
+ delete (OSystem_WINCE3 *)g_system;
#if !defined(DEBUG) && !defined(__GNUC__)
}
__except (handleException(GetExceptionInformation())) {
@@ -460,7 +461,7 @@ bool OSystem_WINCE3::isOzone() {
return _isOzone;
}
-static Common::String getDefaultConfigFileName() {
+Common::String OSystem_WINCE3::getDefaultConfigFileName() {
char configFile[MAXPATHLEN];
strcpy(configFile, getcwd(NULL, MAX_PATH));
strcat(configFile, "\\");
@@ -468,16 +469,6 @@ static Common::String getDefaultConfigFileName() {
return configFile;
}
-Common::SeekableReadStream *OSystem_WINCE3::createConfigReadStream() {
- Common::FSNode file(getDefaultConfigFileName());
- return file.createReadStream();
-}
-
-Common::WriteStream *OSystem_WINCE3::createConfigWriteStream() {
- Common::FSNode file(getDefaultConfigFileName());
- return file.createWriteStream();
-}
-
// ********************************************************************************************