|
@@ -26,6 +26,8 @@
|
|
#include <CoreServices/CoreServices.h>
|
|
#include <CoreServices/CoreServices.h>
|
|
#elif defined(LOVE_IOS)
|
|
#elif defined(LOVE_IOS)
|
|
#include "common/iOS.h"
|
|
#include "common/iOS.h"
|
|
|
|
+#elif defined(LOVE_ANDROID)
|
|
|
|
+#include "common/android.h"
|
|
#elif defined(LOVE_LINUX)
|
|
#elif defined(LOVE_LINUX)
|
|
#include <spawn.h>
|
|
#include <spawn.h>
|
|
//#include <stdlib.h>
|
|
//#include <stdlib.h>
|
|
@@ -66,6 +68,8 @@ std::string System::getOS() const
|
|
return "iOS";
|
|
return "iOS";
|
|
#elif defined(LOVE_WINDOWS)
|
|
#elif defined(LOVE_WINDOWS)
|
|
return "Windows";
|
|
return "Windows";
|
|
|
|
+#elif defined(LOVE_ANDROID)
|
|
|
|
+ return "Android";
|
|
#elif defined(LOVE_LINUX)
|
|
#elif defined(LOVE_LINUX)
|
|
return "Linux";
|
|
return "Linux";
|
|
#else
|
|
#else
|
|
@@ -98,6 +102,10 @@ bool System::openURL(const std::string &url) const
|
|
|
|
|
|
return love::ios::openURL(url);
|
|
return love::ios::openURL(url);
|
|
|
|
|
|
|
|
+#elif defined(LOVE_ANDROID)
|
|
|
|
+
|
|
|
|
+ return love::android::openURL(url);
|
|
|
|
+
|
|
#elif defined(LOVE_LINUX)
|
|
#elif defined(LOVE_LINUX)
|
|
|
|
|
|
pid_t pid;
|
|
pid_t pid;
|
|
@@ -134,6 +142,15 @@ bool System::openURL(const std::string &url) const
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void System::vibrate(double seconds) const
|
|
|
|
+{
|
|
|
|
+#ifdef LOVE_ANDROID
|
|
|
|
+ love::android::vibrate(seconds);
|
|
|
|
+#else
|
|
|
|
+ LOVE_UNUSED(seconds);
|
|
|
|
+#endif
|
|
|
|
+}
|
|
|
|
+
|
|
bool System::getConstant(const char *in, System::PowerState &out)
|
|
bool System::getConstant(const char *in, System::PowerState &out)
|
|
{
|
|
{
|
|
return powerStates.find(in, out);
|
|
return powerStates.find(in, out);
|