mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
- rcsim: fix compiler warning
This commit is contained in:
@@ -180,7 +180,7 @@ int main (int argc, char **argv){
|
||||
int evd;
|
||||
unsigned long sendcode=KEY_0;
|
||||
unsigned int keys = sizeof(keyname)/sizeof(struct key);
|
||||
unsigned long time=0;
|
||||
unsigned long rctime=0;
|
||||
unsigned long reptime=500;
|
||||
unsigned int offset;
|
||||
|
||||
@@ -212,7 +212,7 @@ int main (int argc, char **argv){
|
||||
}
|
||||
|
||||
if (argc>=3){
|
||||
time=(atol (argv[2])*1000)/reptime;
|
||||
rctime=(atol (argv[2])*1000)/reptime;
|
||||
}
|
||||
|
||||
#ifdef HAVE_DBOX_HARDWARE
|
||||
@@ -224,13 +224,13 @@ int main (int argc, char **argv){
|
||||
#else
|
||||
evd = -1; // close(-1) does not harm... ;)
|
||||
#endif
|
||||
printf ("sending key %s for %ld seconds\n",keyname[offset].name,(reptime*time)/1000);
|
||||
printf ("sending key %s for %ld seconds\n",keyname[offset].name,(reptime*rctime)/1000);
|
||||
if (push (evd,sendcode,KEY_PRESSED)<0){
|
||||
perror ("writing 'key_pressed' event failed");
|
||||
close (evd);
|
||||
return 1;
|
||||
}
|
||||
while (time--){
|
||||
while (rctime--){
|
||||
usleep(reptime*1000);
|
||||
if (push (evd,sendcode,KEY_AUTOREPEAT)<0){
|
||||
perror ("writing 'key_autorepeat' event failed");
|
||||
|
Reference in New Issue
Block a user