diff options
-rw-r--r-- | apps/codecs/libwmapro/wmaprodec.c | 12 | ||||
-rw-r--r-- | apps/plugins/chessbox/chessbox.c | 7 | ||||
-rw-r--r-- | apps/plugins/cube.c | 8 | ||||
-rw-r--r-- | apps/plugins/flipit.c | 6 | ||||
-rw-r--r-- | apps/plugins/fractals/fractal.c | 11 | ||||
-rw-r--r-- | apps/plugins/oscilloscope.c | 6 | ||||
-rw-r--r-- | apps/plugins/rockblox.c | 4 | ||||
-rw-r--r-- | apps/plugins/sliding_puzzle.c | 4 | ||||
-rw-r--r-- | apps/plugins/star.c | 8 | ||||
-rw-r--r-- | apps/plugins/text_viewer/text_viewer.c | 4 | ||||
-rw-r--r-- | apps/plugins/vu_meter.c | 4 |
11 files changed, 63 insertions, 11 deletions
diff --git a/apps/codecs/libwmapro/wmaprodec.c b/apps/codecs/libwmapro/wmaprodec.c index 018ea7c304..c72bd0f10f 100644 --- a/apps/codecs/libwmapro/wmaprodec.c +++ b/apps/codecs/libwmapro/wmaprodec.c | |||
@@ -1382,20 +1382,16 @@ static int decode_frame(WMAProDecodeCtx *s) | |||
1382 | /** no idea what these are for, might be the number of samples | 1382 | /** no idea what these are for, might be the number of samples |
1383 | that need to be skipped at the beginning or end of a stream */ | 1383 | that need to be skipped at the beginning or end of a stream */ |
1384 | if (get_bits1(gb)) { | 1384 | if (get_bits1(gb)) { |
1385 | int skip; | ||
1386 | |||
1387 | /** usually true for the first frame */ | 1385 | /** usually true for the first frame */ |
1388 | if (get_bits1(gb)) { | 1386 | if (get_bits1(gb)) { |
1389 | skip = get_bits(gb, av_log2(s->samples_per_frame * 2)); | 1387 | get_bits(gb, av_log2(s->samples_per_frame * 2)); |
1390 | DEBUGF("start skip: %i\n", skip); | 1388 | DEBUGF("start skip\n"); |
1391 | } | 1389 | } |
1392 | |||
1393 | /** sometimes true for the last frame */ | 1390 | /** sometimes true for the last frame */ |
1394 | if (get_bits1(gb)) { | 1391 | if (get_bits1(gb)) { |
1395 | skip = get_bits(gb, av_log2(s->samples_per_frame * 2)); | 1392 | get_bits(gb, av_log2(s->samples_per_frame * 2)); |
1396 | DEBUGF("end skip: %i\n", skip); | 1393 | DEBUGF("end skip\n"); |
1397 | } | 1394 | } |
1398 | |||
1399 | } | 1395 | } |
1400 | 1396 | ||
1401 | DEBUGF("BITSTREAM: frame header length was %i\n", | 1397 | DEBUGF("BITSTREAM: frame header length was %i\n", |
diff --git a/apps/plugins/chessbox/chessbox.c b/apps/plugins/chessbox/chessbox.c index 6e77b62718..6437c8d4fd 100644 --- a/apps/plugins/chessbox/chessbox.c +++ b/apps/plugins/chessbox/chessbox.c | |||
@@ -641,7 +641,10 @@ static int cb_menu(void) | |||
641 | struct cb_command cb_getcommand (void) { | 641 | struct cb_command cb_getcommand (void) { |
642 | static short x = 4 , y = 3 ; | 642 | static short x = 4 , y = 3 ; |
643 | short c , r , l; | 643 | short c , r , l; |
644 | int button, lastbutton = BUTTON_NONE; | 644 | int button; |
645 | #if defined(CB_PLAY_PRE) || defined(CB_SELECT_PRE) | ||
646 | int lastbutton = BUTTON_NONE; | ||
647 | #endif | ||
645 | int marked = false , from_marked = false ; | 648 | int marked = false , from_marked = false ; |
646 | short marked_x = 0 , marked_y = 0 ; | 649 | short marked_x = 0 , marked_y = 0 ; |
647 | struct cb_command result = { 0, {0,0,0,0,0}, 0 }; | 650 | struct cb_command result = { 0, {0,0,0,0,0}, 0 }; |
@@ -761,8 +764,10 @@ struct cb_command cb_getcommand (void) { | |||
761 | } | 764 | } |
762 | break; | 765 | break; |
763 | } | 766 | } |
767 | #if defined(CB_PLAY_PRE) || defined(CB_SELECT_PRE) | ||
764 | if (button != BUTTON_NONE) | 768 | if (button != BUTTON_NONE) |
765 | lastbutton = button; | 769 | lastbutton = button; |
770 | #endif | ||
766 | } | 771 | } |
767 | 772 | ||
768 | } | 773 | } |
diff --git a/apps/plugins/cube.c b/apps/plugins/cube.c index 6d0e14f8f0..9540023029 100644 --- a/apps/plugins/cube.c +++ b/apps/plugins/cube.c | |||
@@ -649,7 +649,11 @@ enum plugin_status plugin_start(const void* parameter) | |||
649 | #endif | 649 | #endif |
650 | 650 | ||
651 | int button; | 651 | int button; |
652 | #if defined(CUBE_MODE_PRE) || \ | ||
653 | defined(CUBE_PAUSE_PRE) || \ | ||
654 | defined(CUBE_HIGHSPEED_PRE) | ||
652 | int lastbutton = BUTTON_NONE; | 655 | int lastbutton = BUTTON_NONE; |
656 | #endif | ||
653 | int curr = 0; | 657 | int curr = 0; |
654 | bool highspeed = false; | 658 | bool highspeed = false; |
655 | bool paused = false; | 659 | bool paused = false; |
@@ -855,8 +859,12 @@ enum plugin_status plugin_start(const void* parameter) | |||
855 | exit_on_usb(button); | 859 | exit_on_usb(button); |
856 | break; | 860 | break; |
857 | } | 861 | } |
862 | #if defined(CUBE_MODE_PRE) || \ | ||
863 | defined(CUBE_PAUSE_PRE) || \ | ||
864 | defined(CUBE_HIGHSPEED_PRE) | ||
858 | if (button != BUTTON_NONE) | 865 | if (button != BUTTON_NONE) |
859 | lastbutton = button; | 866 | lastbutton = button; |
867 | #endif | ||
860 | } | 868 | } |
861 | 869 | ||
862 | return PLUGIN_OK; | 870 | return PLUGIN_OK; |
diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c index a837b1a64e..a61839cc0c 100644 --- a/apps/plugins/flipit.c +++ b/apps/plugins/flipit.c | |||
@@ -615,7 +615,10 @@ static bool flipit_loop(void) | |||
615 | { | 615 | { |
616 | int i; | 616 | int i; |
617 | int button; | 617 | int button; |
618 | #if defined(FLIPIT_SOLVE_PRE) || defined(FLIPIT_STEP_PRE) || \ | ||
619 | defined(FLIPIT_TOGGLE_PRE) || defined(FLIPIT_UP_PRE) | ||
618 | int lastbutton = BUTTON_NONE; | 620 | int lastbutton = BUTTON_NONE; |
621 | #endif | ||
619 | 622 | ||
620 | flipit_init(); | 623 | flipit_init(); |
621 | while(true) { | 624 | while(true) { |
@@ -729,8 +732,11 @@ static bool flipit_loop(void) | |||
729 | return PLUGIN_USB_CONNECTED; | 732 | return PLUGIN_USB_CONNECTED; |
730 | break; | 733 | break; |
731 | } | 734 | } |
735 | #if defined(FLIPIT_SOLVE_PRE) || defined(FLIPIT_STEP_PRE) || \ | ||
736 | defined(FLIPIT_TOGGLE_PRE) || defined(FLIPIT_UP_PRE) | ||
732 | if (button != BUTTON_NONE) | 737 | if (button != BUTTON_NONE) |
733 | lastbutton = button; | 738 | lastbutton = button; |
739 | #endif | ||
734 | } | 740 | } |
735 | } | 741 | } |
736 | 742 | ||
diff --git a/apps/plugins/fractals/fractal.c b/apps/plugins/fractals/fractal.c index 21d33387b5..5d8413ca6f 100644 --- a/apps/plugins/fractals/fractal.c +++ b/apps/plugins/fractals/fractal.c | |||
@@ -93,7 +93,12 @@ static void cleanup(void) | |||
93 | 93 | ||
94 | enum plugin_status plugin_start(const void* parameter) | 94 | enum plugin_status plugin_start(const void* parameter) |
95 | { | 95 | { |
96 | #if defined(FRACTAL_ZOOM_OUT_PRE) || \ | ||
97 | defined(FRACTAL_ZOOM_IN_PRE) || \ | ||
98 | defined(FRACTAL_PRECISION_DEC_PRE) || \ | ||
99 | defined(FRACTAL_PRECISION_INC) | ||
96 | long lastbutton = BUTTON_NONE; | 100 | long lastbutton = BUTTON_NONE; |
101 | #endif | ||
97 | int redraw = REDRAW_FULL; | 102 | int redraw = REDRAW_FULL; |
98 | struct fractal_ops *ops = &mandelbrot_ops; | 103 | struct fractal_ops *ops = &mandelbrot_ops; |
99 | 104 | ||
@@ -246,9 +251,13 @@ enum plugin_status plugin_start(const void* parameter) | |||
246 | exit_on_usb(button); | 251 | exit_on_usb(button); |
247 | break; | 252 | break; |
248 | } | 253 | } |
249 | 254 | #if defined(FRACTAL_ZOOM_OUT_PRE) || \ | |
255 | defined(FRACTAL_ZOOM_IN_PRE) || \ | ||
256 | defined(FRACTAL_PRECISION_DEC_PRE) || \ | ||
257 | defined(FRACTAL_PRECISION_INC) | ||
250 | if (button != BUTTON_NONE) | 258 | if (button != BUTTON_NONE) |
251 | lastbutton = button; | 259 | lastbutton = button; |
260 | #endif | ||
252 | } | 261 | } |
253 | return PLUGIN_OK; | 262 | return PLUGIN_OK; |
254 | } | 263 | } |
diff --git a/apps/plugins/oscilloscope.c b/apps/plugins/oscilloscope.c index c55948dce9..07bf1da8bb 100644 --- a/apps/plugins/oscilloscope.c +++ b/apps/plugins/oscilloscope.c | |||
@@ -786,7 +786,9 @@ void cleanup(void) | |||
786 | enum plugin_status plugin_start(const void* parameter) | 786 | enum plugin_status plugin_start(const void* parameter) |
787 | { | 787 | { |
788 | int button, vol; | 788 | int button, vol; |
789 | #if defined(OSCILLOSCOPE_DRAWMODE_PRE) || defined(OSCILLOSCOPE_ORIENTATION_PRE) | ||
789 | int lastbutton = BUTTON_NONE; | 790 | int lastbutton = BUTTON_NONE; |
791 | #endif | ||
790 | bool exit = false; | 792 | bool exit = false; |
791 | bool paused = false; | 793 | bool paused = false; |
792 | bool tell_speed; | 794 | bool tell_speed; |
@@ -917,9 +919,11 @@ enum plugin_status plugin_start(const void* parameter) | |||
917 | exit_on_usb(button); | 919 | exit_on_usb(button); |
918 | break; | 920 | break; |
919 | } | 921 | } |
922 | #if defined(OSCILLOSCOPE_DRAWMODE_PRE) || defined(OSCILLOSCOPE_ORIENTATION_PRE) | ||
920 | if (button != BUTTON_NONE) | 923 | if (button != BUTTON_NONE) |
921 | lastbutton = button; | 924 | lastbutton = button; |
922 | 925 | #endif | |
926 | |||
923 | if (tell_speed) | 927 | if (tell_speed) |
924 | { | 928 | { |
925 | rb->snprintf(message, sizeof(message), "%s%d", | 929 | rb->snprintf(message, sizeof(message), "%s%d", |
diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c index b3767c1a15..dd0bef8c28 100644 --- a/apps/plugins/rockblox.c +++ b/apps/plugins/rockblox.c | |||
@@ -1332,7 +1332,9 @@ static int rockblox_menu(void) | |||
1332 | static int rockblox_loop (void) | 1332 | static int rockblox_loop (void) |
1333 | { | 1333 | { |
1334 | int button; | 1334 | int button; |
1335 | #if defined(ROCKBLOX_OFF_PRE) || defined(ROCKBLOX_DROP_PRE) | ||
1335 | int lastbutton = BUTTON_NONE; | 1336 | int lastbutton = BUTTON_NONE; |
1337 | #endif | ||
1336 | long next_down_tick = *rb->current_tick + level_speed(rockblox_status.level); | 1338 | long next_down_tick = *rb->current_tick + level_speed(rockblox_status.level); |
1337 | 1339 | ||
1338 | if (rockblox_menu()) { | 1340 | if (rockblox_menu()) { |
@@ -1450,8 +1452,10 @@ static int rockblox_loop (void) | |||
1450 | return PLUGIN_USB_CONNECTED; | 1452 | return PLUGIN_USB_CONNECTED; |
1451 | break; | 1453 | break; |
1452 | } | 1454 | } |
1455 | #if defined(ROCKBLOX_OFF_PRE) || defined(ROCKBLOX_DROP_PRE) | ||
1453 | if (button != BUTTON_NONE) | 1456 | if (button != BUTTON_NONE) |
1454 | lastbutton = button; | 1457 | lastbutton = button; |
1458 | #endif | ||
1455 | 1459 | ||
1456 | #ifdef HAVE_SCROLLWHEEL | 1460 | #ifdef HAVE_SCROLLWHEEL |
1457 | /* check if we should enable the scroll wheel, if events | 1461 | /* check if we should enable the scroll wheel, if events |
diff --git a/apps/plugins/sliding_puzzle.c b/apps/plugins/sliding_puzzle.c index aeac96dfba..92c9db768f 100644 --- a/apps/plugins/sliding_puzzle.c +++ b/apps/plugins/sliding_puzzle.c | |||
@@ -618,7 +618,9 @@ static void puzzle_init(void) | |||
618 | static int puzzle_loop(void) | 618 | static int puzzle_loop(void) |
619 | { | 619 | { |
620 | int button; | 620 | int button; |
621 | #if defined(PUZZLE_SHUFFLE_PICTURE_PRE) | ||
621 | int lastbutton = BUTTON_NONE; | 622 | int lastbutton = BUTTON_NONE; |
623 | #endif | ||
622 | bool load_success; | 624 | bool load_success; |
623 | 625 | ||
624 | puzzle_init(); | 626 | puzzle_init(); |
@@ -689,8 +691,10 @@ static int puzzle_loop(void) | |||
689 | return PLUGIN_USB_CONNECTED; | 691 | return PLUGIN_USB_CONNECTED; |
690 | break; | 692 | break; |
691 | } | 693 | } |
694 | #if defined(PUZZLE_SHUFFLE_PICTURE_PRE) | ||
692 | if (button != BUTTON_NONE) | 695 | if (button != BUTTON_NONE) |
693 | lastbutton = button; | 696 | lastbutton = button; |
697 | #endif | ||
694 | } | 698 | } |
695 | } | 699 | } |
696 | 700 | ||
diff --git a/apps/plugins/star.c b/apps/plugins/star.c index 3506f4b09e..c9797fd85b 100644 --- a/apps/plugins/star.c +++ b/apps/plugins/star.c | |||
@@ -945,7 +945,11 @@ static int star_run_game(int current_level) | |||
945 | int move_x = 0; | 945 | int move_x = 0; |
946 | int move_y = 0; | 946 | int move_y = 0; |
947 | int key; | 947 | int key; |
948 | #if defined(STAR_LEVEL_DOWN_PRE) || \ | ||
949 | defined(STAR_LEVEL_UP_PRE) || \ | ||
950 | defined(STAR_TOGGLE_CONTROL_PRE) | ||
948 | int lastkey = BUTTON_NONE; | 951 | int lastkey = BUTTON_NONE; |
952 | #endif | ||
949 | 953 | ||
950 | if (!star_load_level(current_level)) | 954 | if (!star_load_level(current_level)) |
951 | return 0; | 955 | return 0; |
@@ -1033,8 +1037,12 @@ static int star_run_game(int current_level) | |||
1033 | } | 1037 | } |
1034 | break; | 1038 | break; |
1035 | } | 1039 | } |
1040 | #if defined(STAR_LEVEL_DOWN_PRE) || \ | ||
1041 | defined(STAR_LEVEL_UP_PRE) || \ | ||
1042 | defined(STAR_TOGGLE_CONTROL_PRE) | ||
1036 | if (key != BUTTON_NONE) | 1043 | if (key != BUTTON_NONE) |
1037 | lastkey = key; | 1044 | lastkey = key; |
1045 | #endif | ||
1038 | } | 1046 | } |
1039 | 1047 | ||
1040 | if (control == STAR_CONTROL_BALL) | 1048 | if (control == STAR_CONTROL_BALL) |
diff --git a/apps/plugins/text_viewer/text_viewer.c b/apps/plugins/text_viewer/text_viewer.c index 3c04499b18..29a2e6d12a 100644 --- a/apps/plugins/text_viewer/text_viewer.c +++ b/apps/plugins/text_viewer/text_viewer.c | |||
@@ -31,7 +31,9 @@ | |||
31 | enum plugin_status plugin_start(const void* file) | 31 | enum plugin_status plugin_start(const void* file) |
32 | { | 32 | { |
33 | int button; | 33 | int button; |
34 | #if defined(TV_AUTOSCROLL_PRE) | ||
34 | int lastbutton = BUTTON_NONE; | 35 | int lastbutton = BUTTON_NONE; |
36 | #endif | ||
35 | bool autoscroll = false; | 37 | bool autoscroll = false; |
36 | long old_tick; | 38 | long old_tick; |
37 | bool done = false; | 39 | bool done = false; |
@@ -211,7 +213,9 @@ enum plugin_status plugin_start(const void* file) | |||
211 | } | 213 | } |
212 | if (button != BUTTON_NONE) | 214 | if (button != BUTTON_NONE) |
213 | { | 215 | { |
216 | #if defined(TV_AUTOSCROLL_PRE) | ||
214 | lastbutton = button; | 217 | lastbutton = button; |
218 | #endif | ||
215 | rb->yield(); | 219 | rb->yield(); |
216 | } | 220 | } |
217 | if (autoscroll) | 221 | if (autoscroll) |
diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c index 8877d7f460..5266214723 100644 --- a/apps/plugins/vu_meter.c +++ b/apps/plugins/vu_meter.c | |||
@@ -781,7 +781,9 @@ void digital_meter(void) { | |||
781 | 781 | ||
782 | enum plugin_status plugin_start(const void* parameter) { | 782 | enum plugin_status plugin_start(const void* parameter) { |
783 | int button; | 783 | int button; |
784 | #if defined(VUMETER_HELP_PRE) || defined(VUMETER_MENU_PRE) | ||
784 | int lastbutton = BUTTON_NONE; | 785 | int lastbutton = BUTTON_NONE; |
786 | #endif | ||
785 | 787 | ||
786 | (void) parameter; | 788 | (void) parameter; |
787 | 789 | ||
@@ -859,7 +861,9 @@ enum plugin_status plugin_start(const void* parameter) { | |||
859 | return PLUGIN_USB_CONNECTED; | 861 | return PLUGIN_USB_CONNECTED; |
860 | break; | 862 | break; |
861 | } | 863 | } |
864 | #if defined(VUMETER_HELP_PRE) || defined(VUMETER_MENU_PRE) | ||
862 | if (button != BUTTON_NONE) | 865 | if (button != BUTTON_NONE) |
863 | lastbutton = button; | 866 | lastbutton = button; |
867 | #endif | ||
864 | } | 868 | } |
865 | } | 869 | } |