Files
RedHotRoast-ios/HybridCLRData/LocalIl2CppData-OSXEditor/il2cpp/libil2cpp/os/c-api/CultureInfo.cpp
T

21 lines
447 B
C++
Raw Normal View History

2026-07-17 14:03:00 +08:00
#include "os/c-api/il2cpp-config-platforms.h"
#if IL2CPP_TINY
#include "os/Locale.h"
#include "os/MarshalAlloc.h"
#include <cstring>
extern "C"
{
char* STDCALL UnityPalGetCurrentLocaleName()
{
auto locale = il2cpp::os::Locale::GetLocale();
char* allocatedLocal = (char*)il2cpp::os::MarshalAlloc::Allocate(locale.size() + 1);
strcpy(allocatedLocal, locale.c_str());
return allocatedLocal;
}
}
#endif