Add markedtobject
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
#include "CrossLang.hpp"
|
||||
#include <iostream>
|
||||
|
||||
#if defined(GEKKO)
|
||||
#if defined(GEKKO) || defined(__SWITCH__)
|
||||
#undef CROSSLANG_ENABLE_TERMIOS
|
||||
#endif
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#include "CrossLang.hpp"
|
||||
|
||||
#include <TessesFramework/TessesFrameworkFeatures.h>
|
||||
#if defined(TESSESFRAMEWORK_ENABLE_MBED)
|
||||
#include <iostream>
|
||||
|
||||
@ -13,7 +13,16 @@ namespace Tesses::CrossLang
|
||||
#else
|
||||
static char EnvPathSeperator=':';
|
||||
#endif
|
||||
|
||||
static std::string GetHomeFolder()
|
||||
{
|
||||
#if defined(CROSSLANG_ENABLE_PLATFORM_FOLDERS)
|
||||
return sago::getHomeDir();
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
return "/home/web_user";
|
||||
#else
|
||||
return "/CrossLangProfile";
|
||||
#endif
|
||||
}
|
||||
Tesses::Framework::Filesystem::VFSPath GetCrossLangConfigDir()
|
||||
{
|
||||
Tesses::Framework::Filesystem::VFSPath p;
|
||||
@ -58,16 +67,7 @@ namespace Tesses::CrossLang
|
||||
#endif
|
||||
}
|
||||
|
||||
static std::string GetHomeFolder()
|
||||
{
|
||||
#if defined(CROSSLANG_ENABLE_PLATFORM_FOLDERS)
|
||||
return sago::getHomeDir();
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
return "/home/web_user";
|
||||
#else
|
||||
return "/CrossLangProfile";
|
||||
#endif
|
||||
}
|
||||
|
||||
static TObject Env_getCrossLangConfig(GCList& ls, std::vector<TObject> args)
|
||||
{
|
||||
return GetCrossLangConfigDir();
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include "CrossLang.hpp"
|
||||
|
||||
#if defined(GEKKO)
|
||||
#if defined(GEKKO) || defined(__SWITCH__)
|
||||
#undef CROSSLANG_ENABLE_PROCESS
|
||||
#endif
|
||||
|
||||
|
||||
@ -8,8 +8,13 @@ namespace Tesses::CrossLang
|
||||
{
|
||||
static int64_t ToLocalTime(int64_t local)
|
||||
{
|
||||
#if defined(__SWITCH__)
|
||||
local -= _timezone;
|
||||
if(_daylight)
|
||||
#else
|
||||
local -= timezone;
|
||||
if(daylight)
|
||||
#endif
|
||||
{
|
||||
auto epoch = date::sys_days{date::January/1/1970};
|
||||
epoch += date::days(local/86400);
|
||||
@ -163,10 +168,15 @@ namespace Tesses::CrossLang
|
||||
dict->DeclareFunction(gc, "Sleep","Sleep for a specified amount of milliseconds (multiply seconds by 1000 to get milliseconds)", {"ms"},Time_Sleep);
|
||||
|
||||
gc->BarrierBegin();
|
||||
#if defined(__SWITCH__)
|
||||
dict->SetValue("Zone", (int64_t)-(_timezone));
|
||||
dict->SetValue("SupportsDaylightSavings",(int64_t)_daylight);
|
||||
#else
|
||||
dict->SetValue("Zone", (int64_t)-(timezone));
|
||||
dict->SetValue("SupportsDaylightSavings",(int64_t)daylight);
|
||||
#endif
|
||||
env->DeclareVariable("Time", dict);
|
||||
|
||||
gc->BarrierEnd();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user