1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-26 20:02:37 +00:00

More SUNDISPLAY / NOPIXRECT fixes. (#269)

This fixes most of the remaining issues, apart from llcolor.
This commit is contained in:
Bruce Mitchener
2021-01-23 02:59:11 +07:00
committed by GitHub
parent 1b1ff995c3
commit 61a0c02681
4 changed files with 22 additions and 39 deletions

View File

@@ -12,8 +12,7 @@
#include <stdio.h>
#ifndef NOPIXRECT
#ifndef DOS
#ifdef SUNDISPLAY
#include <sunwindow/window_hs.h>
#include <sunwindow/win_ioctl.h>
@@ -21,7 +20,6 @@
#include <sunwindow/cms_mono.h>
#include <suntool/canvas.h>
#include <sys/ioctl.h>
#endif /* DOS */
#include <signal.h>
#endif

View File

@@ -18,35 +18,20 @@
#include <stdio.h>
#include <unistd.h>
#ifdef SUNDISPLAY
#ifndef NOPIXRECT
#ifndef DOS
#ifdef XWINDOW
#include <sys/time.h>
#include <pixrect/pixrect_hs.h>
#include <sunwindow/notify.h>
#include <sunwindow/rect.h>
#include <sunwindow/rectlist.h>
#include <sunwindow/pixwin.h>
#include <sunwindow/pw_util.h>
#include <sunwindow/win_struct.h>
#include <sunwindow/win_environ.h>
#include <sunwindow/cms.h>
#include <sunwindow/win_input.h>
#else
#include <sunwindow/window_hs.h>
#include <sunwindow/cms.h>
#include <sunwindow/win_ioctl.h>
#endif /* XWINDOW */
/* #include <sunwindow/win_screen.h> */
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <pixrect/pixrect_hs.h>
#include <sun/fbio.h>
#include <sys/ioctl.h>
#include <sys/file.h>
#endif /* DOS */
#include <pixrect/pr_planegroups.h>
#endif /* NOPIXRECT */
#endif /* SUNDISPLAY */
#ifdef OS4
#include <vfork.h>
@@ -93,8 +78,9 @@ extern DspInterfaceRec _curdsp, _coldsp;
#define FBTYPE_SUNFAST_COLOR 12
#endif
#ifndef NOPIXRECT
#ifdef SUNDISPLAY
struct screen LispScreen;
#ifndef NOPIXRECT
struct pixrect *CursorBitMap, *InvisibleCursorBitMap;
struct pixrect *SrcePixRect, *DestPixRect;
#ifdef DISPLAYBUFFER
@@ -106,6 +92,7 @@ int oldred[2], oldgreen[2], oldblue[2];
#endif /* DEBUG */
#endif /* DISPLAYBUFFER */
#endif /* NOPIXRECT */
#endif /* SUNDISPLAY */
int LispWindowFd = -1;
int FrameBufferFd = -1;
@@ -160,25 +147,23 @@ int Win_security_p;
/************************************************************************/
void init_cursor() {
#ifdef SUNDISPLAY
#ifndef NOPIXRECT
CursorBitMap = mem_create(CURSORWIDTH, CURSORHEIGHT, 1);
mpr_mdlinebytes(CursorBitMap) = CURSORWIDTH >> 3; /* 2(byte) */
#endif /* NOPIXRECT */
#ifdef SUNDISPLAY
CurrentCursor.cur_xhot = 0;
CurrentCursor.cur_yhot = 0;
CurrentCursor.cur_shape = CursorBitMap;
CurrentCursor.cur_function = PIX_SRC | PIX_DST;
#endif /* SUNDISPLAY */
/* Invisible Cursor */
/* Invisible Cursor */
#ifndef NOPIXRECT
InvisibleCursorBitMap = mem_create(0, 0, 1);
#endif /* NOPIXRECT */
#ifdef SUNDISPLAY
InvisibleCursor.cur_xhot = 0;
InvisibleCursor.cur_yhot = 0;
InvisibleCursor.cur_shape = InvisibleCursorBitMap;
@@ -373,10 +358,10 @@ void init_display2(DLword *display_addr, int display_max)
#endif /* DOS */
DBPRINT(("FBIOGTYPE w x h = %d x %d\n", displaywidth, displayheight));
#if (!defined(XWINDOW) && !defined(DOS))
#ifdef SUNDISPLAY
DBPRINT((" (real) type = %d\n", my_screen.fb_type));
DBPRINT((" (real) bpp = %d\n", my_screen.fb_depth));
#endif /* XWINDOW */
#endif /* SUNDISPLAY */
#ifdef SUNDISPLAY
/** now attempt to use the FBIOGATTR call for more information **/
@@ -558,11 +543,11 @@ void init_display2(DLword *display_addr, int display_max)
DBPRINT(("after clear_display()\n"));
#ifndef NOPIXRECT
#if defined(SUNDISPLAY) && !defined(NOPIXRECT)
/* initialize pixrect used in pilotbitblt */
SrcePixRect = mem_point(0, 0, 1, NULL);
DestPixRect = mem_point(0, 0, 1, NULL);
#endif /* NOPIXRECT */
#endif
DBPRINT(("exiting init_display\n"));
}

View File

@@ -11,18 +11,16 @@
#include "version.h"
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#ifndef DOS
#include <sys/file.h>
#include <sys/select.h>
#endif /* DOS */
#ifdef SUNDISPLAY
#include <sundev/kbd.h>
#include <sundev/kbio.h>
#endif /* SUNDISPLAY */
#ifdef DOS
#include <i32.h> /* "#pragma interrupt" & '_chain_intr'*/
@@ -33,15 +31,14 @@
#include <stk.h>
#endif /* DOS */
#include <fcntl.h>
#ifdef SUNDISPLAY
#ifndef DOS
#include <sundev/kbd.h>
#include <sundev/kbio.h>
#include <sunwindow/window_hs.h>
#include <sunwindow/cms.h>
#include <sys/ioctl.h>
#include <sunwindow/win_ioctl.h>
#include <pixrect/pixrect_hs.h>
#endif /* DOS */
#endif /* SUNDISPLAY */
#ifdef DOS
@@ -544,7 +541,7 @@ void keyboardtype(int fd)
type = KB_X;
#elif DOS
type = KB_DOS;
#else
#elif SUNDISPLAY
if (ioctl(fd, KIOCTYPE, &type) != 0) {
error("keyboardtype:IOCTL(KIOCTYPE) fails (cont. w. type-3");
type = KB_SUN3;