summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons/daemon
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>1998-09-17 19:40:30 +0000
committersos <sos@FreeBSD.org>1998-09-17 19:40:30 +0000
commit34a7bb526b09dfefeddd135bf9bd0fbf45b73f83 (patch)
tree6e8a84dc1ce02d9a19af2b93c3b396b21a8dd106 /sys/dev/syscons/daemon
parent890cb330a4916be73a5adfc951810888402c4f04 (diff)
downloadFreeBSD-src-34a7bb526b09dfefeddd135bf9bd0fbf45b73f83.zip
FreeBSD-src-34a7bb526b09dfefeddd135bf9bd0fbf45b73f83.tar.gz
Fix the sreensavers so the work again with the new syscons & friends.
Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
Diffstat (limited to 'sys/dev/syscons/daemon')
-rw-r--r--sys/dev/syscons/daemon/daemon_saver.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/dev/syscons/daemon/daemon_saver.c b/sys/dev/syscons/daemon/daemon_saver.c
index 688df41..59e99f0 100644
--- a/sys/dev/syscons/daemon/daemon_saver.c
+++ b/sys/dev/syscons/daemon/daemon_saver.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: daemon_saver.c,v 1.9 1998/08/06 09:14:20 yokota Exp $
+ * $Id: daemon_saver.c,v 1.10 1998/09/15 18:16:38 sos Exp $
*/
#include <sys/param.h>
@@ -43,7 +43,7 @@
#include <saver.h>
#define CONSOLE_VECT(x, y) \
- ((u_short*)(Crtat + (y)*cur_console->xsize + (x)))
+ (window + (y)*cur_console->xsize + (x))
#define DAEMON_MAX_WIDTH 32
#define DAEMON_MAX_HEIGHT 19
@@ -52,6 +52,7 @@ MOD_MISC(daemon_saver);
static char *message;
static int messagelen;
+static u_short *window;
/* Who is the author of this ASCII pic? */
@@ -201,10 +202,14 @@ daemon_saver(int blank)
int min, max;
if (blank) {
+ if (!ISTEXTSC(scp))
+ return;
if (scrn_blanked == 0) {
+ scp->status |= SAVER_RUNNING;
+ window = (u_short *)(*biosvidsw.adapter)(scp->adp)->va_window;
/* clear the screen and set the border color */
fillw(((FG_LIGHTGREY|BG_BLACK) << 8) | scr_map[0x20],
- Crtat, scp->xsize * scp->ysize);
+ window, scp->xsize * scp->ysize);
set_border(scp, 0);
xlen = ylen = tlen = 0;
}
@@ -324,6 +329,7 @@ daemon_saver(int blank)
if (scrn_blanked > 0) {
set_border(scp, scp->border);
scrn_blanked = 0;
+ scp->status &= ~SAVER_RUNNING;
}
}
}
@@ -333,9 +339,6 @@ daemon_saver_load(struct lkm_table *lkmtp, int cmd)
{
int err;
- if (cur_console->mode >= M_VESA_BASE)
- return ENODEV;
-
messagelen = strlen(hostname) + 3 + strlen(ostype) + 1 +
strlen(osrelease);
message = malloc(messagelen + 1, M_DEVBUF, M_WAITOK);
OpenPOWER on IntegriCloud