diff options
Diffstat (limited to 'lib/libvgl/main.c')
-rw-r--r-- | lib/libvgl/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libvgl/main.c b/lib/libvgl/main.c index 4334f4e..a7af6e9 100644 --- a/lib/libvgl/main.c +++ b/lib/libvgl/main.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: main.c,v 1.14 1997/08/15 12:32:59 sos Exp $ + * $Id: main.c,v 1.1 1997/08/17 21:09:34 sos Exp $ */ #include <stdio.h> @@ -45,12 +45,15 @@ static byte *VGLBuf; static byte *VGLMem; static int VGLSwitchPending; static int VGLOnDisplay; +static int VGLInitDone = 0; void VGLEnd() { struct vt_mode smode; + if (!VGLInitDone) + return; /* while (!VGLOnDisplay) pause(); VGLCheckSwitch();; @@ -65,6 +68,7 @@ struct vt_mode smode; ioctl(0, VT_SETMODE, &smode); free(VGLBuf); free(VGLDisplay); + VGLKeyboardEnd(); } static void @@ -169,6 +173,7 @@ VGLInit(int mode) return 1; } VGLTextSetFontFile((byte*)0); + VGLInitDone = 1; return 0; } |