From a11e065a35127c1014f7ace3f5d760898fb79ef8 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Wed, 28 Sep 2016 23:22:16 -0500 Subject: [PATCH] Adjust the mode-switching code to provide smoother transitions. This leaves the SHR screen active throughout the mode switch. --- vncdisplay.cc | 9 +++++---- vncsession.cc | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/vncdisplay.cc b/vncdisplay.cc index 2992486..db47930 100644 --- a/vncdisplay.cc +++ b/vncdisplay.cc @@ -124,16 +124,18 @@ static void ChangeResolution(int rez) { return; /* Already in right mode, so don't change things */ } - /* Perform the basic procedure described in IIgs TN #4 */ + /* Perform the basic procedure described in IIgs TN #4, + * with some adjustments to provide a smoother transition. + */ CloseAllNDAs(); QDAuxShutDown(); + SetMasterSCB(masterSCB | 0x100); /* To leave SHR screen active */ QDShutDown(); if (dpSpace == NULL) dpSpace = NewHandle(0x0300, userid(), attrLocked|attrFixed|attrNoCross|attrBank, 0x00000000); - QDStartUp((Word) *dpSpace, (rez == 640) ? 0xC087 : 0xC000, 0, userid()); + QDStartUp((Word) *dpSpace, (rez == 640) ? 0xC187 : 0xC100, 0, userid()); /* SCB 0x87 gives 640 mode with our custom gray palette */ - GrafOff(); QDAuxStartUp(); ClampMouse(0, (rez == 640) ? 639 : 319, 0, 199); HomeMouse(); @@ -143,7 +145,6 @@ static void ChangeResolution(int rez) { MenuNewRes(); CtlNewRes(); RefreshDesktop(NULL); - GrafOn(); /* Position new connection window at default location for new mode */ if (rez == 320) { diff --git a/vncsession.cc b/vncsession.cc index 4a22885..2dda8d3 100644 --- a/vncsession.cc +++ b/vncsession.cc @@ -124,13 +124,14 @@ void DoConnect (void) { SysBeep(); goto errorReturn; } + + CloseConnectStatusWindow(); + DoClose(newConnWindow); InitVNCWindow(); - CloseConnectStatusWindow(); InitCursor(); - DoClose(newConnWindow); DisableMItem(fileNewConnection); myEvent.wmTaskMask = 0x001D79FE; /* don't let TaskMaster process keys */