From cceb68c8317ffcfa618e28e968793edc9c6a9715 Mon Sep 17 00:00:00 2001 From: ehouse Date: Fri, 1 Oct 2004 01:40:47 +0000 Subject: [PATCH] separate highres support from screen resizing so can do only the former now --- xwords4/palm/palmmain.c | 15 ++++++++++++--- xwords4/palm/palmmain.h | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/xwords4/palm/palmmain.c b/xwords4/palm/palmmain.c index b1947145a..2316699ee 100644 --- a/xwords4/palm/palmmain.c +++ b/xwords4/palm/palmmain.c @@ -33,7 +33,9 @@ #include #ifdef FEATURE_HIGHRES # include +# ifdef FEATURE_SILK # include +# endif #endif #include "comtypes.h" @@ -919,7 +921,7 @@ volChangeEventProc( SysNotifyParamType* notifyParamsP ) } #endif -#ifdef FEATURE_HIGHRES +#ifdef FEATURE_SILK if ( notifyParamsP->notifyType == sysNotifyDisplayChangeEvent ) { eventToPost.eType = doResizeWinEvent; EvtAddEventToQueue( &eventToPost ); @@ -947,7 +949,7 @@ doCallbackReg( PalmAppGlobals* globals, XP_Bool reg ) XP_U16 i; UInt32 notifyTypes[] = { sysNotifyVolumeUnmountedEvent , sysNotifyVolumeMountedEvent -#ifdef FEATURE_HIGHRES +#ifdef FEATURE_SILK , sysNotifyDisplayChangeEvent #endif }; @@ -969,10 +971,13 @@ doCallbackReg( PalmAppGlobals* globals, XP_Bool reg ) #ifdef FEATURE_HIGHRES /* temp workarounds for some sony include file trouble */ +# ifdef FEATURE_SILK extern Err SilkLibEnableResizeFoo(UInt16 refNum) SILK_LIB_TRAP(sysLibTrapCustom+1); extern Err VskSetStateFoo(UInt16 refNum, UInt16 stateType, UInt16 state) SILK_LIB_TRAP(sysLibTrapCustom+3+3); +# endif + static void initHighResGlobals( PalmAppGlobals* globals ) { @@ -984,6 +989,7 @@ initHighResGlobals( PalmAppGlobals* globals ) XP_LOGF( "hasHiRes = %d", globals->hasHiRes ); +#ifdef FEATURE_SILK if ( globals->hasHiRes ) { XP_U16 ref; @@ -1009,11 +1015,13 @@ initHighResGlobals( PalmAppGlobals* globals ) } } } +#endif } /* initHighResGlobals */ static void uninitHighResGlobals( PalmAppGlobals* globals ) { +#ifdef FEATURE_SILK if ( globals->hasHiRes && globals->sonyLibRef != 0 ) { if ( globals->doVSK ) { VskClose( globals->sonyLibRef ); @@ -1021,6 +1029,7 @@ uninitHighResGlobals( PalmAppGlobals* globals ) SilkLibClose( globals->sonyLibRef ); } } +#endif } /* uninitHighResGlobals */ #else # define initHighResGlobals(g) @@ -2097,7 +2106,7 @@ mainViewHandleEvent( EventPtr event ) XP_ASSERT( !!globals->game.board ); break; -#ifdef FEATURE_HIGHRES +#ifdef FEATURE_SILK case doResizeWinEvent: getSizes( globals ); positionBoard( globals ); diff --git a/xwords4/palm/palmmain.h b/xwords4/palm/palmmain.h index bfaa112d1..274970788 100644 --- a/xwords4/palm/palmmain.h +++ b/xwords4/palm/palmmain.h @@ -327,7 +327,7 @@ enum { dictSelectedEvent = firstUserEvent /* 0x6000 */ #ifdef BEYOND_IR ,connsSettingChgEvent #endif -#ifdef FEATURE_HIGHRES +#ifdef FEATURE_SILK ,doResizeWinEvent #endif };