aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl
diff options
context:
space:
mode:
authorAlejandro Marzini2010-06-20 22:45:09 +0000
committerAlejandro Marzini2010-06-20 22:45:09 +0000
commit9d41a45976767a6337d756e547fd9b7c2d6ef4aa (patch)
tree2356770401f051638936349160be3c9ee496d445 /backends/platform/sdl
parente0fe48032d6e27445a9c963e70cf82bf57b5fd5a (diff)
downloadscummvm-rg350-9d41a45976767a6337d756e547fd9b7c2d6ef4aa.tar.gz
scummvm-rg350-9d41a45976767a6337d756e547fd9b7c2d6ef4aa.tar.bz2
scummvm-rg350-9d41a45976767a6337d756e547fd9b7c2d6ef4aa.zip
Created win32 port from sdl backend.
svn-id: r50103
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r--backends/platform/sdl/main.cpp19
-rw-r--r--backends/platform/sdl/sdl.cpp4
-rw-r--r--backends/platform/sdl/sdl.h10
3 files changed, 8 insertions, 25 deletions
diff --git a/backends/platform/sdl/main.cpp b/backends/platform/sdl/main.cpp
index 69eca9f8a2..73e3dc36ae 100644
--- a/backends/platform/sdl/main.cpp
+++ b/backends/platform/sdl/main.cpp
@@ -23,34 +23,17 @@
*
*/
-// Fix for bug #2895217 "MSVC compilation broken with r47595":
-// We need to keep this on top of the "common/scummsys.h" include,
-// otherwise we will get errors about the windows headers redefining
-// "ARRAYSIZE" for example.
-#if defined(WIN32) && !defined(__SYMBIAN32__)
-#include <windows.h>
-// winnt.h defines ARRAYSIZE, but we want our own one...
-#undef ARRAYSIZE
-#endif
-
#include "common/scummsys.h"
// Several SDL based ports use a custom main, and hence do not want to compile
// of this file. The following "#if" ensures that.
-#if !defined(__MAEMO__) && !defined(_WIN32_WCE) && !defined(GP2XWIZ)&& !defined(LINUXMOTO) && !defined(__SYMBIAN32__)
+#if !defined(__MAEMO__) && !defined(_WIN32_WCE) && !defined(GP2XWIZ)&& !defined(LINUXMOTO) && !defined(__SYMBIAN32__) && !defined(WIN32)
#include "backends/platform/sdl/sdl.h"
#include "backends/plugins/sdl/sdl-provider.h"
#include "base/main.h"
-#ifdef WIN32
-int __stdcall WinMain(HINSTANCE /*hInst*/, HINSTANCE /*hPrevInst*/, LPSTR /*lpCmdLine*/, int /*iShowCmd*/) {
- SDL_SetModuleHandle(GetModuleHandle(NULL));
- return main(__argc, __argv);
-}
-#endif
-
int main(int argc, char *argv[]) {
// Create our OSystem instance
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 3387503204..2c1ecd2f27 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -203,7 +203,7 @@ void OSystem_SDL::addSysArchivesToSearchSet(Common::SearchSet &s, int priority)
}
-static Common::String getDefaultConfigFileName() {
+Common::String OSystem_SDL::getDefaultConfigFileName() {
char configFile[MAXPATHLEN];
#if defined (WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
OSVERSIONINFO win32OsVersion;
@@ -320,9 +320,7 @@ void OSystem_SDL::deinit() {
void OSystem_SDL::quit() {
deinit();
-#if !defined(SAMSUNGTV)
exit(0);
-#endif
}
void OSystem_SDL::setupIcon() {
diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h
index 46053faf46..f5289edbe8 100644
--- a/backends/platform/sdl/sdl.h
+++ b/backends/platform/sdl/sdl.h
@@ -48,7 +48,7 @@ public:
// Quit
virtual void quit(); // overloaded by CE backend
- void deinit();
+ virtual void deinit();
virtual void setWindowCaption(const char *caption);
@@ -60,14 +60,16 @@ public:
virtual bool pollEvent(Common::Event &event);
- uint32 getMillis();
- void delayMillis(uint msecs);
- void getTimeAndDate(TimeDate &td) const;
+ virtual uint32 getMillis();
+ virtual void delayMillis(uint msecs);
+ virtual void getTimeAndDate(TimeDate &td) const;
protected:
bool _inited;
void setupIcon();
+
+ virtual Common::String getDefaultConfigFileName();
};
#endif