mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
GLK: ADVSYS: Added readLine method
This commit is contained in:
parent
d29727d02a
commit
8759a9e851
@ -40,8 +40,21 @@ void GlkInterface::print(int number) {
|
||||
}
|
||||
|
||||
Common::String GlkInterface::readLine() {
|
||||
// TODO: Stub
|
||||
return "";
|
||||
event_t ev;
|
||||
char line[200];
|
||||
|
||||
glk_request_line_event(_window, line, 199, 0);
|
||||
|
||||
do {
|
||||
glk_select(&ev);
|
||||
if (ev.type == evtype_Quit)
|
||||
return "";
|
||||
else if (ev.type == evtype_LineInput)
|
||||
break;
|
||||
} while (!shouldQuit() && ev.type != evtype_Quit);
|
||||
|
||||
line[199] = '\0';
|
||||
return Common::String(line);
|
||||
}
|
||||
|
||||
} // End of namespace AdvSys
|
||||
|
Loading…
Reference in New Issue
Block a user