mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 09:46:02 +08:00
This commit is contained in:
parent
b4788a6c42
commit
5d3d681d6f
@ -37,6 +37,10 @@
|
|||||||
#include <spine/AtlasAttachmentLoader.h>
|
#include <spine/AtlasAttachmentLoader.h>
|
||||||
#include <spine/Animation.h>
|
#include <spine/Animation.h>
|
||||||
|
|
||||||
|
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
|
||||||
|
#define strdup _strdup
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const char* parent;
|
const char* parent;
|
||||||
const char* skin;
|
const char* skin;
|
||||||
@ -569,11 +573,18 @@ spSkeletonData* spSkeletonJson_readSkeletonData (spSkeletonJson* self, const cha
|
|||||||
CONST_CAST(char*, self->error) = 0;
|
CONST_CAST(char*, self->error) = 0;
|
||||||
internal->linkedMeshCount = 0;
|
internal->linkedMeshCount = 0;
|
||||||
|
|
||||||
|
#ifndef __ANDROID__
|
||||||
oldLocale = strdup(setlocale(LC_NUMERIC, NULL));
|
oldLocale = strdup(setlocale(LC_NUMERIC, NULL));
|
||||||
setlocale(LC_NUMERIC, "C");
|
setlocale(LC_NUMERIC, "C");
|
||||||
|
#endif
|
||||||
|
|
||||||
root = Json_create(json);
|
root = Json_create(json);
|
||||||
|
|
||||||
|
#ifndef __ANDROID__
|
||||||
setlocale(LC_NUMERIC, oldLocale);
|
setlocale(LC_NUMERIC, oldLocale);
|
||||||
free(oldLocale);
|
free(oldLocale);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!root) {
|
if (!root) {
|
||||||
_spSkeletonJson_setError(self, 0, "Invalid skeleton JSON: ", Json_getError());
|
_spSkeletonJson_setError(self, 0, "Invalid skeleton JSON: ", Json_getError());
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user