remove dependency on <linux/input.h>

* and kill a warning
pull/2/merge
Kefu Chai 12 years ago committed by Qingping Hou
parent ae780a543b
commit 8ce1aef0af

@ -44,7 +44,7 @@ static int handle(lua_State *L, ddjvu_context_t *ctx, int wait)
{
const ddjvu_message_t *msg;
if (!ctx)
return;
return -1;
if (wait)
msg = ddjvu_message_wait(ctx);
while ((msg = ddjvu_message_peek(ctx)))

@ -20,7 +20,12 @@
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
#ifdef EMULATE_READER
#include <SDL.h>
#define EV_KEY 0x01
#else
#include <linux/input.h>
#endif
#include "input.h"
#include <sys/types.h>
#include <sys/wait.h>
@ -138,6 +143,7 @@ static int openInputDevice(lua_State *L) {
}
static int closeInputDevices(lua_State *L) {
#ifndef EMULATE_READER
int i;
for(i=0; i<NUM_FDS; i++) {
if(inputfds[i] != -1) {
@ -151,6 +157,9 @@ static int closeInputDevices(lua_State *L) {
waitpid(-1, NULL, 0);
}
return 0;
#else
return 0;
#endif
}
static int waitForInput(lua_State *L) {

@ -18,10 +18,6 @@
#ifndef _PDF_INPUT_H
#define _PDF_INPUT_H
#ifdef EMULATE_READER
#include <SDL.h>
#endif
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>

Loading…
Cancel
Save