[DEV] android update
This commit is contained in:
parent
a130375b47
commit
4de67305e4
@ -215,6 +215,53 @@ std::string std::to_string(bool _val) {
|
||||
}
|
||||
return "false";
|
||||
}
|
||||
#ifdef __TARGET_OS__Android
|
||||
std::string std::to_string(int _val) {
|
||||
char tmpVal[256];
|
||||
sprintf(tmpVal, "%d", _val);
|
||||
return tmpVal;
|
||||
}
|
||||
std::string std::to_string(long _val) {
|
||||
char tmpVal[256];
|
||||
sprintf(tmpVal, "%ld", _val);
|
||||
return tmpVal;
|
||||
}
|
||||
std::string std::to_string(long long _val) {
|
||||
char tmpVal[256];
|
||||
sprintf(tmpVal, "%lld", _val);
|
||||
return tmpVal;
|
||||
}
|
||||
std::string std::to_string(unsigned _val) {
|
||||
char tmpVal[256];
|
||||
sprintf(tmpVal, "%u", _val);
|
||||
return tmpVal;
|
||||
}
|
||||
std::string std::to_string(unsigned long _val) {
|
||||
char tmpVal[256];
|
||||
sprintf(tmpVal, "%lu", _val);
|
||||
return tmpVal;
|
||||
}
|
||||
std::string std::to_string(unsigned long long _val) {
|
||||
char tmpVal[256];
|
||||
sprintf(tmpVal, "%llu", _val);
|
||||
return tmpVal;
|
||||
}
|
||||
std::string std::to_string(float _val) {
|
||||
char tmpVal[256];
|
||||
sprintf(tmpVal, "%f", _val);
|
||||
return tmpVal;
|
||||
}
|
||||
std::string std::to_string(double _val) {
|
||||
char tmpVal[256];
|
||||
sprintf(tmpVal, "%d", _val);
|
||||
return tmpVal;
|
||||
}
|
||||
std::string std::to_string(long double _val) {
|
||||
char tmpVal[256];
|
||||
sprintf(tmpVal, "%ld", _val);
|
||||
return tmpVal;
|
||||
}
|
||||
#endif
|
||||
|
||||
std::u32string to_u32string(bool _val) {
|
||||
if (_val == true) {
|
||||
|
@ -10,9 +10,10 @@
|
||||
#define __ETK_USTRING_H__
|
||||
|
||||
#include <etk/debug.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
namespace etk {
|
||||
|
||||
@ -41,7 +42,15 @@ template<class T> std::u32string to_u32string(T t, std::ios_base & (*f)(std::ios
|
||||
namespace std {
|
||||
std::string to_string(bool _val);
|
||||
#ifdef __TARGET_OS__Android
|
||||
|
||||
std::string to_string(int _val);
|
||||
std::string to_string(long _val);
|
||||
std::string to_string(long long _val);
|
||||
std::string to_string(unsigned _val);
|
||||
std::string to_string(unsigned long _val);
|
||||
std::string to_string(unsigned long long _val);
|
||||
std::string to_string(float _val);
|
||||
std::string to_string(double _val);
|
||||
std::string to_string(long double _val);
|
||||
#endif
|
||||
}
|
||||
std::u32string to_u32string(bool _val);
|
||||
|
@ -58,7 +58,7 @@ void debug::displayTime(void)
|
||||
|
||||
|
||||
#ifdef __TARGET_OS__Android
|
||||
enum etk::logLevel g_requestedLevel = etk::logLevelError;
|
||||
enum etk::logLevel g_requestedLevel = etk::logLevelDebug;
|
||||
#else
|
||||
enum etk::logLevel g_requestedLevel = etk::logLevelWarning;
|
||||
#endif
|
||||
|
@ -257,7 +257,7 @@ void etk::initDefaultFolder(const char* _applName) {
|
||||
|
||||
char * basicPath = getenv("HOME");
|
||||
if (NULL == basicPath) {
|
||||
TK_ERROR("ERROR while trying to get the path of the home folder");
|
||||
TK_WARNING("ERROR while trying to get the path of the home folder");
|
||||
#if defined(__TARGET_OS__Windows)
|
||||
baseFolderHome = "c:/";
|
||||
#elif defined(__TARGET_OS__Android)
|
||||
@ -709,12 +709,12 @@ void etk::FSNode::generateFileSystemPath(void) {
|
||||
} else if (themeName != "default") {
|
||||
// Selected theme :
|
||||
// check in the user data :
|
||||
m_systemFileName = baseFolderDataUser + "theme/" + themeName + "/" + basicName;
|
||||
m_systemFileName = simplifyPath(baseFolderDataUser + "theme/" + themeName + "/" + basicName);
|
||||
if (directCheckFile(m_systemFileName) == true) {
|
||||
return;
|
||||
}
|
||||
// check in the Appl data :
|
||||
m_systemFileName = baseFolderData + "theme/" + themeName + "/" + basicName;
|
||||
m_systemFileName = simplifyPath(baseFolderData + "theme/" + themeName + "/" + basicName);
|
||||
if (directCheckFile(m_systemFileName, true) == true) {
|
||||
m_type = etk::FSN_TYPE_THEME_DATA;
|
||||
return;
|
||||
@ -723,12 +723,12 @@ void etk::FSNode::generateFileSystemPath(void) {
|
||||
themeName = "default";
|
||||
// default theme :
|
||||
// check in the user data :
|
||||
m_systemFileName = baseFolderDataUser + "theme/" + themeName + "/" + basicName;
|
||||
m_systemFileName = simplifyPath(baseFolderDataUser + "theme/" + themeName + "/" + basicName);
|
||||
if (true==directCheckFile(m_systemFileName)) {
|
||||
return;
|
||||
}
|
||||
// check in the Appl data : In every case we return this one ...
|
||||
m_systemFileName = baseFolderData + "theme/" + themeName + "/" + basicName;
|
||||
m_systemFileName = simplifyPath(baseFolderData + "theme/" + themeName + "/" + basicName);
|
||||
if (true==directCheckFile(m_systemFileName, true)) {
|
||||
m_type = etk::FSN_TYPE_THEME_DATA;
|
||||
return;
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#ifndef __ETK_TYPES_H__
|
||||
#define __ETK_TYPES_H__
|
||||
|
||||
/*
|
||||
#ifdef __TARGET_OS__Android
|
||||
// NOTE : This is for compatibility with the C++ stdlib (missing this declaration on android ...
|
||||
namespace std {
|
||||
@ -19,6 +19,7 @@
|
||||
#include <wchar.h>
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
*/
|
||||
#include <iostream>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
Loading…
Reference in New Issue
Block a user