IMLAC: Fixes for the display.
Don't open a display window during power-on reset. Change #ifdefs to USE_DISPLAY.
This commit is contained in:
parent
5cc86e2440
commit
26f9c7a748
2 changed files with 8 additions and 8 deletions
|
@ -47,7 +47,7 @@ static DEBTAB crt_deb[] = {
|
||||||
{ NULL, 0 }
|
{ NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(USE_SIM_VIDEO) && defined(HAVE_LIBSDL)
|
#ifdef USE_DISPLAY
|
||||||
#define CRT_DIS 0
|
#define CRT_DIS 0
|
||||||
#else
|
#else
|
||||||
#define CRT_DIS DEV_DIS
|
#define CRT_DIS DEV_DIS
|
||||||
|
@ -65,7 +65,7 @@ DEVICE crt_dev = {
|
||||||
static t_stat
|
static t_stat
|
||||||
crt_svc(UNIT *uptr)
|
crt_svc(UNIT *uptr)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LIBSDL
|
#ifdef USE_DISPLAY
|
||||||
imlac_cycle (100, 0);
|
imlac_cycle (100, 0);
|
||||||
sim_activate_after (uptr, 100);
|
sim_activate_after (uptr, 100);
|
||||||
if (crt_quit) {
|
if (crt_quit) {
|
||||||
|
@ -84,8 +84,8 @@ static void crt_quit_callback (void)
|
||||||
static t_stat
|
static t_stat
|
||||||
crt_reset (DEVICE *dptr)
|
crt_reset (DEVICE *dptr)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LIBSDL
|
#ifdef USE_DISPLAY
|
||||||
if (dptr->flags & DEV_DIS) {
|
if (dptr->flags & DEV_DIS || (sim_switches & SWMASK('P')) != 0) {
|
||||||
display_close (dptr);
|
display_close (dptr);
|
||||||
sim_cancel (&crt_unit);
|
sim_cancel (&crt_unit);
|
||||||
} else {
|
} else {
|
||||||
|
@ -102,7 +102,7 @@ void
|
||||||
crt_point (uint16 x, uint16 y)
|
crt_point (uint16 x, uint16 y)
|
||||||
{
|
{
|
||||||
sim_debug (DBG, &crt_dev, "Point %d,%d\n", x, y);
|
sim_debug (DBG, &crt_dev, "Point %d,%d\n", x, y);
|
||||||
#ifdef HAVE_LIBSDL
|
#ifdef USE_DISPLAY
|
||||||
if (crt_dev.flags & DEV_DIS)
|
if (crt_dev.flags & DEV_DIS)
|
||||||
return;
|
return;
|
||||||
imlac_point ((x & 03777) >> 1, (y & 03777) >> 1);
|
imlac_point ((x & 03777) >> 1, (y & 03777) >> 1);
|
||||||
|
@ -113,7 +113,7 @@ void
|
||||||
crt_line (uint16 x1, uint16 y1, uint16 x2, uint16 y2)
|
crt_line (uint16 x1, uint16 y1, uint16 x2, uint16 y2)
|
||||||
{
|
{
|
||||||
sim_debug (DBG, &crt_dev, "Line %d,%d - %d,%d\n", x1, y1, x2, y2);
|
sim_debug (DBG, &crt_dev, "Line %d,%d - %d,%d\n", x1, y1, x2, y2);
|
||||||
#ifdef HAVE_LIBSDL
|
#ifdef USE_DISPLAY
|
||||||
if (crt_dev.flags & DEV_DIS)
|
if (crt_dev.flags & DEV_DIS)
|
||||||
return;
|
return;
|
||||||
imlac_line ((x1 & 03777) >> 1, (y1 & 03777) >> 1,
|
imlac_line ((x1 & 03777) >> 1, (y1 & 03777) >> 1,
|
||||||
|
|
|
@ -575,14 +575,14 @@ kbd_event (SIM_KEY_EVENT *ev)
|
||||||
static t_stat
|
static t_stat
|
||||||
kbd_reset (DEVICE *dptr)
|
kbd_reset (DEVICE *dptr)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LIBSDL
|
#ifdef USE_DISPLAY
|
||||||
vid_display_kb_event_process = NULL;
|
vid_display_kb_event_process = NULL;
|
||||||
#endif
|
#endif
|
||||||
if (dptr->flags & DEV_DIS)
|
if (dptr->flags & DEV_DIS)
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
|
|
||||||
if (kbd_type == KBD_DISPLAY)
|
if (kbd_type == KBD_DISPLAY)
|
||||||
#ifdef HAVE_LIBSDL
|
#ifdef USE_DISPLAY
|
||||||
vid_display_kb_event_process = kbd_event;
|
vid_display_kb_event_process = kbd_event;
|
||||||
#else
|
#else
|
||||||
;
|
;
|
||||||
|
|
Loading…
Add table
Reference in a new issue