diff options
Diffstat (limited to 'arch/x86/boot/video.c')
-rw-r--r-- | arch/x86/boot/video.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86/boot/video.c b/arch/x86/boot/video.c index d42da3802499..43eda284d27f 100644 --- a/arch/x86/boot/video.c +++ b/arch/x86/boot/video.c | |||
@@ -27,6 +27,12 @@ static void store_cursor_position(void) | |||
27 | 27 | ||
28 | boot_params.screen_info.orig_x = oreg.dl; | 28 | boot_params.screen_info.orig_x = oreg.dl; |
29 | boot_params.screen_info.orig_y = oreg.dh; | 29 | boot_params.screen_info.orig_y = oreg.dh; |
30 | |||
31 | if (oreg.ch & 0x20) | ||
32 | boot_params.screen_info.flags |= VIDEO_FLAGS_NOCURSOR; | ||
33 | |||
34 | if ((oreg.ch & 0x1f) > (oreg.cl & 0x1f)) | ||
35 | boot_params.screen_info.flags |= VIDEO_FLAGS_NOCURSOR; | ||
30 | } | 36 | } |
31 | 37 | ||
32 | static void store_video_mode(void) | 38 | static void store_video_mode(void) |
@@ -292,11 +298,18 @@ static void restore_screen(void) | |||
292 | } | 298 | } |
293 | 299 | ||
294 | /* Restore cursor position */ | 300 | /* Restore cursor position */ |
301 | if (saved.curx >= xs) | ||
302 | saved.curx = xs-1; | ||
303 | if (saved.cury >= ys) | ||
304 | saved.cury = ys-1; | ||
305 | |||
295 | initregs(&ireg); | 306 | initregs(&ireg); |
296 | ireg.ah = 0x02; /* Set cursor position */ | 307 | ireg.ah = 0x02; /* Set cursor position */ |
297 | ireg.dh = saved.cury; | 308 | ireg.dh = saved.cury; |
298 | ireg.dl = saved.curx; | 309 | ireg.dl = saved.curx; |
299 | intcall(0x10, &ireg, NULL); | 310 | intcall(0x10, &ireg, NULL); |
311 | |||
312 | store_cursor_position(); | ||
300 | } | 313 | } |
301 | 314 | ||
302 | void set_video(void) | 315 | void set_video(void) |