aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/openpandora
diff options
context:
space:
mode:
authorDavid-John Willis2011-10-10 21:18:07 +0100
committerDavid-John Willis2011-10-10 21:18:07 +0100
commita27c2b401c1027b94e0f793ca4067be2b0af2066 (patch)
tree4331fe1d5c10d2701ad53855d7db4be1ac046f56 /backends/platform/openpandora
parenta4cc70c5e138755f597e7432bafa95d64a91d1eb (diff)
downloadscummvm-rg350-a27c2b401c1027b94e0f793ca4067be2b0af2066.tar.gz
scummvm-rg350-a27c2b401c1027b94e0f793ca4067be2b0af2066.tar.bz2
scummvm-rg350-a27c2b401c1027b94e0f793ca4067be2b0af2066.zip
OPENPANDORA: Cleanup the format of code a little to match our Code Formatting Conventions.
* No functional changes. * Automated astyle pass.
Diffstat (limited to 'backends/platform/openpandora')
-rw-r--r--backends/platform/openpandora/op-backend.cpp112
-rw-r--r--backends/platform/openpandora/op-main.cpp2
-rw-r--r--backends/platform/openpandora/op-options.cpp8
-rw-r--r--backends/platform/openpandora/op-options.h2
-rw-r--r--backends/platform/openpandora/op-sdl.h2
5 files changed, 63 insertions, 63 deletions
diff --git a/backends/platform/openpandora/op-backend.cpp b/backends/platform/openpandora/op-backend.cpp
index 5231e9790d..dcec387f97 100644
--- a/backends/platform/openpandora/op-backend.cpp
+++ b/backends/platform/openpandora/op-backend.cpp
@@ -49,7 +49,7 @@
#include <limits.h>
#include <errno.h>
#include <sys/stat.h>
-#include <time.h> // for getTimeAndDate()
+#include <time.h> // for getTimeAndDate()
/* Dump console info to files. */
#define DUMP_STDOUT
@@ -97,7 +97,7 @@ void OSystem_OP::initBackend() {
// if (_mixer == 0) {
// _mixerManager = new DoubleBufferSDLMixerManager();
- // Setup and start mixer
+ // Setup and start mixer
// _mixerManager->init();
// }
@@ -123,49 +123,49 @@ void OSystem_OP::initBackend() {
_savefileManager = new DefaultSaveFileManager(savePath);
- #ifdef DUMP_STDOUT
- // The OpenPandora has a serial console on the EXT connection but most users do not use this so we
- // output all our STDOUT and STDERR to files for debug purposes.
- char STDOUT_FILE[PATH_MAX+1];
- char STDERR_FILE[PATH_MAX+1];
-
- strcpy(STDOUT_FILE, workDirName);
- strcpy(STDERR_FILE, workDirName);
- strcat(STDOUT_FILE, "/scummvm.stdout.txt");
- strcat(STDERR_FILE, "/scummvm.stderr.txt");
-
- // Flush the output in case anything is queued
- fclose(stdout);
- fclose(stderr);
-
- // Redirect standard input and standard output
- FILE *newfp = freopen(STDOUT_FILE, "w", stdout);
- if (newfp == NULL) {
- #if !defined(stdout)
- stdout = fopen(STDOUT_FILE, "w");
- #else
- newfp = fopen(STDOUT_FILE, "w");
- if (newfp) {
- *stdout = *newfp;
- }
- #endif
+#ifdef DUMP_STDOUT
+ // The OpenPandora has a serial console on the EXT connection but most users do not use this so we
+ // output all our STDOUT and STDERR to files for debug purposes.
+ char STDOUT_FILE[PATH_MAX+1];
+ char STDERR_FILE[PATH_MAX+1];
+
+ strcpy(STDOUT_FILE, workDirName);
+ strcpy(STDERR_FILE, workDirName);
+ strcat(STDOUT_FILE, "/scummvm.stdout.txt");
+ strcat(STDERR_FILE, "/scummvm.stderr.txt");
+
+ // Flush the output in case anything is queued
+ fclose(stdout);
+ fclose(stderr);
+
+ // Redirect standard input and standard output
+ FILE *newfp = freopen(STDOUT_FILE, "w", stdout);
+ if (newfp == NULL) {
+#if !defined(stdout)
+ stdout = fopen(STDOUT_FILE, "w");
+#else
+ newfp = fopen(STDOUT_FILE, "w");
+ if (newfp) {
+ *stdout = *newfp;
}
+#endif
+ }
- newfp = freopen(STDERR_FILE, "w", stderr);
- if (newfp == NULL) {
- #if !defined(stderr)
- stderr = fopen(STDERR_FILE, "w");
- #else
- newfp = fopen(STDERR_FILE, "w");
- if (newfp) {
- *stderr = *newfp;
- }
- #endif
+ newfp = freopen(STDERR_FILE, "w", stderr);
+ if (newfp == NULL) {
+#if !defined(stderr)
+ stderr = fopen(STDERR_FILE, "w");
+#else
+ newfp = fopen(STDERR_FILE, "w");
+ if (newfp) {
+ *stderr = *newfp;
}
+#endif
+ }
- setbuf(stderr, NULL);
- printf("%s\n", "Debug: STDOUT and STDERR redirected to text files.");
- #endif /* DUMP_STDOUT */
+ setbuf(stderr, NULL);
+ printf("%s\n", "Debug: STDOUT and STDERR redirected to text files.");
+#endif /* DUMP_STDOUT */
/* Trigger autosave every 4 minutes. */
ConfMan.registerDefault("autosave_period", 4 * 60);
@@ -187,7 +187,7 @@ void OSystem_OP::initBackend() {
_inited = true;
}
- // enable joystick
+// enable joystick
// if (joystick_num > -1 && SDL_NumJoysticks() > 0) {
// printf("Using joystick: %s\n", SDL_JoystickName(0));
// _joystick = SDL_JoystickOpen(joystick_num);
@@ -195,13 +195,13 @@ void OSystem_OP::initBackend() {
//
// setupMixer();
- // Note: We could implement a custom SDLTimerManager by using
- // SDL_AddTimer. That might yield better timer resolution, but it would
- // also change the semantics of a timer: Right now, ScummVM timers
- // *never* run in parallel, due to the way they are implemented. If we
- // switched to SDL_AddTimer, each timer might run in a separate thread.
- // However, not all our code is prepared for that, so we can't just
- // switch. Still, it's a potential future change to keep in mind.
+// Note: We could implement a custom SDLTimerManager by using
+// SDL_AddTimer. That might yield better timer resolution, but it would
+// also change the semantics of a timer: Right now, ScummVM timers
+// *never* run in parallel, due to the way they are implemented. If we
+// switched to SDL_AddTimer, each timer might run in a separate thread.
+// However, not all our code is prepared for that, so we can't just
+// switch. Still, it's a potential future change to keep in mind.
// _timer = new DefaultTimerManager();
// _timerID = SDL_AddTimer(10, &timer_handler, _timer);
@@ -217,9 +217,9 @@ void OSystem_OP::initSDL() {
if (SDL_Init(sdlFlags) == -1)
error("Could not initialize SDL: %s", SDL_GetError());
- uint8_t hiddenCursorData = 0;
+ uint8_t hiddenCursorData = 0;
- hiddenCursor = SDL_CreateCursor(&hiddenCursorData, &hiddenCursorData, 8, 1, 0, 0);
+ hiddenCursor = SDL_CreateCursor(&hiddenCursorData, &hiddenCursorData, 8, 1, 0, 0);
/* On the OpenPandora we need to work around an SDL assumption that
returns relative mouse coordinates when you get to the screen
@@ -277,11 +277,11 @@ void OSystem_OP::quit() {
SDL_FreeCursor(hiddenCursor);
- #ifdef DUMP_STDOUT
- printf("%s\n", "Debug: STDOUT and STDERR text files closed.");
- fclose(stdout);
- fclose(stderr);
- #endif /* DUMP_STDOUT */
+#ifdef DUMP_STDOUT
+ printf("%s\n", "Debug: STDOUT and STDERR text files closed.");
+ fclose(stdout);
+ fclose(stderr);
+#endif /* DUMP_STDOUT */
OSystem_POSIX::quit();
}
diff --git a/backends/platform/openpandora/op-main.cpp b/backends/platform/openpandora/op-main.cpp
index bb359e7204..ebe018f570 100644
--- a/backends/platform/openpandora/op-main.cpp
+++ b/backends/platform/openpandora/op-main.cpp
@@ -43,7 +43,7 @@ int main(int argc, char *argv[]) {
int res = scummvm_main(argc, argv);
// Free OSystem
- delete (OSystem_OP *)g_system;
+ delete(OSystem_OP *)g_system;
return res;
}
diff --git a/backends/platform/openpandora/op-options.cpp b/backends/platform/openpandora/op-options.cpp
index c60ba58cc7..58f0fb7188 100644
--- a/backends/platform/openpandora/op-options.cpp
+++ b/backends/platform/openpandora/op-options.cpp
@@ -31,9 +31,9 @@ namespace OP {
enum {
/* Touchscreen TapMode */
- TAPMODE_LEFT = 0,
- TAPMODE_RIGHT = 1,
- TAPMODE_HOVER = 2
+ TAPMODE_LEFT = 0,
+ TAPMODE_RIGHT = 1,
+ TAPMODE_HOVER = 2
};
int tapmodeLevel = TAPMODE_LEFT;
@@ -47,7 +47,7 @@ void ToggleTapMode() {
tapmodeLevel = TAPMODE_LEFT;
} else {
tapmodeLevel = TAPMODE_LEFT;
- }
+ }
}
} /* namespace OP */
diff --git a/backends/platform/openpandora/op-options.h b/backends/platform/openpandora/op-options.h
index ebc83ca00c..919d217f4b 100644
--- a/backends/platform/openpandora/op-options.h
+++ b/backends/platform/openpandora/op-options.h
@@ -32,7 +32,7 @@ namespace OP {
extern int tapmodeLevel;
-extern void ToggleTapMode();
+extern void ToggleTapMode();
} /* namespace OP */
diff --git a/backends/platform/openpandora/op-sdl.h b/backends/platform/openpandora/op-sdl.h
index d493c3957c..8cccbb5f86 100644
--- a/backends/platform/openpandora/op-sdl.h
+++ b/backends/platform/openpandora/op-sdl.h
@@ -34,7 +34,7 @@
//#define MIXER_DOUBLE_BUFFERING 1
#ifndef PATH_MAX
- #define PATH_MAX 255
+#define PATH_MAX 255
#endif
class OSystem_OP : public OSystem_POSIX {