diff options
Diffstat (limited to 'apps/plugins/minesweeper.c')
-rw-r--r-- | apps/plugins/minesweeper.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/plugins/minesweeper.c b/apps/plugins/minesweeper.c index 266d12fc8d..c37c9e8795 100644 --- a/apps/plugins/minesweeper.c +++ b/apps/plugins/minesweeper.c | |||
@@ -192,7 +192,7 @@ enum minesweeper_status { | |||
192 | #error No keymap defined! | 192 | #error No keymap defined! |
193 | #endif | 193 | #endif |
194 | 194 | ||
195 | #ifdef HAVE_TOUCHPAD | 195 | #ifdef HAVE_TOUCHSCREEN |
196 | #ifndef MINESWP_QUIT | 196 | #ifndef MINESWP_QUIT |
197 | # define MINESWP_QUIT BUTTON_TOPLEFT | 197 | # define MINESWP_QUIT BUTTON_TOPLEFT |
198 | #endif | 198 | #endif |
@@ -305,7 +305,7 @@ int stack_pos = 0; | |||
305 | /* a usefull string for snprintf */ | 305 | /* a usefull string for snprintf */ |
306 | char str[30]; | 306 | char str[30]; |
307 | 307 | ||
308 | #ifdef HAVE_TOUCHPAD | 308 | #ifdef HAVE_TOUCHSCREEN |
309 | 309 | ||
310 | #include "lib/touchscreen.h" | 310 | #include "lib/touchscreen.h" |
311 | static struct ts_raster mine_raster = { 0, 0, MAX_WIDTH, MAX_HEIGHT, TileSize, TileSize }; | 311 | static struct ts_raster mine_raster = { 0, 0, MAX_WIDTH, MAX_HEIGHT, TileSize, TileSize }; |
@@ -485,7 +485,7 @@ void mine_show( void ) | |||
485 | button = rb->button_get(true); | 485 | button = rb->button_get(true); |
486 | while( ( button == BUTTON_NONE ) | 486 | while( ( button == BUTTON_NONE ) |
487 | || ( button & (BUTTON_REL|BUTTON_REPEAT) ) ); | 487 | || ( button & (BUTTON_REL|BUTTON_REPEAT) ) ); |
488 | #ifdef HAVE_TOUCHPAD | 488 | #ifdef HAVE_TOUCHSCREEN |
489 | button = BUTTON_NONE; | 489 | button = BUTTON_NONE; |
490 | #endif | 490 | #endif |
491 | } | 491 | } |
@@ -582,7 +582,7 @@ enum minesweeper_status minesweeper( void ) | |||
582 | top = (LCD_HEIGHT-height*TileSize)/2; | 582 | top = (LCD_HEIGHT-height*TileSize)/2; |
583 | left = (LCD_WIDTH-width*TileSize)/2; | 583 | left = (LCD_WIDTH-width*TileSize)/2; |
584 | 584 | ||
585 | #ifdef HAVE_TOUCHPAD | 585 | #ifdef HAVE_TOUCHSCREEN |
586 | mine_raster.tl_x = left; | 586 | mine_raster.tl_x = left; |
587 | mine_raster.tl_y = top; | 587 | mine_raster.tl_y = top; |
588 | mine_raster.width = width*TileSize; | 588 | mine_raster.width = width*TileSize; |
@@ -633,21 +633,21 @@ enum minesweeper_status minesweeper( void ) | |||
633 | rb->lcd_update(); | 633 | rb->lcd_update(); |
634 | 634 | ||
635 | button = rb->button_get(true); | 635 | button = rb->button_get(true); |
636 | #ifdef HAVE_TOUCHPAD | 636 | #ifdef HAVE_TOUCHSCREEN |
637 | if(button & BUTTON_TOUCHPAD) | 637 | if(button & BUTTON_TOUCHSCREEN) |
638 | { | 638 | { |
639 | struct ts_raster_result res; | 639 | struct ts_raster_result res; |
640 | if(touchscreen_map_raster(&mine_raster, rb->button_get_data() >> 16, rb->button_get_data() & 0xffff, &res) == 1) | 640 | if(touchscreen_map_raster(&mine_raster, rb->button_get_data() >> 16, rb->button_get_data() & 0xffff, &res) == 1) |
641 | { | 641 | { |
642 | button &= ~BUTTON_TOUCHPAD; | 642 | button &= ~BUTTON_TOUCHSCREEN; |
643 | lastbutton &= ~BUTTON_TOUCHPAD; | 643 | lastbutton &= ~BUTTON_TOUCHSCREEN; |
644 | 644 | ||
645 | if(button & BUTTON_REPEAT && lastbutton != MINESWP_TOGGLE && lastbutton ^ BUTTON_REPEAT) | 645 | if(button & BUTTON_REPEAT && lastbutton != MINESWP_TOGGLE && lastbutton ^ BUTTON_REPEAT) |
646 | button = MINESWP_TOGGLE; | 646 | button = MINESWP_TOGGLE; |
647 | else if(button == BUTTON_REL && lastbutton ^ BUTTON_REPEAT) | 647 | else if(button == BUTTON_REL && lastbutton ^ BUTTON_REPEAT) |
648 | button = MINESWP_DISCOVER; | 648 | button = MINESWP_DISCOVER; |
649 | else | 649 | else |
650 | button |= BUTTON_TOUCHPAD; | 650 | button |= BUTTON_TOUCHSCREEN; |
651 | 651 | ||
652 | x = res.x; | 652 | x = res.x; |
653 | y = res.y; | 653 | y = res.y; |