aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/wince
diff options
context:
space:
mode:
authorMax Horn2009-09-30 16:16:53 +0000
committerMax Horn2009-09-30 16:16:53 +0000
commit8ba75fc522f16844524dd4d6f88c3851e2402969 (patch)
treedf25c20389e3e706d508f37914dedc73c6479f00 /backends/platform/wince
parent25dde91c7c6c7da52636e3daa34bd9eee5d9dcb9 (diff)
downloadscummvm-rg350-8ba75fc522f16844524dd4d6f88c3851e2402969.tar.gz
scummvm-rg350-8ba75fc522f16844524dd4d6f88c3851e2402969.tar.bz2
scummvm-rg350-8ba75fc522f16844524dd4d6f88c3851e2402969.zip
Fix code formatting (esp. 'if(' -> 'if (' etc., but also indention and other things)
svn-id: r44495
Diffstat (limited to 'backends/platform/wince')
-rw-r--r--backends/platform/wince/CEActionsPocket.cpp146
-rw-r--r--backends/platform/wince/CEException.cpp50
-rw-r--r--backends/platform/wince/wince-sdl.cpp68
3 files changed, 132 insertions, 132 deletions
diff --git a/backends/platform/wince/CEActionsPocket.cpp b/backends/platform/wince/CEActionsPocket.cpp
index 45dbad12cc..ebe6981290 100644
--- a/backends/platform/wince/CEActionsPocket.cpp
+++ b/backends/platform/wince/CEActionsPocket.cpp
@@ -232,7 +232,7 @@ bool CEActionsPocket::perform(GUI::ActionType action, bool pushed) {
static bool keydialogrunning = false, quitdialog = false;
if (!pushed) {
- switch(action) {
+ switch (action) {
case POCKET_ACTION_RIGHTCLICK:
_CESystem->add_right_click(false);
return true;
@@ -251,78 +251,78 @@ bool CEActionsPocket::perform(GUI::ActionType action, bool pushed) {
}
switch (action) {
- case POCKET_ACTION_PAUSE:
- case POCKET_ACTION_SAVE:
- case POCKET_ACTION_SKIP:
- case POCKET_ACTION_MULTI:
- if (action == POCKET_ACTION_SAVE && ConfMan.get("gameid") == "parallaction") {
- // FIXME: This is a temporary solution. The engine should handle its own menus.
- // Note that the user can accomplish this via the virtual keyboard as well, this is just for convenience
- GUI::MessageDialog alert("Do you want to load or save the game?", "Load", "Save");
- if (alert.runModal() == GUI::kMessageOK)
- _key_action[action].setKey(SDLK_l);
- else
- _key_action[action].setKey(SDLK_s);
- }
- EventsBuffer::simulateKey(&_key_action[action], true);
- return true;
- case POCKET_ACTION_KEYBOARD:
- _CESystem->swap_panel();
- return true;
- case POCKET_ACTION_HIDE:
- _CESystem->swap_panel_visibility();
- return true;
- case POCKET_ACTION_SOUND:
- _CESystem->swap_sound_master();
- return true;
- case POCKET_ACTION_RIGHTCLICK:
- _CESystem->add_right_click(true);
- return true;
- case POCKET_ACTION_CURSOR:
- _CESystem->swap_mouse_visibility();
- return true;
- case POCKET_ACTION_FREELOOK:
- _CESystem->swap_freeLook();
- return true;
- case POCKET_ACTION_ZOOM_UP:
- _CESystem->swap_zoom_up();
- return true;
- case POCKET_ACTION_ZOOM_DOWN:
- _CESystem->swap_zoom_down();
- return true;
- case POCKET_ACTION_LEFTCLICK:
- _CESystem->add_left_click(true);
- return true;
- case POCKET_ACTION_UP:
- _CESystem->move_cursor_up();
- return true;
- case POCKET_ACTION_DOWN:
- _CESystem->move_cursor_down();
- return true;
- case POCKET_ACTION_LEFT:
- _CESystem->move_cursor_left();
- return true;
- case POCKET_ACTION_RIGHT:
- _CESystem->move_cursor_right();
- return true;
- case POCKET_ACTION_QUIT:
- if (!quitdialog) {
- quitdialog = true;
- GUI::MessageDialog alert(" Are you sure you want to quit ? ", "Yes", "No");
- if (alert.runModal() == GUI::kMessageOK)
- _mainSystem->quit();
- quitdialog = false;
- }
- return true;
- case POCKET_ACTION_BINDKEYS:
- if (!keydialogrunning) {
- keydialogrunning = true;
- GUI::KeysDialog *keysDialog = new GUI::KeysDialog();
- keysDialog->runModal();
- delete keysDialog;
- keydialogrunning = false;
- }
- return true;
+ case POCKET_ACTION_PAUSE:
+ case POCKET_ACTION_SAVE:
+ case POCKET_ACTION_SKIP:
+ case POCKET_ACTION_MULTI:
+ if (action == POCKET_ACTION_SAVE && ConfMan.get("gameid") == "parallaction") {
+ // FIXME: This is a temporary solution. The engine should handle its own menus.
+ // Note that the user can accomplish this via the virtual keyboard as well, this is just for convenience
+ GUI::MessageDialog alert("Do you want to load or save the game?", "Load", "Save");
+ if (alert.runModal() == GUI::kMessageOK)
+ _key_action[action].setKey(SDLK_l);
+ else
+ _key_action[action].setKey(SDLK_s);
+ }
+ EventsBuffer::simulateKey(&_key_action[action], true);
+ return true;
+ case POCKET_ACTION_KEYBOARD:
+ _CESystem->swap_panel();
+ return true;
+ case POCKET_ACTION_HIDE:
+ _CESystem->swap_panel_visibility();
+ return true;
+ case POCKET_ACTION_SOUND:
+ _CESystem->swap_sound_master();
+ return true;
+ case POCKET_ACTION_RIGHTCLICK:
+ _CESystem->add_right_click(true);
+ return true;
+ case POCKET_ACTION_CURSOR:
+ _CESystem->swap_mouse_visibility();
+ return true;
+ case POCKET_ACTION_FREELOOK:
+ _CESystem->swap_freeLook();
+ return true;
+ case POCKET_ACTION_ZOOM_UP:
+ _CESystem->swap_zoom_up();
+ return true;
+ case POCKET_ACTION_ZOOM_DOWN:
+ _CESystem->swap_zoom_down();
+ return true;
+ case POCKET_ACTION_LEFTCLICK:
+ _CESystem->add_left_click(true);
+ return true;
+ case POCKET_ACTION_UP:
+ _CESystem->move_cursor_up();
+ return true;
+ case POCKET_ACTION_DOWN:
+ _CESystem->move_cursor_down();
+ return true;
+ case POCKET_ACTION_LEFT:
+ _CESystem->move_cursor_left();
+ return true;
+ case POCKET_ACTION_RIGHT:
+ _CESystem->move_cursor_right();
+ return true;
+ case POCKET_ACTION_QUIT:
+ if (!quitdialog) {
+ quitdialog = true;
+ GUI::MessageDialog alert(" Are you sure you want to quit ? ", "Yes", "No");
+ if (alert.runModal() == GUI::kMessageOK)
+ _mainSystem->quit();
+ quitdialog = false;
+ }
+ return true;
+ case POCKET_ACTION_BINDKEYS:
+ if (!keydialogrunning) {
+ keydialogrunning = true;
+ GUI::KeysDialog *keysDialog = new GUI::KeysDialog();
+ keysDialog->runModal();
+ delete keysDialog;
+ keydialogrunning = false;
+ }
+ return true;
}
return false;
}
diff --git a/backends/platform/wince/CEException.cpp b/backends/platform/wince/CEException.cpp
index aec818102d..4ecabece5a 100644
--- a/backends/platform/wince/CEException.cpp
+++ b/backends/platform/wince/CEException.cpp
@@ -94,31 +94,31 @@ void CEException::dumpException(HANDLE file, EXCEPTION_RECORD *exceptionRecord)
unsigned int i;
#if (_WIN32_WCE >= 300)
writeBreak(file);
- switch(exceptionRecord->ExceptionCode) {
- case EXCEPTION_ACCESS_VIOLATION :
- strcpy(exceptionName, "Access Violation");
- break;
- case EXCEPTION_ARRAY_BOUNDS_EXCEEDED :
- strcpy(exceptionName, "Array Bounds Exceeded");
- break;
- case EXCEPTION_DATATYPE_MISALIGNMENT :
- strcpy(exceptionName, "Datatype Misalignment");
- break;
- case EXCEPTION_IN_PAGE_ERROR :
- strcpy(exceptionName, "In Page Error");
- break;
- case EXCEPTION_INT_DIVIDE_BY_ZERO :
- strcpy(exceptionName, "Int Divide By Zero");
- break;
- case EXCEPTION_INT_OVERFLOW :
- strcpy(exceptionName, "Int Overflow");
- break;
- case EXCEPTION_STACK_OVERFLOW :
- strcpy(exceptionName, "Stack Overflow");
- break;
- default:
- sprintf(exceptionName, "%.8x", exceptionRecord->ExceptionCode);
- break;
+ switch (exceptionRecord->ExceptionCode) {
+ case EXCEPTION_ACCESS_VIOLATION :
+ strcpy(exceptionName, "Access Violation");
+ break;
+ case EXCEPTION_ARRAY_BOUNDS_EXCEEDED :
+ strcpy(exceptionName, "Array Bounds Exceeded");
+ break;
+ case EXCEPTION_DATATYPE_MISALIGNMENT :
+ strcpy(exceptionName, "Datatype Misalignment");
+ break;
+ case EXCEPTION_IN_PAGE_ERROR :
+ strcpy(exceptionName, "In Page Error");
+ break;
+ case EXCEPTION_INT_DIVIDE_BY_ZERO :
+ strcpy(exceptionName, "Int Divide By Zero");
+ break;
+ case EXCEPTION_INT_OVERFLOW :
+ strcpy(exceptionName, "Int Overflow");
+ break;
+ case EXCEPTION_STACK_OVERFLOW :
+ strcpy(exceptionName, "Stack Overflow");
+ break;
+ default:
+ sprintf(exceptionName, "%.8x", exceptionRecord->ExceptionCode);
+ break;
}
sprintf(tempo, "Exception %s Flags %.8x Address %.8x", exceptionName, exceptionRecord->ExceptionFlags,
exceptionRecord->ExceptionAddress);
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index 1291e09671..b2512e0234 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -935,46 +935,46 @@ bool OSystem_WINCE3::hasFeature(Feature f) {
}
void OSystem_WINCE3::setFeatureState(Feature f, bool enable) {
- switch(f) {
- case kFeatureFullscreenMode:
- return;
+ switch (f) {
+ case kFeatureFullscreenMode:
+ return;
- case kFeatureVirtualKeyboard:
- if (_hasSmartphoneResolution)
- return;
- _toolbarHighDrawn = false;
- if (enable) {
- _panelStateForced = true;
- if (!_toolbarHandler.visible()) swap_panel_visibility();
- //_saveToolbarState = _toolbarHandler.visible();
- _saveActiveToolbar = _toolbarHandler.activeName();
- _toolbarHandler.setActive(NAME_PANEL_KEYBOARD);
- _toolbarHandler.setVisible(true);
- }
- else
- if (_panelStateForced) {
- _panelStateForced = false;
- _toolbarHandler.setActive(_saveActiveToolbar);
- //_toolbarHandler.setVisible(_saveToolbarState);
- }
+ case kFeatureVirtualKeyboard:
+ if (_hasSmartphoneResolution)
return;
+ _toolbarHighDrawn = false;
+ if (enable) {
+ _panelStateForced = true;
+ if (!_toolbarHandler.visible()) swap_panel_visibility();
+ //_saveToolbarState = _toolbarHandler.visible();
+ _saveActiveToolbar = _toolbarHandler.activeName();
+ _toolbarHandler.setActive(NAME_PANEL_KEYBOARD);
+ _toolbarHandler.setVisible(true);
+ }
+ else
+ if (_panelStateForced) {
+ _panelStateForced = false;
+ _toolbarHandler.setActive(_saveActiveToolbar);
+ //_toolbarHandler.setVisible(_saveToolbarState);
+ }
+ return;
- case kFeatureDisableKeyFiltering:
- if (_hasSmartphoneResolution)
- _unfilteredkeys = enable;
- return;
+ case kFeatureDisableKeyFiltering:
+ if (_hasSmartphoneResolution)
+ _unfilteredkeys = enable;
+ return;
- default:
- OSystem_SDL::setFeatureState(f, enable);
+ default:
+ OSystem_SDL::setFeatureState(f, enable);
}
}
bool OSystem_WINCE3::getFeatureState(Feature f) {
- switch(f) {
- case kFeatureFullscreenMode:
- return false;
- case kFeatureVirtualKeyboard:
- return (_panelStateForced);
+ switch (f) {
+ case kFeatureFullscreenMode:
+ return false;
+ case kFeatureVirtualKeyboard:
+ return (_panelStateForced);
}
return OSystem_SDL::getFeatureState(f);
}
@@ -1277,7 +1277,7 @@ bool OSystem_WINCE3::setGraphicsMode(int mode) {
if (_scaleFactorXm < 0) {
/* Standard scalers, from the SDL backend */
- switch(_videoMode.mode) {
+ switch (_videoMode.mode) {
case GFX_NORMAL:
_videoMode.scaleFactor = 1;
_scalerProc = Normal1x;
@@ -2308,7 +2308,7 @@ bool OSystem_WINCE3::pollEvent(Common::Event &event) {
currentTime = GetTickCount();
while (SDL_PollEvent(&ev)) {
- switch(ev.type) {
+ switch (ev.type) {
case SDL_KEYDOWN:
debug(1, "Key down %X %s", ev.key.keysym.sym, SDL_GetKeyName((SDLKey)ev.key.keysym.sym));
// KMOD_RESERVED is used if the key has been injected by an external buffer