Replace ukbhit by kbd_enter_pressed, not requiring tcgetattr:
Note that it behaves differently now * it looks for Enter key only, not any key * it "eats" the input, no need for (void)getchar() after it * it works the same no matter the value of ICANON * the mingw version has been adapted to act the similarly This should fix its usage on Android where tcgetattr always returns -1
This commit is contained in:
@@ -133,8 +133,8 @@ end
|
||||
-- @return if successfull: an table containing card info
|
||||
-- @return if unsuccessfull : nil, error
|
||||
local function waitFor15693()
|
||||
print('Waiting for card... press any key to quit')
|
||||
while not core.ukbhit() do
|
||||
print('Waiting for card... press Enter to quit')
|
||||
while not core.kbd_enter_pressed() do
|
||||
res, err = read15693()
|
||||
if res then return res end
|
||||
-- err means that there was no response from card
|
||||
|
||||
Reference in New Issue
Block a user