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. svn-id: r54525
This commit is contained in:
parent
11b254a938
commit
1d818d940a
3 changed files with 13 additions and 23 deletions
|
@ -20,10 +20,6 @@ MODULE_OBJS := \
|
||||||
../../../gui/Actions.o \
|
../../../gui/Actions.o \
|
||||||
../../../gui/Key.o \
|
../../../gui/Key.o \
|
||||||
../../../gui/KeysDialog.o \
|
../../../gui/KeysDialog.o \
|
||||||
../sdl/sdl.o \
|
|
||||||
../sdl/graphics.o \
|
|
||||||
../sdl/events.o \
|
|
||||||
../sdl/hardwarekeys.o \
|
|
||||||
missing/missing.o \
|
missing/missing.o \
|
||||||
PocketSCUMM.o \
|
PocketSCUMM.o \
|
||||||
smartLandScale.o
|
smartLandScale.o
|
||||||
|
@ -32,3 +28,6 @@ MODULE_OBJS := \
|
||||||
MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS))
|
MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS))
|
||||||
OBJS := $(MODULE_OBJS) $(OBJS)
|
OBJS := $(MODULE_OBJS) $(OBJS)
|
||||||
MODULE_DIRS += $(sort $(dir $(MODULE_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
|
||||||
|
|
|
@ -164,10 +164,6 @@ int handleException(EXCEPTION_POINTERS *exceptionPointers) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
OSystem *OSystem_WINCE3_create() {
|
|
||||||
return new OSystem_WINCE3();
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" char *getcwd(char *buf, int size);
|
extern "C" char *getcwd(char *buf, int size);
|
||||||
int SDL_main(int argc, char **argv) {
|
int SDL_main(int argc, char **argv) {
|
||||||
FILE *newfp = NULL;
|
FILE *newfp = NULL;
|
||||||
|
@ -232,12 +228,17 @@ int SDL_main(int argc, char **argv) {
|
||||||
#if !defined(DEBUG) && !defined(__GNUC__)
|
#if !defined(DEBUG) && !defined(__GNUC__)
|
||||||
__try {
|
__try {
|
||||||
#endif
|
#endif
|
||||||
g_system = OSystem_WINCE3_create();
|
g_system = new OSystem_WINCE3();
|
||||||
assert(g_system);
|
assert(g_system);
|
||||||
|
|
||||||
|
// Pre initialize the backend
|
||||||
|
((OSystem_WINCE3 *)g_system)->init();
|
||||||
|
|
||||||
// Invoke the actual ScummVM main entry point:
|
// Invoke the actual ScummVM main entry point:
|
||||||
res = scummvm_main(argc, argv);
|
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__)
|
#if !defined(DEBUG) && !defined(__GNUC__)
|
||||||
}
|
}
|
||||||
__except (handleException(GetExceptionInformation())) {
|
__except (handleException(GetExceptionInformation())) {
|
||||||
|
@ -460,7 +461,7 @@ bool OSystem_WINCE3::isOzone() {
|
||||||
return _isOzone;
|
return _isOzone;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Common::String getDefaultConfigFileName() {
|
Common::String OSystem_WINCE3::getDefaultConfigFileName() {
|
||||||
char configFile[MAXPATHLEN];
|
char configFile[MAXPATHLEN];
|
||||||
strcpy(configFile, getcwd(NULL, MAX_PATH));
|
strcpy(configFile, getcwd(NULL, MAX_PATH));
|
||||||
strcat(configFile, "\\");
|
strcat(configFile, "\\");
|
||||||
|
@ -468,16 +469,6 @@ static Common::String getDefaultConfigFileName() {
|
||||||
return configFile;
|
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();
|
|
||||||
}
|
|
||||||
|
|
||||||
// ********************************************************************************************
|
// ********************************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -71,8 +71,8 @@ public:
|
||||||
// Overloaded from OSystem
|
// Overloaded from OSystem
|
||||||
void engineInit();
|
void engineInit();
|
||||||
void getTimeAndDate(TimeDate &t) const;
|
void getTimeAndDate(TimeDate &t) const;
|
||||||
virtual Common::SeekableReadStream *createConfigReadStream();
|
|
||||||
virtual Common::WriteStream *createConfigWriteStream();
|
virtual Common::String getDefaultConfigFileName();
|
||||||
|
|
||||||
|
|
||||||
// Overloaded from SDL_Common (FIXME)
|
// Overloaded from SDL_Common (FIXME)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue