aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/dingux/dingux.cpp
diff options
context:
space:
mode:
authorMax Horn2010-11-28 14:56:31 +0000
committerMax Horn2010-11-28 14:56:31 +0000
commit7760077cf530c35c969f9286145d9a36d0440d70 (patch)
tree34c67abbacefa26792ca77fc9f5360c77a34663d /backends/platform/dingux/dingux.cpp
parent284b49aabc54590e1444f06561a815c2a3c5de7e (diff)
parent74a53df11b51fa4956745c086b2e6351b8383568 (diff)
downloadscummvm-rg350-7760077cf530c35c969f9286145d9a36d0440d70.tar.gz
scummvm-rg350-7760077cf530c35c969f9286145d9a36d0440d70.tar.bz2
scummvm-rg350-7760077cf530c35c969f9286145d9a36d0440d70.zip
Merging the gsoc2010-opengl branch
svn-id: r54518
Diffstat (limited to 'backends/platform/dingux/dingux.cpp')
-rw-r--r--backends/platform/dingux/dingux.cpp41
1 files changed, 15 insertions, 26 deletions
diff --git a/backends/platform/dingux/dingux.cpp b/backends/platform/dingux/dingux.cpp
index cdf10600ce..e982934fb7 100644
--- a/backends/platform/dingux/dingux.cpp
+++ b/backends/platform/dingux/dingux.cpp
@@ -23,36 +23,25 @@
*
*/
-#include "backends/platform/dingux/dingux.h"
-
#if defined(DINGUX)
-bool OSystem_SDL_Dingux::hasFeature(Feature f) {
- return
- (f == kFeatureAspectRatioCorrection) ||
- (f == kFeatureCursorHasPalette);
-}
-
-void OSystem_SDL_Dingux::setFeatureState(Feature f, bool enable) {
- switch (f) {
- case kFeatureAspectRatioCorrection:
- setAspectRatioCorrection(enable);
- break;
- default:
- break;
+#include "backends/platform/dingux/dingux.h"
+#include "backends/events/dinguxsdl/dinguxsdl-events.h"
+#include "backends/graphics/dinguxsdl/dinguxsdl-graphics.h"
+
+void OSystem_SDL_Dingux::initBackend() {
+ // Create the events manager
+ if (_eventSource == 0)
+ _eventSource = new DINGUXSdlEventSource();
+
+ // Create the graphics manager
+ if (_graphicsManager == 0) {
+ _graphicsManager = new DINGUXSdlGraphicsManager(_eventSource);
+ ((DINGUXSdlEventSource*)_eventSource)->setCurrentGraphMan((DINGUXSdlGraphicsManager*)_graphicsManager);
}
-}
-
-bool OSystem_SDL_Dingux::getFeatureState(Feature f) {
- assert(_transactionMode == kTransactionNone);
- switch (f) {
- case kFeatureAspectRatioCorrection:
- return _videoMode.aspectRatioCorrection;
- default:
- return false;
- }
+ // Call parent implementation of this method
+ OSystem_POSIX::initBackend();
}
#endif
-