From 87f758f9b4796ed14ad844e68b651eaf891922d7 Mon Sep 17 00:00:00 2001 From: Ray Date: Fri, 26 Sep 2025 22:26:19 +0200 Subject: [PATCH] Review latest PRs formatting --- src/platforms/rcore_android.c | 13 ++++++++----- src/rmodels.c | 24 +++++++++++------------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/platforms/rcore_android.c b/src/platforms/rcore_android.c index 6c67dc893..6ecc41888 100644 --- a/src/platforms/rcore_android.c +++ b/src/platforms/rcore_android.c @@ -447,8 +447,8 @@ int GetMonitorCount(void) int GetCurrentMonitor(void) { int displayId = -1; - JNIEnv* env = NULL; - JavaVM* vm = platform.app->activity->vm; + JNIEnv *env = NULL; + JavaVM *vm = platform.app->activity->vm; (*vm)->AttachCurrentThread(vm, &env, NULL); jobject activity = platform.app->activity->clazz; @@ -458,12 +458,15 @@ int GetCurrentMonitor(void) jobject display = (*env)->CallObjectMethod(env, activity, getDisplayMethod); - if (display == NULL) { + if (display == NULL) + { TRACELOG(LOG_ERROR, "GetCurrentMonitor() couldn't get the display object"); - } else { + } + else + { jclass displayClass = (*env)->FindClass(env, "android/view/Display"); jmethodID getDisplayIdMethod = (*env)->GetMethodID(env, displayClass, "getDisplayId", "()I"); - displayId = (int) (*env)->CallIntMethod(env, display, getDisplayIdMethod); + displayId = (int)(*env)->CallIntMethod(env, display, getDisplayIdMethod); (*env)->DeleteLocalRef(env, displayClass); } diff --git a/src/rmodels.c b/src/rmodels.c index 06180cd5d..9aca37a24 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -6239,19 +6239,17 @@ static ModelAnimation *LoadModelAnimationsGLTF(const char *fileName, int *animCo *animCount = (int)data->animations_count; animations = (ModelAnimation *)RL_CALLOC(data->animations_count, sizeof(ModelAnimation)); - Transform worldTransform; - { - cgltf_float cgltf_worldTransform[16]; - cgltf_node* node = skin.joints[0]; - cgltf_node_transform_world(node->parent, cgltf_worldTransform); - Matrix worldMatrix = { - cgltf_worldTransform[0], cgltf_worldTransform[4], cgltf_worldTransform[8], cgltf_worldTransform[12], - cgltf_worldTransform[1], cgltf_worldTransform[5], cgltf_worldTransform[9], cgltf_worldTransform[13], - cgltf_worldTransform[2], cgltf_worldTransform[6], cgltf_worldTransform[10], cgltf_worldTransform[14], - cgltf_worldTransform[3], cgltf_worldTransform[7], cgltf_worldTransform[11], cgltf_worldTransform[15] - }; - MatrixDecompose(worldMatrix, &(worldTransform.translation), &(worldTransform.rotation), &(worldTransform.scale)); - } + Transform worldTransform = { 0 }; + cgltf_float cgltf_worldTransform[16] = { 0 }; + cgltf_node *node = skin.joints[0]; + cgltf_node_transform_world(node->parent, cgltf_worldTransform); + Matrix worldMatrix = { + cgltf_worldTransform[0], cgltf_worldTransform[4], cgltf_worldTransform[8], cgltf_worldTransform[12], + cgltf_worldTransform[1], cgltf_worldTransform[5], cgltf_worldTransform[9], cgltf_worldTransform[13], + cgltf_worldTransform[2], cgltf_worldTransform[6], cgltf_worldTransform[10], cgltf_worldTransform[14], + cgltf_worldTransform[3], cgltf_worldTransform[7], cgltf_worldTransform[11], cgltf_worldTransform[15] + }; + MatrixDecompose(worldMatrix, &worldTransform.translation, &worldTransform.rotation, &worldTransform.scale); for (unsigned int i = 0; i < data->animations_count; i++) {