[Scummvm-cvs-logs] SF.net SVN: scummvm:[54525] scummvm/trunk/backends/platform/wince
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sun Nov 28 16:44:03 CET 2010
Revision: 54525
http://scummvm.svn.sourceforge.net/scummvm/?rev=54525&view=rev
Author: fingolfin
Date: 2010-11-28 15:44:03 +0000 (Sun, 28 Nov 2010)
Log Message:
-----------
WINCE: Fix main(), update config file handling, update module.mk
The WinCE backend will require many more changes to work again after the
changes made to SDL backend. This is just a tiny first step towards this
goal.
Modified Paths:
--------------
scummvm/trunk/backends/platform/wince/module.mk
scummvm/trunk/backends/platform/wince/wince-sdl.cpp
scummvm/trunk/backends/platform/wince/wince-sdl.h
Modified: scummvm/trunk/backends/platform/wince/module.mk
===================================================================
--- scummvm/trunk/backends/platform/wince/module.mk 2010-11-28 15:11:27 UTC (rev 54524)
+++ scummvm/trunk/backends/platform/wince/module.mk 2010-11-28 15:44:03 UTC (rev 54525)
@@ -20,10 +20,6 @@
../../../gui/Actions.o \
../../../gui/Key.o \
../../../gui/KeysDialog.o \
- ../sdl/sdl.o \
- ../sdl/graphics.o \
- ../sdl/events.o \
- ../sdl/hardwarekeys.o \
missing/missing.o \
PocketSCUMM.o \
smartLandScale.o
@@ -32,3 +28,6 @@
MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS))
OBJS := $(MODULE_OBJS) $(OBJS)
MODULE_DIRS += $(sort $(dir $(MODULE_OBJS)))
+
+# HACK: The wince backend is based on the SDL one, so we load that, too.
+include $(srcdir)/backends/platform/sdl/module.mk
Modified: scummvm/trunk/backends/platform/wince/wince-sdl.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/wince-sdl.cpp 2010-11-28 15:11:27 UTC (rev 54524)
+++ scummvm/trunk/backends/platform/wince/wince-sdl.cpp 2010-11-28 15:44:03 UTC (rev 54525)
@@ -164,10 +164,6 @@
}
#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 @@
#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 @@
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 @@
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();
-}
-
// ********************************************************************************************
Modified: scummvm/trunk/backends/platform/wince/wince-sdl.h
===================================================================
--- scummvm/trunk/backends/platform/wince/wince-sdl.h 2010-11-28 15:11:27 UTC (rev 54524)
+++ scummvm/trunk/backends/platform/wince/wince-sdl.h 2010-11-28 15:44:03 UTC (rev 54525)
@@ -71,10 +71,10 @@
// Overloaded from OSystem
void engineInit();
void getTimeAndDate(TimeDate &t) const;
- virtual Common::SeekableReadStream *createConfigReadStream();
- virtual Common::WriteStream *createConfigWriteStream();
+ virtual Common::String getDefaultConfigFileName();
+
// Overloaded from SDL_Common (FIXME)
void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format); // overloaded by CE backend
void undrawMouse();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list