From 6eaab4d00446c070c655f0e6c9a872532a776b6f Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Wed, 1 Sep 2010 21:29:34 +0000 Subject: Ged rid of uisimulator/common/io.c for android builds. Use host's functions for file i/o directly (open(), close() ,etc.), not the sim_* variants. Some dir functions need to be wrapped still because we need to cache the parents dir's path (host's dirent doesn't let us know). For the same reason (incompatibility) with host's dirent) detach some members from Rockbox' dirent struct and put it into an extra one, the values can be retrieved via the new dir_get_info(). Get rid of the sim_ prefix for sleep as well and change the signature to unix sleep(). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27968 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugin.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'apps/plugin.c') diff --git a/apps/plugin.c b/apps/plugin.c index e0455c5..9e08951 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -59,7 +59,7 @@ #include "usbstack/usb_hid.h" #endif -#if (CONFIG_PLATFORM & PLATFORM_HOSTED) +#if (CONFIG_PLATFORM & PLATFORM_SDL) #define PREFIX(_x_) sim_ ## _x_ #else #define PREFIX @@ -349,7 +349,7 @@ static const struct plugin_api rockbox_api = { #if defined(CPU_ARM) && CONFIG_PLATFORM & PLATFORM_NATIVE __div0, #endif - PREFIX(sleep), + sleep, yield, ¤t_tick, default_event_handler, @@ -529,7 +529,7 @@ static const struct plugin_api rockbox_api = { playlist_insert_track, playlist_insert_directory, playlist_shuffle, - PREFIX(audio_play), + audio_play, audio_stop, audio_pause, audio_resume, @@ -722,6 +722,7 @@ static const struct plugin_api rockbox_api = { /* new stuff at the end, sort into place next time the API gets incompatible */ + dir_get_info, }; int plugin_load(const char* plugin, const void* parameter) @@ -940,11 +941,11 @@ static int open_wrapper(const char* pathname, int flags, ...) { va_list ap; va_start(ap, flags); - fd = sim_open(pathname, flags, va_arg(ap, unsigned int)); + fd = open(pathname, flags, va_arg(ap, unsigned int)); va_end(ap); } else - fd = sim_open(pathname, flags); + fd = open(pathname, flags); #else fd = file_open(pathname,flags); #endif -- cgit v1.1