VIDEO: Add proper WRU detection when SIM_VIDEO is used on OS X.
This commit is contained in:
parent
2f662f2053
commit
e40d81dbf2
2 changed files with 9 additions and 1 deletions
|
@ -2843,7 +2843,11 @@ runtty = cmdtty;
|
||||||
runtty.c_lflag = runtty.c_lflag & ~(ECHO | ICANON); /* no echo or edit */
|
runtty.c_lflag = runtty.c_lflag & ~(ECHO | ICANON); /* no echo or edit */
|
||||||
runtty.c_oflag = runtty.c_oflag & ~OPOST; /* no output edit */
|
runtty.c_oflag = runtty.c_oflag & ~OPOST; /* no output edit */
|
||||||
runtty.c_iflag = runtty.c_iflag & ~ICRNL; /* no cr conversion */
|
runtty.c_iflag = runtty.c_iflag & ~ICRNL; /* no cr conversion */
|
||||||
|
#if defined(USE_SIM_VIDEO) && defined(HAVE_LIBSDL)
|
||||||
|
runtty.c_cc[VINTR] = 0; /* OS X doesn't deliver SIGINT to main thread when enabled */
|
||||||
|
#else
|
||||||
runtty.c_cc[VINTR] = sim_int_char; /* interrupt */
|
runtty.c_cc[VINTR] = sim_int_char; /* interrupt */
|
||||||
|
#endif
|
||||||
runtty.c_cc[VQUIT] = 0; /* no quit */
|
runtty.c_cc[VQUIT] = 0; /* no quit */
|
||||||
runtty.c_cc[VERASE] = 0;
|
runtty.c_cc[VERASE] = 0;
|
||||||
runtty.c_cc[VKILL] = 0;
|
runtty.c_cc[VKILL] = 0;
|
||||||
|
@ -2879,7 +2883,11 @@ static t_stat sim_os_ttrun (void)
|
||||||
{
|
{
|
||||||
if (!isatty (fileno (stdin))) /* skip if !tty */
|
if (!isatty (fileno (stdin))) /* skip if !tty */
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
|
#if defined(USE_SIM_VIDEO) && defined(HAVE_LIBSDL)
|
||||||
|
runtty.c_cc[VINTR] = 0; /* OS X doesn't deliver SIGINT to main thread when enabled */
|
||||||
|
#else
|
||||||
runtty.c_cc[VINTR] = sim_int_char; /* in case changed */
|
runtty.c_cc[VINTR] = sim_int_char; /* in case changed */
|
||||||
|
#endif
|
||||||
if (tcsetattr (0, TCSAFLUSH, &runtty) < 0)
|
if (tcsetattr (0, TCSAFLUSH, &runtty) < 0)
|
||||||
return SCPE_TTIERR;
|
return SCPE_TTIERR;
|
||||||
if (prior_norm) { /* at normal pri? */
|
if (prior_norm) { /* at normal pri? */
|
||||||
|
|
|
@ -41,7 +41,7 @@ t_bool vid_mouse_b2 = FALSE;
|
||||||
t_bool vid_mouse_b3 = FALSE;
|
t_bool vid_mouse_b3 = FALSE;
|
||||||
char vid_release_key[64] = "Ctrl-Right-Shift";
|
char vid_release_key[64] = "Ctrl-Right-Shift";
|
||||||
|
|
||||||
#if HAVE_LIBSDL
|
#if defined(HAVE_LIBSDL)
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
#include <SDL_thread.h>
|
#include <SDL_thread.h>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue