|
From: Tim R. <row...@us...> - 2004-05-19 22:49:07
|
Update of /cvsroot/squeak/squeak/platforms/RiscOS/vm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21838/vm Modified Files: sqRPCClipboard.c sqRPCEvents.c sqRPCMain.c sqRPCSyscall.c sqRPCWindows.c sqPlatformSpecific.h Log Message: Revise error handling by overriding printf & fprintf to write to !Reporter or a file as appropriate. Add support of forceInterruptCheck() Add support for swapping the left & right Ctrl keys with a command line option Add input event code to replace polling Add DeepKey usage for key input state accuracy Add TimerMod for proper millisecond support Many small celanups Index: sqRPCClipboard.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/RiscOS/vm/sqRPCClipboard.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sqRPCClipboard.c 15 Aug 2003 21:29:53 -0000 1.4 --- sqRPCClipboard.c 19 May 2004 22:48:22 -0000 1.5 *************** *** 296,299 **** --- 296,301 ---- int clipboardSize(void) { + extern int forceInterruptCheck(void); + /* return the number of characters in the clipboard entry */ if (!sqHasClipboard) { *************** *** 302,305 **** --- 304,308 ---- */ fetchClipboard(); + forceInterruptCheck(); } return strlen(clipboardBuffer); Index: sqRPCEvents.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/RiscOS/vm/sqRPCEvents.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** sqRPCEvents.c 15 Aug 2003 21:29:53 -0000 1.6 --- sqRPCEvents.c 19 May 2004 22:48:22 -0000 1.7 *************** *** 84,87 **** --- 84,88 ---- } wimp_deepkey; + int user_LCTL_KEY, user_RCTL_KEY; *************** *** 102,106 **** extern int getInterruptKeycode(void); extern int setInterruptPending(int value); ! extern int setInterruptCheckCounter(int value); void (*socketPollFunction)(int delay, int extraFd) = null; --- 103,107 ---- extern int getInterruptKeycode(void); extern int setInterruptPending(int value); ! extern int forceInterruptCheck(void); void (*socketPollFunction)(int delay, int extraFd) = null; *************** *** 258,263 **** extern void platReportError( os_error * e); - - void setSocketPollFunction(int spf ) { /* called from SocketPlugin init code */ --- 259,262 ---- *************** *** 266,269 **** --- 265,278 ---- } + void setMetaKeyOptions(int swap) { + if (swap) { + user_LCTL_KEY = wimp_DEEPKEY_RCTL; + user_RCTL_KEY = wimp_DEEPKEY_LCTL; + } else { + user_LCTL_KEY = wimp_DEEPKEY_LCTL; + user_RCTL_KEY = wimp_DEEPKEY_RCTL; + } + } + /**************************/ /* Event handler routines */ *************** *** 277,283 **** * NB sets the GLOBAL state of buttonState and modifierState */ ! int kbdstate; static int draggingWindow = false; wimp_pointer wblock; if ( mouseButtonDown || windowActive) { --- 286,297 ---- * NB sets the GLOBAL state of buttonState and modifierState */ ! int kbdstate, thisTick; static int draggingWindow = false; + static int lastMousePollTick = 0; wimp_pointer wblock; + + /* Don't mouse poll more than once every millisecond */ + if ( lastMousePollTick == (thisTick = (ioMSecs() & 0x1fffffff))) return; + if ( mouseButtonDown || windowActive) { *************** *** 364,367 **** --- 378,382 ---- return false ; break; case wimp_REDRAW_WINDOW_REQUEST : + PRINTF(("\\t display\n")); DisplayPixmap(); break; case wimp_OPEN_WINDOW_REQUEST : *************** *** 374,384 **** PointerEnterWindow(pollBlock); break; case wimp_MOUSE_CLICK : ! MouseButtons(&(pollBlock->pointer)); ! return false; break; case wimp_USER_DRAG_BOX : DoNothing(); break; case wimp_KEY_PRESSED : ! KeyPressed( &(pollBlock->key)); ! return false; break; case wimp_MENU_SELECTION : DoNothing(); break; --- 389,397 ---- PointerEnterWindow(pollBlock); break; case wimp_MOUSE_CLICK : ! MouseButtons(&(pollBlock->pointer)); break; case wimp_USER_DRAG_BOX : DoNothing(); break; case wimp_KEY_PRESSED : ! KeyPressed( &(pollBlock->key)); break; case wimp_MENU_SELECTION : DoNothing(); break; *************** *** 407,418 **** /* use wimp_poll_delay so that we don't return a null before * the end of the delay, thus giving some cpu back to everyone else */ ! int pollDelay; pollDelay = microSecondsToDelay /* * CLOCKS_PER_SEC / 1000000 */ >> 14 /* will always give small answer, but good enough */; if ( microSecondsToDelay ) { pollDelay = MAX(pollDelay, 1); ! /* makes sure we get at least one tick of delay */ } HandleMousePoll(); HandleSocketPoll(microSecondsToDelay); --- 420,450 ---- /* use wimp_poll_delay so that we don't return a null before * the end of the delay, thus giving some cpu back to everyone else + * NB - RISC OS uses centi-Seconds for delays etc. */ ! int pollDelay, nextWakeTick, currentTick; ! extern int getNextWakeupTick(void); pollDelay = microSecondsToDelay /* * CLOCKS_PER_SEC / 1000000 */ >> 14 /* will always give small answer, but good enough */; if ( microSecondsToDelay ) { pollDelay = MAX(pollDelay, 1); ! /* makes sure we get at least one tick of delay ! * unless there is an alarm waiting */ ! } ! /* This is a touch confusing; ! * if nWT <= cT then either there is a rollover to consider or there ! * is no wakeup set. ! * if nWT > cT, then try to make sure the delay does not exceed the ! * time until that wakeup ! */ ! nextWakeTick = getNextWakeupTick(); ! currentTick = (ioMSecs() & 0x1fffffff); ! if (nextWakeTick <= currentTick) { ! if ( nextWakeTick != 0) { ! pollDelay = 0; ! } ! } else { ! pollDelay = (nextWakeTick - currentTick ) / 10 * pollDelay; } + //PRINTF(("\\t HandleEventsWithWait %d\n", pollDelay)); HandleMousePoll(); HandleSocketPoll(microSecondsToDelay); *************** *** 432,436 **** HandleMousePoll(); HandleSocketPoll(0); ! do {xwimp_poll((wimp_MASK_POLLWORD | wimp_MASK_GAIN --- 464,468 ---- HandleMousePoll(); HandleSocketPoll(0); ! //PRINTF(("\\t HandleEvents\n")); do {xwimp_poll((wimp_MASK_POLLWORD | wimp_MASK_GAIN *************** *** 443,446 **** --- 475,479 ---- } + int HandleEventsNotTooOften(void) { /* If we are using the older style polling stuff, we typically end up *************** *** 450,455 **** clock_t currentTick; if( (currentTick = clock()) >= nextPollTick) { HandleEvents(); ! nextPollTick = currentTick + 4; } return true; --- 483,489 ---- clock_t currentTick; if( (currentTick = clock()) >= nextPollTick) { + //PRINTF(("\\t HandleEventsNotTooOften\n")); HandleEvents(); ! nextPollTick = currentTick + 1; } return true; *************** *** 529,535 **** } if (wblock->buttons == wimp_CLICK_MENU) { } } - } --- 563,569 ---- } if (wblock->buttons == wimp_CLICK_MENU) { + /* sometime get the menu stuff to work */ } } } *************** *** 542,551 **** wimp_deepkey * dblock; int keystate, dkey, modState; - dblock = (wimp_deepkey *)wblock; /* initially keystate will be the event's idea of the key pressed */ keystate = dblock->c; - if (keystate == getInterruptKeycode() || ( (keystate == wimp_KEY_PRINT)) ) { --- 576,583 ---- *************** *** 555,560 **** * interrupt is a meta-event; do not report it as a keypress */ ! setInterruptPending(true); ! setInterruptCheckCounter(0); return; } --- 587,592 ---- * interrupt is a meta-event; do not report it as a keypress */ ! setInterruptPending(true); ! forceInterruptCheck(); return; } *************** *** 569,575 **** * left ctl = Control & right ctl = Command */ ! if (dkey & (wimp_DEEPKEY_LCTL /*| wimp_DEEPKEY_RCTL */)) modState |= CtrlKeyBit; ! if (dkey & (/* wimp_DEEPKEY_LALT| wimp_DEEPKEY_RALT */ wimp_DEEPKEY_RCTL)) modState |= CommandKeyBit; --- 601,607 ---- * left ctl = Control & right ctl = Command */ ! if (dkey & (user_LCTL_KEY /* wimp_DEEPKEY_LCTL */)) modState |= CtrlKeyBit; ! if (dkey & (user_RCTL_KEY /* wimp_DEEPKEY_RCTL */)) modState |= CommandKeyBit; *************** *** 682,686 **** evt->type= type; evt->timeStamp= ioMSecs(); - //SignalInputEvent(); return evt; --- 714,717 ---- *************** *** 746,753 **** }; #endif ! if (iebEmptyP()) HandleEvents(); if (iebEmptyP()) return false; *evt = eventBuf[eventBufGet]; iebAdvance(eventBufGet); return true; } --- 777,792 ---- }; #endif ! if (iebEmptyP()) { ! HandleEvents(); ! forceInterruptCheck(); /* handleevents can take a while */ ! } if (iebEmptyP()) return false; *evt = eventBuf[eventBufGet]; iebAdvance(eventBufGet); + // #ifdef DEBUG + // if (evt->type == EventTypeKeyboard) { + // PRINTF(("\\t key ev(%d) read %c\n", evt->timeStamp, ((sqKeyboardEvent *)evt)->charCode)); + // } + // #endif return true; } *************** *** 766,774 **** /* This operation is platform dependent. On the Mac, it simply calls * HandleEvents(), which gives other applications a chance to run. ! * Here, we use microSeconds as the parameter to HandleEvents, so that wimpPollIdle ! * gets a timeout. */ PRINTF(("\\t relinq %d\n", microSeconds)); ! HandleEventsWithWait(microSeconds); return microSeconds; } --- 805,815 ---- /* This operation is platform dependent. On the Mac, it simply calls * HandleEvents(), which gives other applications a chance to run. ! * Here, we use microSeconds as the parameter to HandleEvents, so that ! * wimpPollIdle gets a timeout. */ PRINTF(("\\t relinq %d\n", microSeconds)); ! /* HandleEventsWithWait(microSeconds); */ ! HandleEvents(); ! forceInterruptCheck(); return microSeconds; } *************** *** 776,785 **** int ioProcessEvents(void) { ! HandleEvents(); return true; } ! ! /* older polling state style access */ int nextKeyPressOrNil(void) { --- 817,831 ---- int ioProcessEvents(void) { ! /* This is called only from checkForInterrupts as a last resort ! * to make sure that IO polling is done at least occasionally no matter what ! * the image is up to. We don't force an interrupt check here because we're ! * in the middle of one already ! */ ! HandleEvents(); return true; } ! /* older polling state style access - completely unused by images after ! * about 3.6 */ int nextKeyPressOrNil(void) { Index: sqRPCMain.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/RiscOS/vm/sqRPCMain.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sqRPCMain.c 7 Oct 2003 05:06:14 -0000 1.2 --- sqRPCMain.c 19 May 2004 22:48:22 -0000 1.3 *************** *** 63,66 **** --- 63,67 ---- int helpMe = 0; int versionMe = 0; + int swapMeta = 0; int objectHeadroom = 4*1024*1024; char * windowLabel = &imageName[0]; *************** *** 70,73 **** --- 71,75 ---- { ARG_FLAG, &helpMe, "-help" }, { ARG_FLAG, &versionMe, "-version" }, + { ARG_FLAG, &swapMeta, "-swapMeta"}, { ARG_UINT, &objectHeadroom, "-memory:"}, { ARG_STRING, &windowLabel, "-windowlabel:"}, *************** *** 77,89 **** /*** Functions ***/ extern void SetupPaletteTable(void); ! extern void setFPStatus(int stat); ! ! /* override printf() ! * - see also the #define printf repprintf in sqPlatforSpecifi.h ! */ ! int repprintf(const char * format, ...) { ! int charsPrinted; ! va_list ap; if ((int)logfile < 0) { /* negative num means we couldn't open !reporter or any logfile --- 79,85 ---- /*** Functions ***/ extern void SetupPaletteTable(void); ! extern void setFPStatus(int stat); ! int openLogStream(void) { if ((int)logfile < 0) { /* negative num means we couldn't open !reporter or any logfile *************** *** 97,103 **** if (!logfile) { /* No Report: so try an ordinary log file */ - void decodePath(char *srcptr, char * dstPtr); char logPath[VMPATH_SIZE]; ! sprintf(logPath, "%s.Squeak/vmlog", vmPath); logfile= fopen(logPath, "a+"); } --- 93,98 ---- if (!logfile) { /* No Report: so try an ordinary log file */ char logPath[VMPATH_SIZE]; ! sprintf(logPath, "%sSqueak/vmlog", vmPath); logfile= fopen(logPath, "a+"); } *************** *** 106,110 **** * set file to -1 as a flag */ logfile = (FILE *)-1; ! } va_start(ap, format); charsPrinted = vfprintf(logfile, format, ap); --- 101,128 ---- * set file to -1 as a flag */ logfile = (FILE *)-1; ! return 0; ! } ! return (int)logfile; ! } ! /* override printf() ! * - see also the #define printf repprintf in sqPlatforSpecific.h ! */ ! int repprintf(const char * format, ...) { ! int charsPrinted; ! va_list ap; ! if (!openLogStream()) return 0; ! va_start(ap, format); ! charsPrinted = vfprintf(logfile, format, ap); ! va_end(ap); ! fflush(logfile); ! ! return charsPrinted; ! } ! ! /* also deal with fprintf in the same manner. Ignore the stream specified */ ! int repfprintf(FILE *strm, const char * format, ...) { ! int charsPrinted; ! va_list ap; ! if (!openLogStream()) return 0; va_start(ap, format); charsPrinted = vfprintf(logfile, format, ap); *************** *** 153,157 **** } ! PRINTF(("\\t platAllocateMemory(%d) at %d", amount, (int)daBaseAddress)); return (int)daBaseAddress; --- 171,175 ---- } ! PRINTF(("\\t platAllocateMemory(%d) at %0x", amount, (int)daBaseAddress)); return (int)daBaseAddress; *************** *** 165,168 **** --- 183,194 ---- } + void setTimer(void) { + /* Initialise the TimerMod timer + */ + _kernel_swi_regs regs; + _kernel_swi(/* Timer_Start*/ 0x490C0, ®s, ®s); + } + + int InitRiscOS(void) { /* Initialise RiscOS for desktop wimp program use */ *************** *** 206,209 **** --- 232,237 ---- setFPStatus(0); + setTimer(); + return true; } *************** *** 216,221 **** } ! int ioExit(void) ! { exit(1); return 1; --- 244,248 ---- } ! int ioExit(void) { exit(1); return 1; *************** *** 223,231 **** int ioAssertion(void) { ! return 1; ! } ! void exit_function(void) ! { /* do we need to do any special tidy up here ? RiscOS needs to kill the pointer bitmap and release the dynamic areas --- 250,257 ---- int ioAssertion(void) { ! return 1; ! } ! void exit_function(void) { /* do we need to do any special tidy up here ? RiscOS needs to kill the pointer bitmap and release the dynamic areas *************** *** 258,262 **** _kernel_swi_regs regs; _kernel_swi(/* Timer_Value*/ 0x490C2, ®s, ®s); ! return (regs.r[0] * 1000) + (int)(regs.r[1] / 1000); } --- 284,289 ---- _kernel_swi_regs regs; _kernel_swi(/* Timer_Value*/ 0x490C2, ®s, ®s); ! return (regs.r[0] * 1000) + (int)(regs.r[1] / 1000); ! } *************** *** 275,281 **** void sqStringFromFilename( int sqString, char*fileName, int sqSize) { ! // copy chars TO a Squeak String FROM a C filename char array. You may transform the characters as needed int i; char c; for (i = 0; i < sqSize; i++) { --- 302,310 ---- void sqStringFromFilename( int sqString, char*fileName, int sqSize) { ! // copy chars TO a Squeak String FROM a C filename char array. ! // You may transform the characters as needed int i; char c; + PRINTF(("sqRPCMain: sqStringFromFilename - %s\n",fileName)); for (i = 0; i < sqSize; i++) { *************** *** 288,292 **** void sqFilenameFromString(char*fileName, int sqString, int sqSize) { ! // copy chars from a Squeak String to a C filename char array. You may transform the characters as needed int i; int junk; --- 317,322 ---- void sqFilenameFromString(char*fileName, int sqString, int sqSize) { ! // copy chars from a Squeak String to a C filename char array. ! // You may transform the characters as needed int i; int junk; *************** *** 310,315 **** --- 340,347 ---- // just copy the ugly string to the destination for now strcpy(fileName, temp); + PRINTF(("sqRPCMain: sqFilenameFromString canon fail - %s\n",temp)); // debugging-> platReportError(e); } + PRINTF(("sqRPCMain: sqFilenameFromString - %s\n",temp)); } *************** *** 553,556 **** --- 585,589 ---- FILE *f; extern void initGlobalStructure(void); + extern void setMetaKeyOptions(int swap); parseArguments( argv, argc, args); *************** *** 577,580 **** --- 610,616 ---- ioExit(); } + + setMetaKeyOptions(swapMeta); + readImageFromFileHeapSize(f, objectHeadroom); fclose(f); Index: sqRPCSyscall.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/RiscOS/vm/sqRPCSyscall.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sqRPCSyscall.c 9 May 2003 01:07:16 -0000 1.3 --- sqRPCSyscall.c 19 May 2004 22:48:22 -0000 1.4 *************** *** 209,259 **** } - int pointlessFunctionToTakeUpSpace(void) { - int i; - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - fetchClassOf(i++); - return(i); - } - - int primitiveExecuteRawInstructionArray(void) { - int rx, result; - int (*rawFunction)(void); - rx = stackValue(0); - rawFunction = pointlessFunctionToTakeUpSpace/* (int (*)(void)) (rx +4)*/; - memcpy((void*)rawFunction, (void*)(rx+4), (size_t)100); - result = integerObjectOf(rawFunction()); - popthenPush( 1, result); - return(0); - } - --- 209,211 ---- Index: sqRPCWindows.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/RiscOS/vm/sqRPCWindows.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** sqRPCWindows.c 7 Oct 2003 05:06:14 -0000 1.7 --- sqRPCWindows.c 19 May 2004 22:48:22 -0000 1.8 *************** *** 62,69 **** /* screen description. Needs updating when screenmode changes */ ! os_coord squeakDisplaySize, screenSize, scalingFactor; ! extern os_box windowVisibleArea; int screenBitPerPixel, squeakDisplayDepth; // osbool squeakDisplayNeedsReversing = true; --- 62,69 ---- /* screen description. Needs updating when screenmode changes */ ! os_coord squeakDisplaySize, screenSize, scalingFactor; ! extern os_box windowVisibleArea; int screenBitPerPixel, squeakDisplayDepth; // osbool squeakDisplayNeedsReversing = true; *************** *** 84,95 **** void GetDisplayParameters(void); extern int HandleEvents(int); ! int InitRiscOS(void); void MouseButtons( wimp_pointer * wblock); void SetUpWindow(int w, int h); void SetInitialWindowSize(int w, int h); ! int SetupPixmap(int w, int h, int d); void SetupPixelTranslationTable(void); void SetupPaletteTable(void); ! int platAllocateMemory( int amount); void platReportFatalError( os_error * e); void platReportError( os_error * e); --- 84,95 ---- void GetDisplayParameters(void); extern int HandleEvents(int); ! int InitRiscOS(void); void MouseButtons( wimp_pointer * wblock); void SetUpWindow(int w, int h); void SetInitialWindowSize(int w, int h); ! int SetupPixmap(int w, int h, int d); void SetupPixelTranslationTable(void); void SetupPaletteTable(void); ! int platAllocateMemory( int amount); void platReportFatalError( os_error * e); void platReportError( os_error * e); *************** *** 311,315 **** wblock.w = sqWindowHandle; more = wimp_redraw_window( &wblock ); ! while ( more ) { if ((e = xosspriteop_put_sprite_scaled ( osspriteop_PTR, --- 311,315 ---- wblock.w = sqWindowHandle; more = wimp_redraw_window( &wblock ); ! while ( more ) { if ((e = xosspriteop_put_sprite_scaled ( osspriteop_PTR, *************** *** 329,333 **** void DisplayPixmapNow(void) { ! /* bitblt the displaySprite to the screen, not from a wimp_poll */ extern osspriteop_area *spriteAreaPtr; extern osspriteop_header *displaySprite; --- 329,335 ---- void DisplayPixmapNow(void) { ! /* bitblt the displaySprite to the screen, not from a wimp_poll ! * it works but seems to suck up a huge % of cpu ! */ extern osspriteop_area *spriteAreaPtr; extern osspriteop_header *displaySprite; *************** *** 336,340 **** wimp_draw wblock; os_error * e; ! if ( sqWindowHandle == null ) return; wblock.w = sqWindowHandle; /* set work area to suit these values */ --- 338,345 ---- wimp_draw wblock; os_error * e; ! ! if ( sqWindowHandle == null ) ! return; ! wblock.w = sqWindowHandle; /* set work area to suit these values */ *************** *** 345,348 **** --- 350,354 ---- wblock.box.y1 = 0; + PRINTF(("\\t display NOW\n")); more = wimp_update_window( &wblock ); while ( more ) { *************** *** 377,380 **** --- 383,387 ---- void SetDefaultPointer(void) { + /* setup the pointer buffer for use in the Squeak window */ xwimp_set_pointer_shape(2, (byte const *)pointerBuffer, 16, 16, 0, 0); /* and then return the pointer to no.1 */ *************** *** 404,408 **** wimp_window_state wblock; os_error * e; ! /* the sqWindowHandle state */ wblock.w = sqWindowHandle; if ((e = xwimp_get_window_state(&wblock)) != NULL) { --- 411,415 ---- wimp_window_state wblock; os_error * e; ! /* get the sqWindowHandle state */ wblock.w = sqWindowHandle; if ((e = xwimp_get_window_state(&wblock)) != NULL) { *************** *** 422,426 **** platReportFatalError(e); return false; ! }; /* check the resulting state */ if ((e = xwimp_get_window_state(&wblock)) != NULL) { --- 429,433 ---- platReportFatalError(e); return false; ! } /* check the resulting state */ if ((e = xwimp_get_window_state(&wblock)) != NULL) { *************** *** 506,509 **** --- 513,518 ---- } + /* Colour translation table stuff */ + void SetupPixelTranslationTable(void) { /* derive the pixel translation table suited to the current combination */ *************** *** 682,686 **** os_coord origin, size; extern char * windowLabel; - extern char imageName[]; PRINTF(("\\t initial open window\n")); --- 691,694 ---- *************** *** 850,854 **** int ioSetCursorWithMask(int cursorBitsIndex, int cursorMaskIndex, int offsetX, int offsetY) { ! /* Move 1-bit form to pointer buffer and use mask to affect result. Remember RPC pointer is 2-bits/pixel to allow 3 colours + mask. As of Sq2.2, there can also be a mask 1-bit form specified. mask cursor 0 0 transparent --- 858,864 ---- int ioSetCursorWithMask(int cursorBitsIndex, int cursorMaskIndex, int offsetX, int offsetY) { ! /* Move 1-bit form to pointer buffer and use mask to affect result. ! * Remember RPC pointer is 2-bits/pixel to allow 3 colours + mask. ! * As of Sq2.2, there can also be a mask 1-bit form specified. mask cursor 0 0 transparent *************** *** 946,949 **** --- 956,962 ---- } + /* BitBlt has messed with part of the Display - inform the WIMP so + * that it gets redrawn when we do HandleEvents and get a + * wimp_REDRAW_WINDOW_REQUEST */ int ioShowDisplay( int dispBitsIndex, int width, int height, int depth, int affectedL, int affectedR, int affectedT, int affectedB) { os_error *e; *************** *** 978,984 **** int ioForceDisplayUpdate(void) { PRINTF(("\\t ioForceDisplayUpdate")); ! //ioProcessEvents(); ! DisplayPixmapNow(); ! return true; } --- 991,1001 ---- int ioForceDisplayUpdate(void) { PRINTF(("\\t ioForceDisplayUpdate")); ! // This immediate display update seems to display the right bits but ! // takes a huge % of the machine time. By going back to the older ! // HandleEvents we get a nice snappy machine. Weird. ! // DisplayPixmapNow(); ! extern int HandleEvents(void); ! HandleEvents(); /* we might need to forceInterruptCheck() here ? */ ! return false; } Index: sqPlatformSpecific.h =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/RiscOS/vm/sqPlatformSpecific.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** sqPlatformSpecific.h 15 Aug 2003 21:29:53 -0000 1.8 --- sqPlatformSpecific.h 19 May 2004 22:48:22 -0000 1.9 *************** *** 70,74 **** --- 70,78 ---- extern int repprintf(const char * format, ...); + extern int repfprintf(FILE *strm, const char * format, ...); #define printf repprintf + #define fprintf repfprintf + #define MAXDIRNAMELENGTH 1024 + #else |