ReactOS  0.4.15-dev-313-g8fde48b
xboxcons.c
Go to the documentation of this file.
1 /*
2  * FreeLoader
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #include <freeldr.h>
20 
21 static unsigned CurrentCursorX = 0;
22 static unsigned CurrentCursorY = 0;
23 static unsigned CurrentAttr = 0x0f;
24 
25 VOID
27 {
28  ULONG Width, Height, Unused;
29  BOOLEAN NeedScroll;
30 
31  XboxVideoGetDisplaySize(&Width, &Height, &Unused);
32 
33  NeedScroll = (CurrentCursorY >= Height);
34  if (NeedScroll)
35  {
38  }
39 
40  if (c == '\r')
41  {
42  CurrentCursorX = 0;
43  }
44  else if (c == '\n')
45  {
46  CurrentCursorX = 0;
47 
48  if (!NeedScroll)
50  }
51  else if (c == '\t')
52  {
53  CurrentCursorX = (CurrentCursorX + 8) & ~ 7;
54  }
55  else
56  {
59  }
60 
61  if (CurrentCursorX >= Width)
62  {
63  CurrentCursorX = 0;
65  }
66 }
67 
68 BOOLEAN
70 {
71  /* No keyboard support yet */
72  return FALSE;
73 }
74 
75 int
77 {
78  /* No keyboard support yet */
79  while (1) ;
80 
81  return 0;
82 }
83 
84 /* EOF */
BOOLEAN XboxConsKbHit(VOID)
Definition: xboxcons.c:69
_Must_inspect_result_ typedef _In_ PVOID Unused
Definition: iotypes.h:1129
VOID XboxConsPutChar(int c)
Definition: xboxcons.c:26
int XboxConsGetCh(void)
Definition: xboxcons.c:76
unsigned char BOOLEAN
VOID XboxVideoScrollUp(VOID)
Definition: xboxvideo.c:105
VOID XboxVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth)
Definition: xboxvideo.c:240
const GLubyte * c
Definition: glext.h:8905
static unsigned CurrentCursorX
Definition: xboxcons.c:21
VOID XboxVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y)
Definition: xboxvideo.c:133
static unsigned CurrentCursorY
Definition: xboxcons.c:22
unsigned int ULONG
Definition: retypes.h:1
static unsigned CurrentAttr
Definition: xboxcons.c:23