aboutsummaryrefslogtreecommitdiffstats
path: root/src/Main.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-18 08:33:06 +0100
committerMax Kellermann <max@duempel.org>2014-02-22 01:39:08 +0100
commit4dcf0b8ae0569beaf615fc19df2147bfb1597046 (patch)
tree99f489ff101a68db49752b2a2898967c5dfca287 /src/Main.cxx
parent9574d11dc80248753c7fee22f3621879067c285b (diff)
downloadmpd-4dcf0b8ae0569beaf615fc19df2147bfb1597046.tar.gz
mpd-4dcf0b8ae0569beaf615fc19df2147bfb1597046.tar.xz
mpd-4dcf0b8ae0569beaf615fc19df2147bfb1597046.zip
first Android release
Finally, MPD runs on Android. For some small value of "runs". Very much work left, too much to describe.
Diffstat (limited to 'src/Main.cxx')
-rw-r--r--src/Main.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Main.cxx b/src/Main.cxx
index fb2aaf0a9..be7c07272 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -88,6 +88,10 @@
#include "archive/ArchiveList.hxx"
#endif
+#ifdef ANDROID
+#include "org_musicpd_Bridge.h"
+#endif
+
#ifdef HAVE_GLIB
#include <glib.h>
#endif
@@ -365,6 +369,8 @@ shutdown_event_emitted(void)
#endif
+#ifndef ANDROID
+
int main(int argc, char *argv[])
{
#ifdef WIN32
@@ -374,6 +380,8 @@ int main(int argc, char *argv[])
#endif
}
+#endif
+
int mpd_main(int argc, char *argv[])
{
struct options options;
@@ -646,3 +654,14 @@ int mpd_main(int argc, char *argv[])
log_deinit();
return EXIT_SUCCESS;
}
+
+#ifdef ANDROID
+
+gcc_visibility_default
+JNIEXPORT void JNICALL
+Java_org_musicpd_Bridge_run(JNIEnv *, jclass)
+{
+ mpd_main(0, nullptr);
+}
+
+#endif