add more logging after crash in rect_filled, up logging baud rate

This commit is contained in:
camh 2022-02-24 10:27:08 -08:00
parent 18a363a8e0
commit 29afee66ee
4 changed files with 13 additions and 1 deletions

View File

@ -47,7 +47,7 @@ OSErr setupDebugSerialPort(short refNum) {
CntrlParam cb2;
cb2.ioCRefNum = serialPort;
cb2.csCode = 8;
cb2.csParam[0] = stop10 | noParity | data8 | baud9600;
cb2.csParam[0] = stop10 | noParity | data8 | baud28800;
err = PBControl ((ParmBlkPtr) & cb2, 0);

Binary file not shown.

Binary file not shown.

View File

@ -599,8 +599,10 @@ void updateBounds(int top, int bottom, int left, int right) {
#endif
const struct nk_command_rect_filled *r = (const struct nk_command_rect_filled *)cmd;
writeSerialPortDebug(boutRefNum, "NK_COMMAND_RECT_FILLED1");
if (r->allowCache == false) {
writeSerialPortDebug(boutRefNum, "NK_COMMAND_RECT_FILLED2");
Rect quickDrawRectangle;
quickDrawRectangle.top = r->y;
@ -608,14 +610,17 @@ void updateBounds(int top, int bottom, int left, int right) {
quickDrawRectangle.bottom = r->y + r->h;
quickDrawRectangle.right = r->x + r->w;
writeSerialPortDebug(boutRefNum, "NK_COMMAND_RECT_FILLED3");
#ifdef ENABLED_DOUBLE_BUFFERING
updateBounds(quickDrawRectangle.top, quickDrawRectangle.bottom, quickDrawRectangle.left, quickDrawRectangle.right);
#endif
writeSerialPortDebug(boutRefNum, "NK_COMMAND_RECT_FILLED4");
FillRoundRect(&quickDrawRectangle, r->rounding, r->rounding, &qd.white);
break;
}
writeSerialPortDebug(boutRefNum, "NK_COMMAND_RECT_FILLED5");
#ifdef COMMAND_CACHING
if (!lastInputWasBackspace && cmd->type == lastCmd->type && memcmp(r, lastCmd, sizeof(struct nk_command_rect_filled)) == 0) {
@ -627,6 +632,7 @@ void updateBounds(int top, int bottom, int left, int right) {
}
#endif
writeSerialPortDebug(boutRefNum, "NK_COMMAND_RECT_FILLED6");
// TODO: to support coloring the lines, we need to map from qd Pattern types to integer colors
// color = nk_color_to_quickdraw_bw_color(r->color);
// ForeColor(color);
@ -640,12 +646,18 @@ void updateBounds(int top, int bottom, int left, int right) {
quickDrawRectangle.bottom = r->y + r->h;
quickDrawRectangle.right = r->x + r->w;
writeSerialPortDebug(boutRefNum, "NK_COMMAND_RECT_FILLED7");
#ifdef ENABLED_DOUBLE_BUFFERING
updateBounds(quickDrawRectangle.top, quickDrawRectangle.bottom, quickDrawRectangle.left, quickDrawRectangle.right);
#endif
writeSerialPortDebug(boutRefNum, "NK_COMMAND_RECT_FILLED8");
FillRoundRect(&quickDrawRectangle, r->rounding, r->rounding, &r->color);
writeSerialPortDebug(boutRefNum, "NK_COMMAND_RECT_FILLED9");
FrameRoundRect(&quickDrawRectangle, r->rounding, r->rounding); // http://mirror.informatimago.com/next/developer.apple.com/documentation/mac/QuickDraw/QuickDraw-105.html#HEADING105-0
writeSerialPortDebug(boutRefNum, "NK_COMMAND_RECT_FILLED10 (done)");
}
break;