separate highres support from screen resizing so can do only the former now

This commit is contained in:
ehouse 2004-10-01 01:40:47 +00:00
parent a9e4fb8125
commit cf9c4320bd
2 changed files with 13 additions and 4 deletions

View file

@ -33,7 +33,9 @@
#include <unix_stdarg.h> #include <unix_stdarg.h>
#ifdef FEATURE_HIGHRES #ifdef FEATURE_HIGHRES
# include <FileStream.h> # include <FileStream.h>
# ifdef FEATURE_SILK
# include <SonyCLIE.h> # include <SonyCLIE.h>
# endif
#endif #endif
#include "comtypes.h" #include "comtypes.h"
@ -919,7 +921,7 @@ volChangeEventProc( SysNotifyParamType* notifyParamsP )
} }
#endif #endif
#ifdef FEATURE_HIGHRES #ifdef FEATURE_SILK
if ( notifyParamsP->notifyType == sysNotifyDisplayChangeEvent ) { if ( notifyParamsP->notifyType == sysNotifyDisplayChangeEvent ) {
eventToPost.eType = doResizeWinEvent; eventToPost.eType = doResizeWinEvent;
EvtAddEventToQueue( &eventToPost ); EvtAddEventToQueue( &eventToPost );
@ -947,7 +949,7 @@ doCallbackReg( PalmAppGlobals* globals, XP_Bool reg )
XP_U16 i; XP_U16 i;
UInt32 notifyTypes[] = { sysNotifyVolumeUnmountedEvent UInt32 notifyTypes[] = { sysNotifyVolumeUnmountedEvent
, sysNotifyVolumeMountedEvent , sysNotifyVolumeMountedEvent
#ifdef FEATURE_HIGHRES #ifdef FEATURE_SILK
, sysNotifyDisplayChangeEvent , sysNotifyDisplayChangeEvent
#endif #endif
}; };
@ -969,10 +971,13 @@ doCallbackReg( PalmAppGlobals* globals, XP_Bool reg )
#ifdef FEATURE_HIGHRES #ifdef FEATURE_HIGHRES
/* temp workarounds for some sony include file trouble */ /* temp workarounds for some sony include file trouble */
# ifdef FEATURE_SILK
extern Err SilkLibEnableResizeFoo(UInt16 refNum) extern Err SilkLibEnableResizeFoo(UInt16 refNum)
SILK_LIB_TRAP(sysLibTrapCustom+1); SILK_LIB_TRAP(sysLibTrapCustom+1);
extern Err VskSetStateFoo(UInt16 refNum, UInt16 stateType, UInt16 state) extern Err VskSetStateFoo(UInt16 refNum, UInt16 stateType, UInt16 state)
SILK_LIB_TRAP(sysLibTrapCustom+3+3); SILK_LIB_TRAP(sysLibTrapCustom+3+3);
# endif
static void static void
initHighResGlobals( PalmAppGlobals* globals ) initHighResGlobals( PalmAppGlobals* globals )
{ {
@ -984,6 +989,7 @@ initHighResGlobals( PalmAppGlobals* globals )
XP_LOGF( "hasHiRes = %d", globals->hasHiRes ); XP_LOGF( "hasHiRes = %d", globals->hasHiRes );
#ifdef FEATURE_SILK
if ( globals->hasHiRes ) { if ( globals->hasHiRes ) {
XP_U16 ref; XP_U16 ref;
@ -1009,11 +1015,13 @@ initHighResGlobals( PalmAppGlobals* globals )
} }
} }
} }
#endif
} /* initHighResGlobals */ } /* initHighResGlobals */
static void static void
uninitHighResGlobals( PalmAppGlobals* globals ) uninitHighResGlobals( PalmAppGlobals* globals )
{ {
#ifdef FEATURE_SILK
if ( globals->hasHiRes && globals->sonyLibRef != 0 ) { if ( globals->hasHiRes && globals->sonyLibRef != 0 ) {
if ( globals->doVSK ) { if ( globals->doVSK ) {
VskClose( globals->sonyLibRef ); VskClose( globals->sonyLibRef );
@ -1021,6 +1029,7 @@ uninitHighResGlobals( PalmAppGlobals* globals )
SilkLibClose( globals->sonyLibRef ); SilkLibClose( globals->sonyLibRef );
} }
} }
#endif
} /* uninitHighResGlobals */ } /* uninitHighResGlobals */
#else #else
# define initHighResGlobals(g) # define initHighResGlobals(g)
@ -2097,7 +2106,7 @@ mainViewHandleEvent( EventPtr event )
XP_ASSERT( !!globals->game.board ); XP_ASSERT( !!globals->game.board );
break; break;
#ifdef FEATURE_HIGHRES #ifdef FEATURE_SILK
case doResizeWinEvent: case doResizeWinEvent:
getSizes( globals ); getSizes( globals );
positionBoard( globals ); positionBoard( globals );

View file

@ -327,7 +327,7 @@ enum { dictSelectedEvent = firstUserEvent /* 0x6000 */
#ifdef BEYOND_IR #ifdef BEYOND_IR
,connsSettingChgEvent ,connsSettingChgEvent
#endif #endif
#ifdef FEATURE_HIGHRES #ifdef FEATURE_SILK
,doResizeWinEvent ,doResizeWinEvent
#endif #endif
}; };