[Scummvm-cvs-logs] scummvm master -> ce383aca1ee1f7f27c284169a2757ea3870e1bb1
lordhoto
lordhoto at gmail.com
Fri Jan 24 03:30:53 CET 2014
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
495fa910d3 WINCE: Attempt to fix WinCE compilation.
ce383aca1e MAEMO: Get rid of superfluous cast.
Commit: 495fa910d3161829125a5fe9953aeecf300c9857
https://github.com/scummvm/scummvm/commit/495fa910d3161829125a5fe9953aeecf300c9857
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2014-01-23T18:28:45-08:00
Commit Message:
WINCE: Attempt to fix WinCE compilation.
Changed paths:
backends/platform/wince/CEActionsPocket.cpp
backends/platform/wince/CEActionsSmartphone.cpp
backends/platform/wince/CELauncherDialog.cpp
backends/platform/wince/wince-sdl.cpp
diff --git a/backends/platform/wince/CEActionsPocket.cpp b/backends/platform/wince/CEActionsPocket.cpp
index 5980a41..493a5e6 100644
--- a/backends/platform/wince/CEActionsPocket.cpp
+++ b/backends/platform/wince/CEActionsPocket.cpp
@@ -236,7 +236,7 @@ CEActionsPocket::~CEActionsPocket() {
bool CEActionsPocket::perform(GUI::ActionType action, bool pushed) {
static bool keydialogrunning = false, quitdialog = false;
- _graphicsMan = ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager());
+ _graphicsMan = dynamic_cast<WINCESdlGraphicsManager *>(((OSystem_SDL *)g_system)->getGraphicsManager());
if (!pushed) {
switch (action) {
diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp
index 2cce288..d2bc449 100644
--- a/backends/platform/wince/CEActionsSmartphone.cpp
+++ b/backends/platform/wince/CEActionsSmartphone.cpp
@@ -202,7 +202,7 @@ CEActionsSmartphone::~CEActionsSmartphone() {
bool CEActionsSmartphone::perform(GUI::ActionType action, bool pushed) {
static bool keydialogrunning = false, quitdialog = false;
- _graphicsMan = ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager());
+ _graphicsMan = dynamic_cast<WINCESdlGraphicsManager *>(((OSystem_SDL *)g_system)->getGraphicsManager());
if (!pushed) {
switch (action) {
diff --git a/backends/platform/wince/CELauncherDialog.cpp b/backends/platform/wince/CELauncherDialog.cpp
index dd6076e..3908294 100644
--- a/backends/platform/wince/CELauncherDialog.cpp
+++ b/backends/platform/wince/CELauncherDialog.cpp
@@ -65,12 +65,12 @@ public:
};
CELauncherDialog::CELauncherDialog() : GUI::LauncherDialog() {
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->reset_panel();
+ dynamic_cast<WINCESdlGraphicsManager *>(((OSystem_SDL *)g_system)->getGraphicsManager())->reset_panel();
}
void CELauncherDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
if ((cmd == 'STRT') || (cmd == kListItemActivatedCmd) || (cmd == kListItemDoubleClickedCmd)) {
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->init_panel();
+ dynamic_cast<WINCESdlGraphicsManager *>(((OSystem_SDL *)g_system)->getGraphicsManager())->init_panel();
}
LauncherDialog::handleCommand(sender, cmd, data);
if (cmd == 'ABOU') {
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index 1c5cd55..1c9c178 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -422,7 +422,7 @@ void OSystem_WINCE3::initBackend() {
if (_graphicsManager == 0)
_graphicsManager = new WINCESdlGraphicsManager(_eventSource);
- ((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();
}
Commit: ce383aca1ee1f7f27c284169a2757ea3870e1bb1
https://github.com/scummvm/scummvm/commit/ce383aca1ee1f7f27c284169a2757ea3870e1bb1
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2014-01-23T18:28:45-08:00
Commit Message:
MAEMO: Get rid of superfluous cast.
Changed paths:
backends/events/maemosdl/maemosdl-events.cpp
diff --git a/backends/events/maemosdl/maemosdl-events.cpp b/backends/events/maemosdl/maemosdl-events.cpp
index dcdf038..eaf2f48 100644
--- a/backends/events/maemosdl/maemosdl-events.cpp
+++ b/backends/events/maemosdl/maemosdl-events.cpp
@@ -188,7 +188,7 @@ bool MaemoSdlEventSource::handleMouseButtonUp(SDL_Event &ev, Common::Event &even
bool MaemoSdlEventSource::toggleClickMode() {
_clickEnabled = !_clickEnabled;
- ((SurfaceSdlGraphicsManager *) _graphicsManager)->displayMessageOnOSD(
+ _graphicsManager->displayMessageOnOSD(
_clickEnabled ? _("Clicking Enabled") : _("Clicking Disabled"));
return _clickEnabled;
More information about the Scummvm-git-logs
mailing list