diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2009-05-21 16:54:00 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-05-21 20:54:40 -0500 |
commit | 993fbfdb1b1a8d9b3d32ed57afc70a7be1a5e9dc (patch) | |
tree | b0babc07fa0cd9a00c8b072618f7492434884746 /qemu-char.c | |
parent | ec6bd8dea77478f32981a5df49f66ca2430ad19d (diff) | |
download | qemu-993fbfdb1b1a8d9b3d32ed57afc70a7be1a5e9dc.tar.gz qemu-993fbfdb1b1a8d9b3d32ed57afc70a7be1a5e9dc.tar.bz2 qemu-993fbfdb1b1a8d9b3d32ed57afc70a7be1a5e9dc.zip |
Refactor how display drivers are selected
My previous commit, f92f8afebe, broke -vnc (spotted by Glauber Costa). This
is because it's necessary to tell when the no special display parameters have
been passed and default to SDL or VNC appropriately.
This refactors the display selection logic to be less complicated which has
the effect of fixing the regression mentioned above.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu-char.c')
-rw-r--r-- | qemu-char.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qemu-char.c b/qemu-char.c index 664cbfdbd5..1c0c9f5dff 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -571,7 +571,7 @@ static void fd_chr_update_read_handler(CharDriverState *chr) FDCharDriver *s = chr->opaque; if (s->fd_in >= 0) { - if (nographic && s->fd_in == 0) { + if (display_type == DT_NOGRAPHIC && s->fd_in == 0) { } else { qemu_set_fd_handler2(s->fd_in, fd_chr_read_poll, fd_chr_read, NULL, chr); @@ -584,7 +584,7 @@ static void fd_chr_close(struct CharDriverState *chr) FDCharDriver *s = chr->opaque; if (s->fd_in >= 0) { - if (nographic && s->fd_in == 0) { + if (display_type == DT_NOGRAPHIC && s->fd_in == 0) { } else { qemu_set_fd_handler2(s->fd_in, NULL, NULL, NULL, NULL); } @@ -714,7 +714,7 @@ static void term_init(void) tty.c_oflag |= OPOST; tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN); /* if graphical mode, we allow Ctrl-C handling */ - if (nographic) + if (display_type == DT_NOGRAPHIC) tty.c_lflag &= ~ISIG; tty.c_cflag &= ~(CSIZE|PARENB); tty.c_cflag |= CS8; |