enabling detection of long button pressing..

master
steffen 12 years ago
parent bb720fa2d8
commit 465eb3647f

@ -1,6 +1,9 @@
Version 0.0.2: name changed to spOSMroute, since on there had been another Version 0.0.2: name changed to spOSMroute, since on there had been another
OSMroute already. OSMroute already.
============================================================================= =============================================================================
(2014-02-05):
- fixed: pressing the button long time did not work.
(2014-01-20): (2014-01-20):
- fixed: disabled screensaver on Android - fixed: disabled screensaver on Android

@ -253,6 +253,8 @@ int msdl_eventloop () {
int main (int argc, char **argv) { int main (int argc, char **argv) {
SDL_Surface *scr; SDL_Surface *scr;
static time_t to;
time_t t1;
/* Initialize SDL for video output */ /* Initialize SDL for video output */
if (SDL_Init (SDL_INIT_VIDEO | SDL_INIT_TIMER) < 0) { if (SDL_Init (SDL_INIT_VIDEO | SDL_INIT_TIMER) < 0) {
@ -275,6 +277,13 @@ int main (int argc, char **argv) {
while (app.status != APPSTATUS_quit) { while (app.status != APPSTATUS_quit) {
while (msdl_eventloop ()); while (msdl_eventloop ());
t1 = time (NULL);
if (to != t1) {
app_loop ();
to = t1;
}
draw (); draw ();
} }
@ -286,7 +295,7 @@ int main (int argc, char **argv) {
void main_wnd_update () { void main_wnd_update () {
// d_printf ("main_wnd_update"); d_printf ("main_wnd_update");
while (msdl_eventloop ()); while (msdl_eventloop ());
} }

Loading…
Cancel
Save