diff --git a/project/Build.xml b/project/Build.xml
index 362412543..bc9bcf63d 100644
--- a/project/Build.xml
+++ b/project/Build.xml
@@ -223,6 +223,7 @@
-->
+
@@ -264,6 +265,8 @@
+
+
@@ -342,8 +345,8 @@
-
-
+
+
diff --git a/project/src/common/ExternalInterface.cpp b/project/src/common/ExternalInterface.cpp
index 13cea9d4f..ed6880059 100644
--- a/project/src/common/ExternalInterface.cpp
+++ b/project/src/common/ExternalInterface.cpp
@@ -995,7 +995,7 @@ DEFINE_PRIM(lime_haptic_vibrate,2);
// --- SharedObject ----------------------------------------------------------------------
value lime_set_user_preference(value inId,value inValue)
{
- #if defined(IPHONE) || defined(ANDROID) || defined(WEBOS)
+ #if defined(IPHONE) || defined(ANDROID) || defined(WEBOS) || defined(TIZEN)
bool result=SetUserPreference(val_string(inId),val_string(inValue));
return alloc_bool(result);
#endif
@@ -1005,7 +1005,7 @@ DEFINE_PRIM(lime_set_user_preference,2);
value lime_get_user_preference(value inId)
{
- #if defined(IPHONE) || defined(ANDROID) || defined(WEBOS)
+ #if defined(IPHONE) || defined(ANDROID) || defined(WEBOS) || defined(TIZEN)
std::string result=GetUserPreference(val_string(inId));
return alloc_string(result.c_str());
#endif
@@ -1015,7 +1015,7 @@ DEFINE_PRIM(lime_get_user_preference,1);
value lime_clear_user_preference(value inId)
{
- #if defined(IPHONE) || defined(ANDROID) || defined(WEBOS)
+ #if defined(IPHONE) || defined(ANDROID) || defined(WEBOS) || defined(TIZEN)
bool result=ClearUserPreference(val_string(inId));
return alloc_bool(result);
#endif
diff --git a/project/src/common/Utils.cpp b/project/src/common/Utils.cpp
index e8940392f..15f79840c 100644
--- a/project/src/common/Utils.cpp
+++ b/project/src/common/Utils.cpp
@@ -24,6 +24,10 @@ typedef uint64_t __int64;
#include
#endif
+#ifdef TIZEN
+#include
+#endif
+
#ifdef IPHONE
#include
#endif
@@ -379,6 +383,20 @@ void GetSpecialDir(SpecialDir inDir,std::string &outDir)
{
outDir = "shared/documents";
}
+#elif defined(TIZEN)
+ if (inDir == DIR_APP)
+ {
+ outDir = "../";
+ }
+ else if (inDir == DIR_STORAGE)
+ {
+ outDir = "../";
+ }
+ else if (inDir == DIR_USER || inDir == DIR_DOCS || inDir == DIR_DESKTOP)
+ {
+ std::wstring dir = std::wstring (Tizen::System::Environment::GetExternalStoragePath ().GetPointer ());
+ outDir = std::string (dir.begin (), dir.end ());
+ }
#elif defined(WEBOS)
if (inDir == DIR_APP)
{
diff --git a/project/src/platform/tizen/TizenApplication.cpp b/project/src/platform/tizen/TizenApplication.cpp
index 44dd2ac82..2b485fe46 100644
--- a/project/src/platform/tizen/TizenApplication.cpp
+++ b/project/src/platform/tizen/TizenApplication.cpp
@@ -24,14 +24,14 @@ namespace lime {
sgFlags = inFlags;
sgTitle = inTitle;
- if (sgWidth == 0 && sgHeight == 0) {
+ //if (sgWidth == 0 && sgHeight == 0) {
// Hard-code screen size for now
sgWidth = 720;
sgHeight = 1280;
- }
+ //}
// For now, swap the width/height for proper EGL initialization, when landscape
diff --git a/project/src/platform/tizen/TizenStage.cpp b/project/src/platform/tizen/TizenStage.cpp
index 4ee90ea9a..81eead284 100644
--- a/project/src/platform/tizen/TizenStage.cpp
+++ b/project/src/platform/tizen/TizenStage.cpp
@@ -269,82 +269,6 @@ namespace lime {
void SetIcon (const char *path) {}
- QuickVec* CapabilitiesGetScreenResolutions () {
-
- // glfwInit();
- int count;
- QuickVec *out = new QuickVec();
- /*const GLFWvidmode *modes = glfwGetVideoModes(glfwGetPrimaryMonitor(), &count);
- for (int i = 0; i < count; i++)
- {
- out->push_back( modes[i].width );
- out->push_back( modes[i].height );
- }*/
- return out;
-
- }
-
-
- double CapabilitiesGetScreenResolutionX () {
-
- // glfwInit();
- //const GLFWvidmode *mode = glfwGetVideoMode(glfwGetPrimaryMonitor());
- //return mode->width;
- return 0;
-
- }
-
-
- double CapabilitiesGetScreenResolutionY () {
-
- // glfwInit();
- //const GLFWvidmode *mode = glfwGetVideoMode(glfwGetPrimaryMonitor());
- //return mode->width;
- return 0;
-
- }
-
-
- std::string CapabilitiesGetLanguage () {
-
- return "en-US";
-
- }
-
- double CapabilitiesGetScreenDPI() {
-
- return 200;
-
- }
-
-
- double CapabilitiesGetPixelAspectRatio() {
-
- return 1;
-
- }
-
-
- bool LaunchBrowser (const char *inUtf8URL) {
-
- return false;
-
- }
-
-
- std::string FileDialogFolder( const std::string &title, const std::string &text ) {
- return "";
- }
-
- std::string FileDialogOpen( const std::string &title, const std::string &text, const std::vector &fileTypes ) {
- return "";
- }
-
- std::string FileDialogSave( const std::string &title, const std::string &text, const std::vector &fileTypes ) {
- return "";
- }
-
-
}