summaryrefslogtreecommitdiff
path: root/pm
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2008-05-10 08:44:05 -0500
committerVictor Lowther <victor.lowther@gmail.com>2008-05-10 08:44:05 -0500
commit49ef4f784d8489780542736d748cad04fe05a34f (patch)
treec194916cca9167982033bf617b9b2313d9fef3f0 /pm
parentb8fb53358d2aa90d694080486bd7f828d891e0be (diff)
Added special-casing of mode 3 in vbe_restoremode
When we are restoring our vbe mode back to mode 3 (a text mode), use vga routines instead of vbe routines. Matthew Garret says it is more stable that way.
Diffstat (limited to 'pm')
-rwxr-xr-xpm/sleep.d/99video11
1 files changed, 10 insertions, 1 deletions
diff --git a/pm/sleep.d/99video b/pm/sleep.d/99video
index 119830b..c8efd12 100755
--- a/pm/sleep.d/99video
+++ b/pm/sleep.d/99video
@@ -81,7 +81,16 @@ vbe_restorestate() { restorestate vbestate |vbe vbestate restore; }
# save/restore the vbe mode
vbe_savemode() { vbe vbemode get |savestate vbemode; }
-vbe_restoremode() { vbe vbemode set $(restorestate vbemode); }
+vbe_restoremode()
+{
+ # this is a little mode complicated to handle special-casing mode 3.
+ local vbemode=$(restorestate vbemode)
+ if [ "$vbemode" = "3" ]; then
+ vbe vgamode set $vbemode
+ else
+ vbe vbemode set $vbemode
+ fi
+}
# post the video card
vbe_post() { vbe post; sleep 0.1; }