summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons/fade
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/fade
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/fade')
-rw-r--r--sys/dev/syscons/fade/fade_saver.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/sys/dev/syscons/fade/fade_saver.c b/sys/dev/syscons/fade/fade_saver.c
index 41176e7..0d31bd6 100644
--- a/sys/dev/syscons/fade/fade_saver.c
+++ b/sys/dev/syscons/fade/fade_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$
+ * $Id: fade_saver.c,v 1.13 1998/09/15 18:16:39 sos Exp $
*/
#include <sys/param.h>
@@ -44,26 +44,23 @@ static void
fade_saver(int blank)
{
static int count = 0;
+ u_char pal[256*3];
int i;
if (blank) {
scrn_blanked = 1;
+ cur_console->status |= SAVER_RUNNING;
switch (crtc_type) {
case KD_VGA:
if (count < 64) {
- outb(PIXMASK, 0xFF); /* no pixelmask */
- outb(PALWADR, 0x00);
- outb(PALDATA, 0);
- outb(PALDATA, 0);
- outb(PALDATA, 0);
- for (i = 3; i < 768; i++) {
- if (palette[i] - count > 15)
- outb(PALDATA, palette[i]-count);
+ pal[0] = pal[1] = pal[2] = 0;
+ for (i = 3; i < 256*3; i++) {
+ if (palette[i] - count > 60)
+ pal[i] = palette[i] - count;
else
- outb(PALDATA, 15);
+ pal[i] = 60;
}
- inb(crtc_addr+6); /* reset flip/flop */
- outb(ATC, 0x20); /* enable palette */
+ load_palette(cur_console, pal);
count++;
}
break;
@@ -100,6 +97,7 @@ fade_saver(int blank)
default:
break;
}
+ cur_console->status &= ~SAVER_RUNNING;
scrn_blanked = 0;
}
}
OpenPOWER on IntegriCloud