From 6b7a4a13b058f1fe9eb9b623b45d0c8c8b0859d6 Mon Sep 17 00:00:00 2001 From: Yourtion Date: Mon, 16 May 2016 11:46:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9B=B4=E5=A4=9A=E7=9A=84?= =?UTF-8?q?=E5=91=BD=E4=BB=A4=E8=A1=8C=E7=AA=97=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 26_day/bootpack.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/26_day/bootpack.c b/26_day/bootpack.c index abada65..3ec1287 100644 --- a/26_day/bootpack.c +++ b/26_day/bootpack.c @@ -21,7 +21,7 @@ void HariMain(void) struct MOUSE_DEC mdec; struct MEMMAN *memman = (struct MEMMAN *) MEMMAN_ADDR; unsigned char *buf_back, buf_mouse[256], *buf_cons[2]; - struct SHEET *sht_back, *sht_mouse, *sht_cons[2]; + struct SHEET *sht_back, *sht_mouse; struct TASK *task_a, *task_cons[2], *task; static char keytable0[0x80] = { 0, 0, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '^', 0x08, 0, @@ -77,8 +77,7 @@ void HariMain(void) init_screen8(buf_back, binfo->scrnx, binfo->scrny); /* sht_cons */ - sht_cons[0] = open_console(shtctl, memtotal); - sht_cons[1] = 0; + key_win = open_console(shtctl, memtotal); /* sht_mouse */ sht_mouse = sheet_alloc(shtctl); @@ -88,12 +87,11 @@ void HariMain(void) my = (binfo->scrny - 28 - 16) / 2; sheet_slide(sht_back, 0, 0); - sheet_slide(sht_cons[0], 32, 4); + sheet_slide(key_win, 32, 4); sheet_slide(sht_mouse, mx, my); sheet_updown(sht_back, 0); - sheet_updown(sht_cons[0], 1); + sheet_updown(key_win, 1); sheet_updown(sht_mouse, 2); - key_win = sht_cons[0]; keywin_on(key_win); /*为了避免和键盘当前状态冲突,在一开始先进行设置*/ @@ -194,13 +192,11 @@ void HariMain(void) io_sti(); } } - if (i == 256 + 0x3c && key_shift != 0 && sht_cons[1] == 0) { /* Shift+F2 */ - sht_cons[1] = open_console(shtctl, memtotal); - sheet_slide(sht_cons[1], 32, 4); - sheet_updown(sht_cons[1], shtctl->top); - /*自动将输入焦点切换到新打开的命令行窗口(这样比较方便吧?) */ + if (i == 256 + 0x3c && key_shift != 0 ) { /* Shift+F2 */ keywin_off(key_win); - key_win = sht_cons[1]; + key_win = open_console(shtctl, memtotal); + sheet_slide(key_win, 32, 4); + sheet_updown(key_win, shtctl->top); keywin_on(key_win); } if (i == 256 + 0x57) { /* F11 */