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.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index 3897731db4..c1b0c7f692 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -420,9 +420,9 @@ void OSystem_WINCE3::initBackend() {
}
if (_graphicsManager == 0)
- _graphicsManager = new WINCESdlGraphicsManager(_eventSource);
+ _graphicsManager = new WINCESdlGraphicsManager(_eventSource, _window);
- ((WINCESdlEventSource *)_eventSource)->init((WINCESdlGraphicsManager *)_graphicsManager);
+ ((WINCESdlEventSource *)_eventSource)->init(dynamic_cast<WINCESdlGraphicsManager *>(_graphicsManager));
// Call parent implementation of this method
OSystem_SDL::initBackend();
@@ -486,15 +486,16 @@ void OSystem_WINCE3::swap_sound_master() {
//WINCESdlGraphicsManager _graphicsManager
- if (((WINCESdlGraphicsManager *)_graphicsManager)->_toolbarHandler.activeName() == NAME_MAIN_PANEL)
- ((WINCESdlGraphicsManager *)_graphicsManager)->_toolbarHandler.forceRedraw(); // redraw sound icon
+ WINCESdlGraphicsManager *graphicsManager = dynamic_cast<WINCESdlGraphicsManager *>(_graphicsManager);
+ if (graphicsManager->_toolbarHandler.activeName() == NAME_MAIN_PANEL)
+ graphicsManager->_toolbarHandler.forceRedraw(); // redraw sound icon
}
void OSystem_WINCE3::engineInit() {
check_mappings(); // called here to initialize virtual keys handling
- ((WINCESdlGraphicsManager *)_graphicsManager)->update_game_settings();
+ dynamic_cast<WINCESdlGraphicsManager *>(_graphicsManager)->update_game_settings();
// finalize mixer init
_mixerManager->init();
}
@@ -563,7 +564,7 @@ void OSystem_WINCE3::setGraphicsModeIntern() {
void OSystem_WINCE3::initSDL() {
// Check if SDL has not been initialized
if (!_initedSDL) {
- uint32 sdlFlags = SDL_INIT_EVENTTHREAD;
+ uint32 sdlFlags = SDL_INIT_EVENTTHREAD | SDL_INIT_VIDEO;
if (ConfMan.hasKey("disable_sdl_parachute"))
sdlFlags |= SDL_INIT_NOPARACHUTE;
@@ -576,9 +577,6 @@ void OSystem_WINCE3::initSDL() {
if (SDL_Init(sdlFlags) == -1)
error("Could not initialize SDL: %s", SDL_GetError());
- // Enable unicode support if possible
- SDL_EnableUNICODE(1);
-
_initedSDL = true;
}
}