Prevent manual screen rotation after application launch

svn-id: r29779
This commit is contained in:
Chris Apers 2007-12-09 11:08:23 +00:00
parent 0aaf5587db
commit a8a1cbf15a
3 changed files with 9 additions and 2 deletions

View File

@ -144,7 +144,7 @@ private:
void clearSoundCallback();
protected:
UInt16 _sysOldCoord, _sysOldOrientation;
UInt16 _sysOldCoord, _sysOldOrientation, _sysOldTriggerState;
Boolean _stretched, _cursorPaletteDisabled;
enum {

View File

@ -71,8 +71,10 @@ void OSystem_PalmOS5::load_gfx_mode() {
if (OPTIONS_TST(kOptModeRotatable)) {
_sysOldOrientation = __68K(SysGetOrientation());
_sysOldTriggerState = __68K(PINGetInputTriggerState());
__68K(SysSetOrientation(sysOrientationLandscape));
__68K(SysSetOrientationTriggerState(sysOrientationTriggerDisabled));
__68K(PINSetInputTriggerState(pinInputTriggerDisabled));
}
gVars->indicator.on = RGBToColor(0,255,0);
@ -178,8 +180,10 @@ void OSystem_PalmOS5::unload_gfx_mode() {
WinScreenMode(winScreenModeSet, NULL, NULL, &depth, NULL);
clearScreen();
if (OPTIONS_TST(kOptModeRotatable))
if (OPTIONS_TST(kOptModeRotatable)) {
__68K(PINSetInputTriggerState(_sysOldTriggerState));
__68K(SysSetOrientation(_sysOldOrientation));
}
WinSetCoordinateSystem(_sysOldCoord);
}

View File

@ -66,8 +66,10 @@ void OSystem_PalmZodiac::load_gfx_mode() {
WinScreenMode(winScreenModeSet, NULL, NULL, &depth, NULL);
_sysOldOrientation = SysGetOrientation();
_sysOldTriggerState = PINGetInputTriggerState();
SysSetOrientation(sysOrientationLandscape);
SysSetOrientationTriggerState(sysOrientationTriggerDisabled);
PINSetInputTriggerState(pinInputTriggerDisabled);
gVars->indicator.on = RGBToColor(0,255,0);
gVars->indicator.off = RGBToColor(0,0,0);
@ -190,6 +192,7 @@ void OSystem_PalmZodiac::unload_gfx_mode() {
MemPtrFree(_offScreenP);
PINSetInputTriggerState(_sysOldTriggerState);
SysSetOrientation(_sysOldOrientation);
StatShow();
PINSetInputAreaState(pinInputAreaOpen);