aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/PalmOS/Src/os5_gfx.cpp
diff options
context:
space:
mode:
authorChris Apers2007-05-01 10:12:55 +0000
committerChris Apers2007-05-01 10:12:55 +0000
commit4624769069de808ef0aa561d53700c1bf5c7279e (patch)
tree99f20fba5a3e26114d7735550699f79ec02fd9f2 /backends/platform/PalmOS/Src/os5_gfx.cpp
parent532311576e053c7a5e08c620cac71d74b976be8b (diff)
downloadscummvm-rg350-4624769069de808ef0aa561d53700c1bf5c7279e.tar.gz
scummvm-rg350-4624769069de808ef0aa561d53700c1bf5c7279e.tar.bz2
scummvm-rg350-4624769069de808ef0aa561d53700c1bf5c7279e.zip
- Prevent lose of events
- Added hard arrow keys support - Revamped mouse code to prevent duplication and get rid of fixed size mouse buffer - Reviewed event code (more work needed for OS5 and keyup emulation) - Cleanup svn-id: r26699
Diffstat (limited to 'backends/platform/PalmOS/Src/os5_gfx.cpp')
-rw-r--r--backends/platform/PalmOS/Src/os5_gfx.cpp53
1 files changed, 15 insertions, 38 deletions
diff --git a/backends/platform/PalmOS/Src/os5_gfx.cpp b/backends/platform/PalmOS/Src/os5_gfx.cpp
index 295c753604..c68e5ea8c7 100644
--- a/backends/platform/PalmOS/Src/os5_gfx.cpp
+++ b/backends/platform/PalmOS/Src/os5_gfx.cpp
@@ -28,11 +28,6 @@
#include <PenInputMgr.h>
#include <palmOneResources.h>
-#ifdef PALMOS_ARM
-#include <System/WIP.h>
-#include <Libraries/AIA/palmOneStatusBarMgrARM.h>
-#endif
-
#include "oscalls.h"
void OSystem_PalmOS5::int_initSize(uint w, uint h) {
@@ -63,8 +58,6 @@ void OSystem_PalmOS5::load_gfx_mode() {
_ratio.width = (gVars->screenFullHeight * _screenWidth / _screenHeight);
_ratio.height = (gVars->screenFullWidth * _screenHeight / _screenWidth);
- _mouseBackupP = (byte *)MemPtrNew(MAX_MOUSE_W * MAX_MOUSE_H * 2); // *2 if 16bit
- _mouseDataP = (byte *)MemPtrNew(MAX_MOUSE_W * MAX_MOUSE_H);
_offScreenP = (byte *)malloc(_screenWidth * _screenHeight);
MemSet(_offScreenP, _screenWidth * _screenHeight, 0);
@@ -75,6 +68,11 @@ void OSystem_PalmOS5::load_gfx_mode() {
WinScreenMode(winScreenModeSet, NULL, NULL, &depth, NULL);
clearScreen();
+ if (OPTIONS_TST(kOptModeRotatable)) {
+ _sysOldOrientation = __68K(SysGetOrientation());
+ __68K(SysSetOrientation(sysOrientationLandscape));
+ }
+
gVars->indicator.on = RGBToColor(0,255,0);
gVars->indicator.off = RGBToColor(0,0,0);
@@ -97,13 +95,6 @@ void OSystem_PalmOS5::hotswap_gfx_mode(int mode) {
if (_mode != GFX_NORMAL && !_isSwitchable)
return;
-#ifdef PALMOS_ARM
- UInt32 device;
- Boolean isT3 = false;
- if (!FtrGet(sysFileCSystem, sysFtrNumOEMDeviceID, &device))
- isT3 = (device == kPalmOneDeviceIDTungstenT3);
-#endif
-
if (_workScreenH)
WinDeleteWindow(_workScreenH, false);
_workScreenH = NULL;
@@ -117,17 +108,9 @@ void OSystem_PalmOS5::hotswap_gfx_mode(int mode) {
_stretched = (_screenWidth > gVars->screenWidth);
if (OPTIONS_TST(kOptCollapsible)) {
-#ifdef PALMOS_ARM
- if (isT3) {
- //AiaSetInputAreaState(aiaInputAreaShow);
- StatShow_68k();
- PINSetInputAreaState_68k(pinInputAreaOpen);
- } else
-#endif
- {
- StatShow();
- PINSetInputAreaState(pinInputAreaOpen);
- }
+ //AiaSetInputAreaState(aiaInputAreaShow); // For T3 ??
+ __68K(StatShow());
+ __68K(PINSetInputAreaState(pinInputAreaOpen));
}
if (_stretched) {
@@ -143,18 +126,10 @@ void OSystem_PalmOS5::hotswap_gfx_mode(int mode) {
_stretched = true;
if (OPTIONS_TST(kOptCollapsible)) {
-#ifdef PALMOS_ARM
// T3 DIA library is 68k base, there is no possible native call
- if (isT3) {
- //AiaSetInputAreaState(aiaInputAreaFullScreen);
- PINSetInputAreaState_68k(pinInputAreaClosed);
- StatHide_68k();
- } else
-#endif
- {
- PINSetInputAreaState(pinInputAreaClosed);
- StatHide();
- }
+ //AiaSetInputAreaState(aiaInputAreaFullScreen);
+ __68K(PINSetInputAreaState(pinInputAreaClosed));
+ __68K(StatHide());
}
calc_rect(true);
@@ -182,8 +157,7 @@ void OSystem_PalmOS5::unload_gfx_mode() {
return;
_gfxLoaded = false;
- MemPtrFree(_mouseBackupP);
- MemPtrFree(_mouseDataP);
+ // mouse data freed in quit()
free(_offScreenP);
if (_workScreenH)
@@ -198,6 +172,9 @@ void OSystem_PalmOS5::unload_gfx_mode() {
WinScreenMode(winScreenModeSet, NULL, NULL, &depth, NULL);
clearScreen();
+ if (OPTIONS_TST(kOptModeRotatable))
+ __68K(SysSetOrientation(_sysOldOrientation));
+
WinSetCoordinateSystem(_sysOldCoord);
}