Skip to content

Commit b13a35e

Browse files
authored
Merge pull request #519 from Interlisp/nhb-fix-sdl-display-bitmap-flushing
Fix display bitmap flushing on modification when using SDL display subsystem
2 parents 249efce + 55d8504 commit b13a35e

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/bitblt.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ LispPTR N_OP_pilotbitblt(LispPTR pilot_bt_tbl, LispPTR tos)
126126
if (displayflg) (currentdsp->mouse_visible)(IOPage->dlmousex, IOPage->dlmousey);
127127
#endif /* SUNDISPLAY / DOS */
128128

129-
#ifdef XWINDOW
129+
#if defined(XWINDOW) || defined(SDL)
130130
flush_display_lineregion(dx, dstbase, w, h);
131131
#endif /* XWINDOW */
132132

src/misc7.c

+8-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ LispPTR N_OP_misc7(LispPTR arg1, LispPTR arg2, LispPTR arg3, LispPTR arg4, LispP
4343
int offset;
4444
DLword bmdata;
4545
DLword bmmask;
46+
#ifdef REALCURSOR
4647
int displayflg;
48+
#endif
4749

4850
DBPRINT(("MISC7 op with alpha byte %d.\n", alpha));
4951

@@ -58,7 +60,11 @@ LispPTR N_OP_misc7(LispPTR arg1, LispPTR arg2, LispPTR arg3, LispPTR arg4, LispP
5860

5961
DBPRINT(("MISC7 args OK.\n"));
6062

63+
#ifdef REALCURSOR
6164
displayflg = n_new_cursorin(base, x, (heightminus1 - y), 1, 1);
65+
if (displayflg)
66+
HideCursor();
67+
#endif
6268

6369
/* Bitmaps use a positive integer coordinate system with the lower left
6470
corner pixel at coordinate (0, 0). Storage is allocated in 16-bit words
@@ -79,12 +85,12 @@ LispPTR N_OP_misc7(LispPTR arg1, LispPTR arg2, LispPTR arg3, LispPTR arg4, LispP
7985
}
8086

8187

82-
#ifdef XWINDOW
88+
#if defined(XWINDOW) || defined(SDL)
8389
if (in_display_segment(base)) {
8490
/* NB: base + offset doesn't need WORDPTR() wrapper */
8591
flush_display_ptrregion(base + offset, 0, 16, 1);
8692
}
87-
#endif /* XWINDOW */
93+
#endif /* XWINDOW || SDL */
8894

8995
ScreenLocked = NIL;
9096
DBPRINT(("FBITMAPBIT old bit = 0x%x.\n", oldbit));

0 commit comments

Comments
 (0)