mirror of https://github.com/adamdruppe/arsd.git
flushing on input
This commit is contained in:
parent
6176f4d125
commit
b62ea55479
|
@ -1266,6 +1266,7 @@ struct RealTimeConsoleInput {
|
||||||
|
|
||||||
/// Get one character from the terminal
|
/// Get one character from the terminal
|
||||||
char getch() {
|
char getch() {
|
||||||
|
terminal.flush();
|
||||||
import core.stdc.stdio;
|
import core.stdc.stdio;
|
||||||
return cast(char) fgetc(stdin);
|
return cast(char) fgetc(stdin);
|
||||||
}
|
}
|
||||||
|
@ -1353,6 +1354,7 @@ struct RealTimeConsoleInput {
|
||||||
/// a generic event loop, currently under -version=with_eventloop and it will
|
/// a generic event loop, currently under -version=with_eventloop and it will
|
||||||
/// require the module arsd.eventloop (Linux only at this point)
|
/// require the module arsd.eventloop (Linux only at this point)
|
||||||
InputEvent nextEvent() {
|
InputEvent nextEvent() {
|
||||||
|
terminal.flush();
|
||||||
if(inputQueue.length) {
|
if(inputQueue.length) {
|
||||||
auto e = inputQueue[0];
|
auto e = inputQueue[0];
|
||||||
inputQueue = inputQueue[1 .. $];
|
inputQueue = inputQueue[1 .. $];
|
||||||
|
|
Loading…
Reference in New Issue