File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 17
17
18
18
* Github: https://github.com/mikecovlee
19
19
*/
20
- #ifndef CS_DEBUG
21
20
#define DARWIN_DISABLE_LOG
22
- #endif
23
21
#define DARWIN_FORCE_BUILTIN
24
22
25
23
#include < darwin/darwin.hpp>
Original file line number Diff line number Diff line change @@ -110,7 +110,26 @@ namespace conio {
110
110
111
111
static void clrscr ()
112
112
{
113
- system (" cls" );
113
+ static CONSOLE_SCREEN_BUFFER_INFO csbi;
114
+ static DWORD dwWritten;
115
+ GetConsoleScreenBufferInfo (
116
+ StdHandle,
117
+ &csbi);
118
+ FillConsoleOutputAttribute (
119
+ StdHandle,
120
+ csbi.wAttributes ,
121
+ csbi.dwSize .X * csbi.dwSize .Y ,
122
+ {0 , 0 },
123
+ &dwWritten);
124
+ FillConsoleOutputCharacterW (
125
+ StdHandle,
126
+ L' ' ,
127
+ csbi.dwSize .X * csbi.dwSize .Y ,
128
+ {0 , 0 },
129
+ &dwWritten);
130
+ SetConsoleCursorPosition (
131
+ StdHandle,
132
+ {0 , 0 });
114
133
}
115
134
116
135
static int getch ()
You can’t perform that action at this time.
0 commit comments