diff options
Diffstat (limited to 'apps/plugin.c')
-rw-r--r-- | apps/plugin.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index d626ef6488..56d2be9f40 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -57,7 +57,7 @@ | |||
57 | #include "usbstack/usb_hid.h" | 57 | #include "usbstack/usb_hid.h" |
58 | #endif | 58 | #endif |
59 | 59 | ||
60 | #ifdef SIMULATOR | 60 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) |
61 | #define PREFIX(_x_) sim_ ## _x_ | 61 | #define PREFIX(_x_) sim_ ## _x_ |
62 | #else | 62 | #else |
63 | #define PREFIX | 63 | #define PREFIX |
@@ -72,7 +72,7 @@ | |||
72 | static unsigned int open_files; | 72 | static unsigned int open_files; |
73 | #endif | 73 | #endif |
74 | 74 | ||
75 | #ifdef SIMULATOR | 75 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) |
76 | static unsigned char pluginbuf[PLUGIN_BUFFER_SIZE]; | 76 | static unsigned char pluginbuf[PLUGIN_BUFFER_SIZE]; |
77 | void *sim_plugin_load(char *plugin, void **pd); | 77 | void *sim_plugin_load(char *plugin, void **pd); |
78 | void sim_plugin_close(void *pd); | 78 | void sim_plugin_close(void *pd); |
@@ -157,7 +157,7 @@ static const struct plugin_api rockbox_api = { | |||
157 | lcd_yuv_set_options, | 157 | lcd_yuv_set_options, |
158 | #endif | 158 | #endif |
159 | #endif /* MEMORYSIZE > 2 */ | 159 | #endif /* MEMORYSIZE > 2 */ |
160 | #elif (LCD_DEPTH < 4) && !defined(SIMULATOR) | 160 | #elif (LCD_DEPTH < 4) && (CONFIG_PLATFORM & PLATFORM_NATIVE) |
161 | lcd_blit_mono, | 161 | lcd_blit_mono, |
162 | lcd_blit_grey_phase, | 162 | lcd_blit_grey_phase, |
163 | #endif /* LCD_DEPTH */ | 163 | #endif /* LCD_DEPTH */ |
@@ -366,7 +366,7 @@ static const struct plugin_api rockbox_api = { | |||
366 | #endif | 366 | #endif |
367 | 367 | ||
368 | reset_poweroff_timer, | 368 | reset_poweroff_timer, |
369 | #ifndef SIMULATOR | 369 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
370 | system_memory_guard, | 370 | system_memory_guard, |
371 | &cpu_frequency, | 371 | &cpu_frequency, |
372 | 372 | ||
@@ -377,7 +377,7 @@ static const struct plugin_api rockbox_api = { | |||
377 | cpu_boost, | 377 | cpu_boost, |
378 | #endif | 378 | #endif |
379 | #endif /* HAVE_ADJUSTABLE_CPU_FREQ */ | 379 | #endif /* HAVE_ADJUSTABLE_CPU_FREQ */ |
380 | #endif /* !SIMULATOR */ | 380 | #endif /* PLATFORM_NATIVE */ |
381 | #ifdef HAVE_SCHEDULER_BOOSTCTRL | 381 | #ifdef HAVE_SCHEDULER_BOOSTCTRL |
382 | trigger_cpu_boost, | 382 | trigger_cpu_boost, |
383 | cancel_cpu_boost, | 383 | cancel_cpu_boost, |
@@ -415,7 +415,7 @@ static const struct plugin_api rockbox_api = { | |||
415 | remove_event, | 415 | remove_event, |
416 | send_event, | 416 | send_event, |
417 | 417 | ||
418 | #ifdef SIMULATOR | 418 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) |
419 | /* special simulator hooks */ | 419 | /* special simulator hooks */ |
420 | #if defined(HAVE_LCD_BITMAP) && LCD_DEPTH < 8 | 420 | #if defined(HAVE_LCD_BITMAP) && LCD_DEPTH < 8 |
421 | sim_lcd_ex_init, | 421 | sim_lcd_ex_init, |
@@ -437,7 +437,7 @@ static const struct plugin_api rockbox_api = { | |||
437 | memset, | 437 | memset, |
438 | memcpy, | 438 | memcpy, |
439 | memmove, | 439 | memmove, |
440 | #ifndef SIMULATOR | 440 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
441 | _ctype_, | 441 | _ctype_, |
442 | #endif | 442 | #endif |
443 | atoi, | 443 | atoi, |
@@ -467,7 +467,7 @@ static const struct plugin_api rockbox_api = { | |||
467 | #ifdef AUDIOHW_HAVE_EQ | 467 | #ifdef AUDIOHW_HAVE_EQ |
468 | sound_enum_hw_eq_band_setting, | 468 | sound_enum_hw_eq_band_setting, |
469 | #endif | 469 | #endif |
470 | #ifndef SIMULATOR | 470 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
471 | mp3_play_data, | 471 | mp3_play_data, |
472 | mp3_play_pause, | 472 | mp3_play_pause, |
473 | mp3_play_stop, | 473 | mp3_play_stop, |
@@ -589,7 +589,7 @@ static const struct plugin_api rockbox_api = { | |||
589 | battery_level, | 589 | battery_level, |
590 | battery_level_safe, | 590 | battery_level_safe, |
591 | battery_time, | 591 | battery_time, |
592 | #ifndef SIMULATOR | 592 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
593 | battery_voltage, | 593 | battery_voltage, |
594 | #endif | 594 | #endif |
595 | #if CONFIG_CHARGING | 595 | #if CONFIG_CHARGING |
@@ -603,7 +603,7 @@ static const struct plugin_api rockbox_api = { | |||
603 | #endif | 603 | #endif |
604 | 604 | ||
605 | /* misc */ | 605 | /* misc */ |
606 | #if !defined(SIMULATOR) | 606 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
607 | &errno, | 607 | &errno, |
608 | #endif | 608 | #endif |
609 | srand, | 609 | srand, |
@@ -727,15 +727,15 @@ int plugin_load(const char* plugin, const void* parameter) | |||
727 | { | 727 | { |
728 | int rc, i; | 728 | int rc, i; |
729 | struct plugin_header *hdr; | 729 | struct plugin_header *hdr; |
730 | #ifdef SIMULATOR | 730 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) |
731 | void *pd; | 731 | void *pd; |
732 | #else /* !SIMULATOR */ | 732 | #else /* PLATFOR_NATIVE */ |
733 | int fd; | 733 | int fd; |
734 | ssize_t readsize; | 734 | ssize_t readsize; |
735 | #if NUM_CORES > 1 | 735 | #if NUM_CORES > 1 |
736 | unsigned my_core; | 736 | unsigned my_core; |
737 | #endif | 737 | #endif |
738 | #endif /* !SIMULATOR */ | 738 | #endif /* CONFIG_PLATFORM */ |
739 | 739 | ||
740 | #if LCD_DEPTH > 1 | 740 | #if LCD_DEPTH > 1 |
741 | fb_data* old_backdrop; | 741 | fb_data* old_backdrop; |
@@ -755,7 +755,7 @@ int plugin_load(const char* plugin, const void* parameter) | |||
755 | splash(0, ID2P(LANG_WAIT)); | 755 | splash(0, ID2P(LANG_WAIT)); |
756 | strcpy(current_plugin, plugin); | 756 | strcpy(current_plugin, plugin); |
757 | 757 | ||
758 | #ifdef SIMULATOR | 758 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) |
759 | hdr = sim_plugin_load((char *)plugin, &pd); | 759 | hdr = sim_plugin_load((char *)plugin, &pd); |
760 | if (pd == NULL) { | 760 | if (pd == NULL) { |
761 | splashf(HZ*2, str(LANG_PLUGIN_CANT_OPEN), plugin); | 761 | splashf(HZ*2, str(LANG_PLUGIN_CANT_OPEN), plugin); |
@@ -990,7 +990,7 @@ static int open_wrapper(const char* pathname, int flags, ...) | |||
990 | /* we don't have an 'open' function. it's a define. and we need | 990 | /* we don't have an 'open' function. it's a define. and we need |
991 | * the real file_open, hence PREFIX() doesn't work here */ | 991 | * the real file_open, hence PREFIX() doesn't work here */ |
992 | int fd; | 992 | int fd; |
993 | #ifdef SIMULATOR | 993 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) |
994 | if (flags & O_CREAT) | 994 | if (flags & O_CREAT) |
995 | { | 995 | { |
996 | va_list ap; | 996 | va_list ap; |