aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Apers2005-11-05 11:51:06 +0000
committerChris Apers2005-11-05 11:51:06 +0000
commitb39c659a7bd030b958100f407574d85146ced712 (patch)
tree18e0db65a079c4340d66af13da75ca9435ca1645
parent9e72bab04c7f104778914f7ccfe5aa8f17bae376 (diff)
downloadscummvm-rg350-b39c659a7bd030b958100f407574d85146ced712.tar.gz
scummvm-rg350-b39c659a7bd030b958100f407574d85146ced712.tar.bz2
scummvm-rg350-b39c659a7bd030b958100f407574d85146ced712.zip
Cleanup
svn-id: r19458
-rw-r--r--backends/PalmOS/Src/games.cpp48
-rw-r--r--backends/PalmOS/Src/games.h6
-rw-r--r--backends/PalmOS/Src/skin.cpp76
-rw-r--r--backends/PalmOS/Src/start.cpp102
4 files changed, 92 insertions, 140 deletions
diff --git a/backends/PalmOS/Src/games.cpp b/backends/PalmOS/Src/games.cpp
index 8db4fc03c4..5a7b8ef36a 100644
--- a/backends/PalmOS/Src/games.cpp
+++ b/backends/PalmOS/Src/games.cpp
@@ -38,7 +38,7 @@ DmOpenRef gameDB = NULL;
static Err GamUpdateList() {
if (gameDB) {
UInt16 numRecs = DmNumRecords(gameDB);
-
+
if (numRecs > 0) {
MemHandle tmpH;
UInt32 version, size;
@@ -57,7 +57,7 @@ static Err GamUpdateList() {
GameInfoType gitCur;
void *tmpP;
FormPtr ofmP, frmP;
-
+
// show dialog
ofmP = FrmGetActiveForm();
frmP = FrmInitForm(ConvertForm);
@@ -154,13 +154,13 @@ static Err GamUpdateList() {
DmWrite(tmpP, 0, &gitCur, sizeof(GameInfoType));
MemPtrUnlock(tmpP);
}
-
+
} else if (version == itemVersion_20) {
// need conversion from V2 -> V3.4
GameInfoTypeV2 git0;
for (index = 0; index < numRecs; index++) {
-
+
// get old data
tmpH = DmQueryRecord(gameDB, index);
tmpP = MemHandleLock(tmpH);
@@ -175,7 +175,7 @@ static Err GamUpdateList() {
StrCopy(gitCur.pathP, git0.pathP);
StrCopy(gitCur.gameP, git0.gameP);
gitCur.gfxMode = (git0.gfxMode == 3 ? 1 : 0); // v3.4 only 2 modes
-
+
gitCur.autoLoad = git0.autoLoad;
gitCur.bootParam = git0.bootParam;
gitCur.setPlatform = git0.setPlatform;
@@ -193,11 +193,11 @@ static Err GamUpdateList() {
gitCur.musicInfo.volume.sfx = 192;
gitCur.musicInfo.volume.speech = 192;
gitCur.musicInfo.volume.audiocd = 50;
-
+
gitCur.musicInfo.sound.tempo = 100;
gitCur.musicInfo.sound.defaultTrackLength = 10;
gitCur.musicInfo.sound.firstTrack = 1;
-
+
// to V3.4
if (gitCur.platform == 2) gitCur.platform = 6;
else if (gitCur.platform == 5) gitCur.platform = 8;
@@ -216,12 +216,12 @@ static Err GamUpdateList() {
else if (gitCur.language == 11) gitCur.language = 12;
else if (gitCur.language == 12) gitCur.language = 2;
else if (gitCur.language == 13) gitCur.language = 3;
-
+
if (gitCur.musicInfo.sound.drvMusic == 1) gitCur.musicInfo.sound.drvMusic = 4;
else if (gitCur.musicInfo.sound.drvMusic == 2) gitCur.musicInfo.sound.drvMusic = 5;
else if (gitCur.musicInfo.sound.drvMusic == 4) gitCur.musicInfo.sound.drvMusic = 2;
else if (gitCur.musicInfo.sound.drvMusic == 5) gitCur.musicInfo.sound.drvMusic = 1;
-
+
gitCur.engine = ENGINE_SCUMM;
tmpH = DmResizeRecord(gameDB, index, sizeof(GameInfoType)); // TODO : check error on resize tmpH==NULL
@@ -234,7 +234,7 @@ static Err GamUpdateList() {
GameInfoTypeV0 git0;
for (index = 0; index < numRecs; index++) {
-
+
// get old data
tmpH = DmQueryRecord(gameDB, index);
tmpP = MemHandleLock(tmpH);
@@ -249,7 +249,7 @@ static Err GamUpdateList() {
StrCopy(gitCur.pathP, git0.pathP);
StrCopy(gitCur.gameP, git0.gameP);
gitCur.gfxMode = (git0.gfxMode == 3 ? 1 : 0); // v3.4 only 2 modes
-
+
gitCur.autoLoad = git0.autoLoad;
gitCur.bootParam = git0.bootParam;
gitCur.setPlatform = git0.amiga; // amiga become platform amiga/atari-st/machintosh
@@ -267,11 +267,11 @@ static Err GamUpdateList() {
gitCur.musicInfo.volume.sfx = 192;
gitCur.musicInfo.volume.speech = 192;
gitCur.musicInfo.volume.audiocd = 50;
-
+
gitCur.musicInfo.sound.tempo = 100;
gitCur.musicInfo.sound.defaultTrackLength = 10;
gitCur.musicInfo.sound.firstTrack = 1;
-
+
gitCur.engine = ENGINE_SCUMM;
tmpH = DmResizeRecord(gameDB, index, sizeof(GameInfoType)); // TODO : check error on resize tmpH==NULL
@@ -288,7 +288,7 @@ static Err GamUpdateList() {
}
}
}
-
+
return errNone;
}
@@ -301,7 +301,7 @@ Err GamOpenDatabase() {
err = DmCreateDatabase(0, "ScummVM-Data", appFileCreator, 'DATA', false);
if (!err) {
gameDB = DmOpenDatabaseByTypeCreator( 'DATA', appFileCreator, dmModeReadWrite);
-
+
if (!gameDB)
err = DmGetLastErr();
}
@@ -319,7 +319,7 @@ void GamImportDatabase() {
if (gPrefs->card.volRefNum != sysInvalidRefNum && gPrefs->card.moveDB) {
FileRef file;
Err e;
-
+
e = VFSFileOpen(gPrefs->card.volRefNum, "/Palm/Programs/ScummVM/listdata.pdb", vfsModeRead, &file);
if (!e) {
UInt16 oCardNo, nCardNo;
@@ -332,7 +332,7 @@ void GamImportDatabase() {
gPrefs->card.moveDB = false;
return;
}
-
+
// get current db info and rename it
DmOpenDatabaseInfo(gameDB, &oDbID, 0, 0, &oCardNo, 0);
GamCloseDatabase(true);
@@ -351,7 +351,7 @@ void GamCloseDatabase(Boolean ignoreCardParams) {
if (gameDB) {
LocalID dbID;
UInt16 cardNo;
-
+
DmOpenDatabaseInfo(gameDB, &dbID, 0, 0, &cardNo, 0);
DmCloseDatabase(gameDB);
@@ -387,13 +387,13 @@ void GamUnselect() {
UInt16 index;
index = GamGetSelected();
-
+
if (index != dmMaxRecordIndex) {
Boolean newValue;
-
+
recordH = DmGetRecord(gameDB, index);
game = (GameInfoType *)MemHandleLock(recordH);
-
+
newValue = false;
DmWrite(game, OffsetOf(GameInfoType,selected), &newValue, sizeof(Boolean));
@@ -407,7 +407,7 @@ UInt16 GamGetSelected() {
GameInfoType *game;
Boolean selected;
UInt16 index = DmNumRecords(gameDB)-1;
-
+
while (index != (UInt16)-1) {
record = DmQueryRecord(gameDB, index);
game = (GameInfoType *)MemHandleLock(record);
@@ -434,7 +434,7 @@ Boolean GamJumpTo(Char letter) {
while (index < maxIndex) {
record = DmGetRecord(gameDB, index);
game = (GameInfoType *)MemHandleLock(record);
-
+
if (tolower(game->nameP[0]) == tolower(letter)) {
found = true;
@@ -458,7 +458,7 @@ Boolean GamJumpTo(Char letter) {
DmReleaseRecord (gameDB, index, 0);
index++;
-
+
if (found)
return found;
}
diff --git a/backends/PalmOS/Src/games.h b/backends/PalmOS/Src/games.h
index 60a51cc7f3..596bb8e02f 100644
--- a/backends/PalmOS/Src/games.h
+++ b/backends/PalmOS/Src/games.h
@@ -91,7 +91,7 @@ typedef struct {
UInt16 speech;
UInt16 audiocd;
} volume;
-
+
struct {
// midi
Boolean multiMidi;
@@ -130,11 +130,11 @@ typedef struct {
UInt16 talkValue;
UInt8 platform;
UInt8 language; // |- v2.5
-
+
Boolean filter; // v2.6
Boolean fullscreen; // |
Boolean aspectRatio; // |- v2.7
-
+
MusicInfoType musicInfo;// v3.0
UInt8 engine; // |- v3.1
diff --git a/backends/PalmOS/Src/skin.cpp b/backends/PalmOS/Src/skin.cpp
index 05470acd34..b388a6c246 100644
--- a/backends/PalmOS/Src/skin.cpp
+++ b/backends/PalmOS/Src/skin.cpp
@@ -34,12 +34,6 @@ UInt16 lastIndex = dmMaxRecordIndex; // last select index in the list to prevent
static WinHandle winLockH = NULL;
MemPtr SknScreenLock(WinLockInitType initMode) {
-/* if (!OPTIONS_TST(kOptDeviceZodiac)) {
- WinSetDrawWindow(WinGetDisplayWindow());
- // WARNING : this doesn't work on < OS5 with 16bit mode
- return WinScreenLock(initMode);
- }
-*/
Err e;
RectangleType r;
@@ -54,12 +48,6 @@ MemPtr SknScreenLock(WinLockInitType initMode) {
}
void SknScreenUnlock() {
-/* if (!OPTIONS_TST(kOptDeviceZodiac)) {
- WinSetDrawWindow(WinGetDisplayWindow());
- WinScreenUnlock();
- return;
- }
-*/
RectangleType r;
WinGetBounds(winLockH, &r);
@@ -81,13 +69,13 @@ static void SknGetListColors(DmOpenRef skinDBP, UInt8 *text, UInt8 *selected, UI
if (skinDBP) {
colIndex = DmFindResource (skinDBP, sknColorsRsc, skinColors, NULL);
-
+
if (colIndex != (UInt16)-1) {
colH = DmGetResourceIndex(skinDBP, colIndex);
-
+
if (colH) {
colTemp = (UInt8 *)MemHandleLock(colH);
-
+
*text = colTemp[0];
*selected = colTemp[1];
*background = colTemp[2];
@@ -113,7 +101,7 @@ static void SknCopyBits(DmOpenRef skinDBP, DmResID bitmapID, const RectangleType
if (index != (UInt16)-1) {
hTemp = DmGetResourceIndex(skinDBP,index);
-
+
if (hTemp) {
bmpTemp = (BitmapType *)MemHandleLock(hTemp);
BmpGlueGetDimensions(bmpTemp, &bw, &bh, 0);
@@ -129,20 +117,20 @@ static void SknCopyBits(DmOpenRef skinDBP, DmResID bitmapID, const RectangleType
cw = srcRect->extent.x;
ch = srcRect->extent.y;
}
-
+
if (ch) {
WinGetClip(&old);
if (OPTIONS_TST(kOptModeHiDensity)) {
Err e;
BitmapTypeV3 *bmp2P;
-
+
// create an uncompressed version of the bitmap
WinHandle win = WinCreateOffscreenWindow(bw, bh, screenFormat, &e);
WinHandle old = WinGetDrawWindow();
WinSetDrawWindow(win);
WinDrawBitmap(bmpTemp, 0, 0);
WinSetDrawWindow(old);
-
+
bmp2P = BmpCreateBitmapV3(WinGetBitmap(win), kDensityDouble, BmpGetBits(WinGetBitmap(win)), NULL);
copy.topLeft.x = destX / 2;
@@ -184,7 +172,7 @@ void SknApplySkin() {
SknScreenLock(winLockCopy);
skinDBP = SknOpenSkin();
-
+
if (gPrefs->card.volRefNum != sysInvalidRefNum)
FrmShowObject(frmP, FrmGetObjectIndex (frmP, MainMSBitMap));
else
@@ -199,7 +187,7 @@ void SknApplySkin() {
SknCopyBits(skinDBP, skinBackgroundImageTop, 0, r.topLeft.x, r.topLeft.y);
SknGetObjectBounds(skinDBP, skinBackgroundImageBottom, &r);
SknCopyBits(skinDBP, skinBackgroundImageBottom, 0, r.topLeft.x, r.topLeft.y);
-
+
for (UInt16 resID = 1100; resID <= 7000; resID += 100) {
SknSetState(skinDBP, resID, sknStateNormal);
SknShowObject(skinDBP, resID);
@@ -218,29 +206,29 @@ void SknGetObjectBounds(DmOpenRef skinDBP, DmResID resID, RectangleType *rP) {
UInt8 *strTemp;
RctSetRectangle(rP, 0, 0, 0, 0);
-
+
if (skinDBP) {
bmpIndex = DmFindResource (skinDBP, bitmapRsc, resID, NULL);
-
+
if (bmpIndex != (UInt16)-1) { // if bmp exists
strIndex = DmFindResource (skinDBP, sknPosRsc, resID, NULL);
-
+
if (strIndex != (UInt16)-1) { // if params exist
hBmp = DmGetResourceIndex(skinDBP,bmpIndex);
if (hBmp) {
hStr = DmGetResourceIndex(skinDBP,strIndex);
-
+
if (hStr) {
// buttons : state|x|y|w/h slider|draw mode|x1/y1 keep|x2/y2 keep slider
// list (160mode) : state|x|y|w|h|
bmpTemp = (BitmapType *)MemHandleLock(hBmp);
strTemp = (UInt8 *)MemHandleLock(hStr);
-
+
BmpGlueGetDimensions(bmpTemp, &(rP->extent.x), &(rP->extent.y), 0);
rP->topLeft.x = strTemp[sknInfoPosX] * 2;
rP->topLeft.y = strTemp[sknInfoPosY] * 2;
-
+
MemPtrUnlock(strTemp);
DmReleaseResource(hStr);
}
@@ -271,18 +259,18 @@ UInt8 SknSetState(DmOpenRef skinDBP, DmResID resID, UInt8 newState) {
if (skinDBP) {
index = DmFindResource (skinDBP, sknPosRsc, resID, NULL);
-
+
if (index != (UInt16)-1) {
hStr = DmGetResourceIndex(skinDBP, index);
-
+
if (hStr) {
strTemp = (UInt8 *)MemHandleLock(hStr);
oldState = strTemp[sknInfoState];
-
+
if (oldState != newState) {
DmWrite(strTemp, 0, &newState, 1);
}
-
+
MemPtrUnlock(strTemp);
DmReleaseResource(hStr);
}
@@ -300,10 +288,10 @@ UInt8 SknGetDepth(DmOpenRef skinDBP) {
if (skinDBP) {
index = DmFindResource (skinDBP, sknDepthRsc, skinDepth, NULL);
-
+
if (index != (UInt16)-1) {
hStr = DmGetResourceIndex(skinDBP, index);
-
+
if (hStr) {
strTemp = (UInt8 *)MemHandleLock(hStr);
depth = *strTemp;
@@ -312,12 +300,11 @@ UInt8 SknGetDepth(DmOpenRef skinDBP) {
}
}
}
-
+
return depth;
}
UInt8 SknGetState(DmOpenRef skinDBP, DmResID resID) {
-
UInt16 index;
MemHandle hStr;
UInt8 *strTemp;
@@ -325,10 +312,10 @@ UInt8 SknGetState(DmOpenRef skinDBP, DmResID resID) {
if (skinDBP) {
index = DmFindResource (skinDBP, sknPosRsc, resID, NULL);
-
+
if (index != (UInt16)-1) {
hStr = DmGetResourceIndex(skinDBP, index);
-
+
if (hStr) {
strTemp = (UInt8 *)MemHandleLock(hStr);
oldState = strTemp[sknInfoState];
@@ -342,7 +329,6 @@ UInt8 SknGetState(DmOpenRef skinDBP, DmResID resID) {
}
void SknShowObject(DmOpenRef skinDBP, DmResID resID) {
-
RectangleType r;
UInt8 state = SknGetState(skinDBP, resID);
SknGetObjectBounds(skinDBP, resID, &r);
@@ -359,7 +345,7 @@ void SknGetListBounds(RectangleType *rAreaP, RectangleType *rArea2xP) {
skinDBP = DmOpenDatabase(gPrefs->skin.cardNo, gPrefs->skin.dbID, dmModeReadOnly);
if (skinDBP) {
strIndex = DmFindResource (skinDBP, sknPosRsc, skinList, NULL);
-
+
if (strIndex != 0xFFFF) { // if params exist
hStr = DmGetResourceIndex(skinDBP,strIndex);
if (hStr) {
@@ -369,7 +355,7 @@ void SknGetListBounds(RectangleType *rAreaP, RectangleType *rArea2xP) {
y = strTemp[sknInfoPosY];
w = strTemp[sknInfoListWidth];
h = strTemp[sknInfoListSize] * sknInfoListItemSize;
-
+
if (rAreaP)
RctSetRectangle(rAreaP ,x, y, w, h);
if (rArea2xP)
@@ -377,7 +363,6 @@ void SknGetListBounds(RectangleType *rAreaP, RectangleType *rArea2xP) {
MemHandleUnlock(hStr);
DmReleaseResource(hStr);
-
}
}
@@ -448,7 +433,7 @@ void SknUpdateList() {
UInt8 txtColor, norColor, selColor, bkgColor;
UInt16 x,y;
-
+
SknScreenLock(winLockCopy);
SknGetListBounds(&rArea, &rArea2x);
@@ -550,9 +535,8 @@ UInt16 SknCheckClick(DmOpenRef skinDBP, Coord mx, Coord my) {
}
}
}
-
}
-
+
return 0;
}
@@ -573,7 +557,7 @@ void SknSelect(Coord x, Coord y) {
if (index < DmNumRecords(gameDB)) {
Boolean newValue;
-
+
oldIndex = GamGetSelected();
if (oldIndex != index && oldIndex != dmMaxRecordIndex)
@@ -587,7 +571,7 @@ void SknSelect(Coord x, Coord y) {
MemHandleUnlock(record);
DmReleaseRecord (gameDB, index, 0);
-
+
lastIndex = index;
SknUpdateList();
}
diff --git a/backends/PalmOS/Src/start.cpp b/backends/PalmOS/Src/start.cpp
index 1ad17596da..c60e48065e 100644
--- a/backends/PalmOS/Src/start.cpp
+++ b/backends/PalmOS/Src/start.cpp
@@ -31,12 +31,6 @@
#include "skin.h"
#include "forms.h"
-/***********************************************************************
- *
- * Internal Structures
- *
- ***********************************************************************/
-
/***********************************************************************
*
@@ -60,7 +54,6 @@ Boolean bLaunched = false;
#define kOurMinVersion sysMakeROMVersion(3,5,0,sysROMStageRelease,0)
#define kPalmOS10Version sysMakeROMVersion(1,0,0,sysROMStageRelease,0)
-
/***********************************************************************
*
* Internal Functions
@@ -68,15 +61,13 @@ Boolean bLaunched = false;
***********************************************************************/
// Callback for ExgDBWrite to send data with Exchange Manager
-static Err WriteDBData(const void* dataP, UInt32* sizeP, void* userDataP)
-{
+static Err WriteDBData(const void* dataP, UInt32* sizeP, void* userDataP) {
Err err;
*sizeP = ExgSend((ExgSocketPtr)userDataP, (void*)dataP, *sizeP, &err);
return err;
}
-Err SendDatabase (UInt16 cardNo, LocalID dbID, Char *nameP, Char *descriptionP)
-{
+Err SendDatabase (UInt16 cardNo, LocalID dbID, Char *nameP, Char *descriptionP) {
ExgSocketType exgSocket;
Err err;
@@ -104,9 +95,9 @@ Err SendDatabase (UInt16 cardNo, LocalID dbID, Char *nameP, Char *descriptionP)
* minimum requirement.
*
* PARAMETERS: requiredVersion - minimum rom version required
- * (see sysFtrNumROMVersion in SystemMgr.h
+ * (see sysFtrNumROMVersion in SystemMgr.h
* for format)
- * launchFlags - flags that indicate if the application
+ * launchFlags - flags that indicate if the application
* UI is initialized.
*
* RETURNED: error code or zero if rom is compatible
@@ -115,28 +106,25 @@ Err SendDatabase (UInt16 cardNo, LocalID dbID, Char *nameP, Char *descriptionP)
*
*
***********************************************************************/
-static Err RomVersionCompatible(UInt32 requiredVersion, UInt16 launchFlags)
-{
+static Err RomVersionCompatible(UInt32 requiredVersion, UInt16 launchFlags) {
UInt32 romVersion;
// See if we're on in minimum required version of the ROM or later.
FtrGet(sysFtrCreator, sysFtrNumROMVersion, &romVersion);
- if (romVersion < requiredVersion)
- {
+ if (romVersion < requiredVersion) {
if ((launchFlags & (sysAppLaunchFlagNewGlobals | sysAppLaunchFlagUIApp)) ==
- (sysAppLaunchFlagNewGlobals | sysAppLaunchFlagUIApp))
- {
+ (sysAppLaunchFlagNewGlobals | sysAppLaunchFlagUIApp)) {
+
FrmAlert (RomIncompatibleAlert);
- // Palm OS 1.0 will continuously relaunch this app unless we switch to
+ // Palm OS 1.0 will continuously relaunch this app unless we switch to
// another safe one.
if (romVersion <= kPalmOS10Version)
- {
AppLaunchWithCommand(sysFileCDefaultApp, sysAppLaunchCmdNormalLaunch, NULL);
- }
- }
- return sysErrRomIncompatible;
+
}
+ return sysErrRomIncompatible;
+ }
return errNone;
}
@@ -168,13 +156,11 @@ void SavePrefs() {
*
*
***********************************************************************/
-static Boolean AppHandleEvent(EventPtr eventP)
-{
+static Boolean AppHandleEvent(EventPtr eventP) {
UInt16 formId;
FormPtr frmP;
- if (eventP->eType == frmLoadEvent)
- {
+ if (eventP->eType == frmLoadEvent) {
// Load the form resource.
formId = eventP->data.frmLoad.formID;
frmP = FrmInitForm(formId);
@@ -183,8 +169,7 @@ static Boolean AppHandleEvent(EventPtr eventP)
// Set the event handler for the form. The handler of the currently
// active form is called by FrmHandleEvent each time is receives an
// event.
- switch (formId)
- {
+ switch (formId) {
case MainForm:
FrmSetEventHandler(frmP, MainFormHandleEvent);
break;
@@ -216,11 +201,10 @@ static Boolean AppHandleEvent(EventPtr eventP)
default:
// ErrFatalDisplay("Invalid Form Load Event");
break;
-
- }
+ }
return true;
}
-
+
return false;
}
@@ -228,7 +212,7 @@ static Boolean AppHandleEvent(EventPtr eventP)
*
* FUNCTION: AppEventLoop
*
- * DESCRIPTION: This routine is the event loop for the application.
+ * DESCRIPTION: This routine is the event loop for the application.
*
* PARAMETERS: nothing
*
@@ -238,8 +222,7 @@ static Boolean AppHandleEvent(EventPtr eventP)
*
*
***********************************************************************/
-static void AppEventLoop(void)
-{
+static void AppEventLoop(void) {
UInt16 error;
EventType event;
@@ -263,8 +246,8 @@ static void AppEventLoop(void)
*
* DESCRIPTION: This is the main entry point for the application.
*
- * PARAMETERS: cmd - word value specifying the launch code.
- * cmdPB - pointer to a structure that is associated with the launch code.
+ * PARAMETERS: cmd - word value specifying the launch code.
+ * cmdPB - pointer to a structure that is associated with the launch code.
* launchFlags - word value providing extra information about the launch.
*
* RETURNED: Result of launch
@@ -273,10 +256,8 @@ static void AppEventLoop(void)
*
*
***********************************************************************/
-static void AppLaunchCmdNotify(UInt16 LaunchFlags, SysNotifyParamType * pData)
-{
- switch (pData->notifyType)
- {
+static void AppLaunchCmdNotify(UInt16 LaunchFlags, SysNotifyParamType * pData) {
+ switch (pData->notifyType) {
case sysNotifyVolumeMountedEvent:
pData->handled = true; // don't switch
@@ -310,18 +291,9 @@ static void AppLaunchCmdNotify(UInt16 LaunchFlags, SysNotifyParamType * pData)
break;
case sysNotifyDisplayResizedEvent:
- // This code allow redifinition of the screen pitch rotating the screen in the frontend
- if (gVars) {
- static Boolean resizing = false;
-
- if (!resizing) {
- resizing = true;
- PINGetScreenDimensions();
- WinScreenGetPitch();
+ if (gVars)
+ if (FrmGetFormPtr(MainForm) == FrmGetActiveForm())
SknApplySkin();
- resizing = false;
- }
- }
break;
case sonySysNotifyMsaEnforceOpenEvent:
@@ -330,29 +302,26 @@ static void AppLaunchCmdNotify(UInt16 LaunchFlags, SysNotifyParamType * pData)
}
}
-static UInt32 ScummVMPalmMain(UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags)
-{
+static UInt32 ScummVMPalmMain(UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags) {
Err error;
error = RomVersionCompatible (kOurMinVersion, launchFlags);
if (error) return (error);
- switch (cmd)
- {
+ switch (cmd) {
case sysAppLaunchCmdNotify:
AppLaunchCmdNotify(launchFlags, (SysNotifyParamType *) cmdPBP);
break;
-
- case sysAppLaunchCustomDeleteEngine:
+ case sysAppLaunchCustomEngineDelete:
#ifndef _DEBUG_ENGINE
ModDelete();
#endif
break;
- case sysAppLaunchCmdNormalLaunch:
+ case sysAppLaunchCmdNormalLaunch:
error = AppStart();
- if (error)
+ if (error)
goto end;
if (!bDirectMode) {
@@ -370,18 +339,18 @@ end:
default:
break;
- }
-
+ }
return error;
}
+
/***********************************************************************
*
* FUNCTION: PilotMain
*
* DESCRIPTION: This is the main entry point for the application.
*
- * PARAMETERS: cmd - word value specifying the launch code.
- * cmdPB - pointer to a structure that is associated with the launch code.
+ * PARAMETERS: cmd - word value specifying the launch code.
+ * cmdPB - pointer to a structure that is associated with the launch code.
* launchFlags - word value providing extra information about the launch.
* RETURNED: Result of launch
*
@@ -390,7 +359,6 @@ end:
*
***********************************************************************/
-UInt32 PilotMain( UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags)
-{
+UInt32 PilotMain( UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags) {
return ScummVMPalmMain(cmd, cmdPBP, launchFlags);
}