ref: 7848fe597006ecc6ee0605341ada08b7dea42f2a
parent: 8b9badd6a6d5880f090028ea2976886472dd0793
author: ftrvxmtrx <ftrvxmtrx@gmail.com>
date: Fri Jan 2 08:29:58 EST 2015
aux/vga: do not set mode 3 unless connected
--- a/sys/src/cmd/aux/vga/vesa.c
+++ b/sys/src/cmd/aux/vga/vesa.c
@@ -990,11 +990,11 @@
if(display == 0)
return 0;
- /* switch to common mode before trying */
- vbesetmode(vbe, 3);
-
cx = 1<<(display-1);
if(vbe->dspcon & cx){
+ /* switch to common mode before trying */
+ vbesetmode(vbe, 3);
+
vbesetup(vbe, &u, 0x5F64);
u.bx = 0;
u.cx = cx;