Fixed error when trying to read keyboard when there are no chars ready
This commit is contained in:
parent
1b093acfe6
commit
a729949d4c
10
src/main.cpp
10
src/main.cpp
|
@ -489,9 +489,13 @@ class Emulator {
|
||||||
|
|
||||||
// Input
|
// Input
|
||||||
case 0x1E: {
|
case 0x1E: {
|
||||||
uint8_t c = e->input.front();
|
if (e->input.size()) {
|
||||||
e->input.pop();
|
uint8_t c = e->input.front();
|
||||||
return c;
|
e->input.pop();
|
||||||
|
return c;
|
||||||
|
} else {
|
||||||
|
return 0x00;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Has input
|
// Has input
|
||||||
|
|
Loading…
Reference in New Issue
Block a user