- Remember to flip the foreground and background color attributes in
gfb_draw if 'flip' is specified. This causes the mouse cut region to be displayed in reverse color so it is visbile. - Use the "other" implementation of gfb_cursor for the creator driver, which doesn't assume there is a hardware cursor. It seems that the hardware cursor that creator provides doesn't display the character under the cursor in reverse colors, so the driver does this manually and uses the hardware cursor for the mouse pointer (which it also works much better for). This is wedged here because it required less hoops than accessing the syscons vtb from inside the video driver, which is needed to read the character and color attributes under the new cursor position.
This commit is contained in:
parent
20c2ee6292
commit
62d020e729
@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include "opt_syscons.h"
|
||||
#include "opt_gfb.h"
|
||||
#include "opt_creator.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -128,8 +129,8 @@ gfb_border(scr_stat *scp, int color)
|
||||
static void
|
||||
gfb_draw(scr_stat *scp, int from, int count, int flip)
|
||||
{
|
||||
char c;
|
||||
char a;
|
||||
int c;
|
||||
int a;
|
||||
int i, n;
|
||||
video_adapter_t *adp;
|
||||
|
||||
@ -181,7 +182,7 @@ gfb_draw(scr_stat *scp, int from, int count, int flip)
|
||||
c = sc_vtb_getc(&scp->vtb, from);
|
||||
a = sc_vtb_geta(&scp->vtb, from) >> 8;
|
||||
(*vidsw[scp->sc->adapter]->putc)(adp, from, c,
|
||||
a);
|
||||
(a >> 4) | ((a & 0xf) << 4));
|
||||
}
|
||||
else {
|
||||
(*vidsw[scp->sc->adapter]->puts)(adp, from,
|
||||
@ -207,13 +208,14 @@ gfb_cursor_shape(scr_stat *scp, int base, int height, int blink)
|
||||
|
||||
static int pxlblinkrate = 0;
|
||||
|
||||
#if 0
|
||||
#ifdef DEV_CREATOR
|
||||
static void
|
||||
gfb_cursor(scr_stat *scp, int at, int blink, int on, int flip)
|
||||
{
|
||||
video_adapter_t *adp;
|
||||
int a, c;
|
||||
|
||||
if (scp->cursor_height <= 0) /* the text cursor is disabled */
|
||||
if (scp->curs_attr.height <= 0) /* the text cursor is disabled */
|
||||
return;
|
||||
|
||||
adp = scp->sc->adp;
|
||||
@ -234,11 +236,16 @@ gfb_cursor(scr_stat *scp, int at, int blink, int on, int flip)
|
||||
scp->status &= ~VR_CURSOR_BLINK;
|
||||
if(on) {
|
||||
scp->status |= VR_CURSOR_ON;
|
||||
scp->cursor_saveunder_char = sc_vtb_getc(&scp->scr, at);
|
||||
scp->cursor_saveunder_attr = sc_vtb_geta(&scp->scr, at);
|
||||
(*vidsw[scp->sc->adapter]->putc)(scp->sc->adp,
|
||||
scp->cursor_oldpos,
|
||||
sc_vtb_getc(&scp->vtb, scp->cursor_oldpos),
|
||||
sc_vtb_geta(&scp->vtb, scp->cursor_oldpos) >> 8);
|
||||
a = sc_vtb_geta(&scp->vtb, at) >> 8;
|
||||
c = sc_vtb_getc(&scp->vtb, at);
|
||||
(*vidsw[scp->sc->adapter]->putc)(scp->sc->adp, at,
|
||||
scp->cursor_saveunder_char,
|
||||
scp->cursor_saveunder_attr);
|
||||
c, (a >> 4) | ((a & 0xf) << 4));
|
||||
scp->cursor_saveunder_attr = a;
|
||||
scp->cursor_saveunder_char = c;
|
||||
} else {
|
||||
if (scp->status & VR_CURSOR_ON)
|
||||
(*vidsw[scp->sc->adapter]->putc)(scp->sc->adp,
|
||||
@ -248,8 +255,7 @@ gfb_cursor(scr_stat *scp, int at, int blink, int on, int flip)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
static void
|
||||
gfb_cursor(scr_stat *scp, int at, int blink, int on, int flip)
|
||||
{
|
||||
@ -286,6 +292,7 @@ gfb_cursor(scr_stat *scp, int at, int blink, int on, int flip)
|
||||
else
|
||||
scp->status &= ~VR_CURSOR_BLINK;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
gfb_blink(scr_stat *scp, int at, int flip)
|
||||
|
Loading…
Reference in New Issue
Block a user