aboutsummaryrefslogtreecommitdiff
path: root/backends/PalmOS/Src/init_palmos.cpp
diff options
context:
space:
mode:
authorChris Apers2004-11-09 10:45:47 +0000
committerChris Apers2004-11-09 10:45:47 +0000
commit618971dd2fbee8b075b7c888f3abdff8aba47897 (patch)
tree50350983581f5ba727b372d6dca7b611dcef3994 /backends/PalmOS/Src/init_palmos.cpp
parent463544099832fd8af37b813afc7c3fffc96e78aa (diff)
downloadscummvm-rg350-618971dd2fbee8b075b7c888f3abdff8aba47897.tar.gz
scummvm-rg350-618971dd2fbee8b075b7c888f3abdff8aba47897.tar.bz2
scummvm-rg350-618971dd2fbee8b075b7c888f3abdff8aba47897.zip
Gathered common functions into new source files
svn-id: r15743
Diffstat (limited to 'backends/PalmOS/Src/init_palmos.cpp')
-rw-r--r--backends/PalmOS/Src/init_palmos.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/backends/PalmOS/Src/init_palmos.cpp b/backends/PalmOS/Src/init_palmos.cpp
new file mode 100644
index 0000000000..8bfcb08627
--- /dev/null
+++ b/backends/PalmOS/Src/init_palmos.cpp
@@ -0,0 +1,44 @@
+#include <PalmOS.h>
+
+#include "globals.h"
+#include "init_palmos.h"
+
+static UInt16 autoOffDelay;
+
+void PalmInit(UInt8 init) {
+ // set screen depth
+ UInt32 depth = 8;
+ WinScreenMode(winScreenModeSet, NULL, NULL, &depth, NULL);
+
+ if (init & INIT_AUTOOFF) {
+ autoOffDelay = SysSetAutoOffTime(0);
+ EvtResetAutoOffTimer();
+ }
+
+}
+
+void PalmRelease(UInt8 init) {
+ SysSetAutoOffTime(autoOffDelay);
+ EvtResetAutoOffTimer();
+}
+
+Err PalmHRInit(UInt32 depth) {
+ Err e;
+ UInt32 width = 320;
+ UInt32 height = 320;
+ Boolean color = true;
+
+ e = WinScreenMode (winScreenModeSet, &width, &height, &depth, &color);
+
+ if (!e) {
+ UInt32 attr;
+ WinScreenGetAttribute(winScreenDensity, &attr);
+ e = (attr != kDensityDouble);
+ }
+
+ return e;
+}
+
+void PalmHRRelease() {
+ // should i do something here ?
+} \ No newline at end of file