From d17ff18ec09d4e3c6c762dcab01da53f6e4177e1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 29 May 2019 22:18:06 +0200 Subject: [PATCH] Main: move main() to the bottom --- src/Main.cxx | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/Main.cxx b/src/Main.cxx index 94f895553..b690ca6ab 100644 --- a/src/Main.cxx +++ b/src/Main.cxx @@ -368,20 +368,6 @@ Instance::OnIdle(unsigned flags) noexcept state_file->CheckModified(); } -#ifndef ANDROID - -int -main(int argc, char *argv[]) noexcept -{ -#ifdef _WIN32 - return win32_main(argc, argv); -#else - return mpd_main(argc, argv); -#endif -} - -#endif - static inline void MainConfigured(const struct options &options, const ConfigData &raw_config) { @@ -652,4 +638,16 @@ Java_org_musicpd_Bridge_shutdown(JNIEnv *, jclass) global_instance->Break(); } +#else + +int +main(int argc, char *argv[]) noexcept +{ +#ifdef _WIN32 + return win32_main(argc, argv); +#else + return mpd_main(argc, argv); +#endif +} + #endif