From b4fa798d9252ec2b16721ee1fdab0cbcd9e60cab Mon Sep 17 00:00:00 2001 From: HW Date: Mon, 9 Apr 2012 12:30:12 +0200 Subject: [PATCH] device recognition now fully automatic --- util.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/util.c b/util.c index 571792bf4..e8978f350 100644 --- a/util.c +++ b/util.c @@ -46,9 +46,19 @@ static int utf8charcode(lua_State *L) { return 1; } +static int isEmulated(lua_State *L) { +#ifdef EMULATE_READER + lua_pushinteger(L, 1); +#else + lua_pushinteger(L, 0); +#endif + return 1; +} + static const struct luaL_Reg util_func[] = { {"gettime", gettime}, {"utf8charcode", utf8charcode}, + {"isEmulated", isEmulated}, {NULL, NULL} };