Skip to content

Commit 55d8504

Browse files
committed
Corrects interaction of BITMAPBIT with buffered display bitmap
Two problems fixed: * only in the case of a software cursor is it necessary to check if the bit being altered is within the region of the display covered by the cursor, and if it is, the cursor must be hidden before operating on the screen bitmap * SDL as well as X requires modifications to the screen bitmap be flushed to the actual display.
1 parent ecdab72 commit 55d8504

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/misc7.c

Lines changed: 8 additions & 2 deletions
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)