Apply same fixes from OpenAL Soft to STB image loader.

Also make sure it works with the latest version from the website (which is downloaded automatically).
experimental
shadowislord 10 years ago
parent 756497fb92
commit 883ff7da71
  1. 14
      jme3-android-native/src/native/jme_stbi/Android.mk
  2. 2
      jme3-android-native/src/native/jme_stbi/Application.mk
  3. 5
      jme3-android-native/src/native/jme_stbi/com_jme3_texture_plugins_AndroidNativeImageLoader.c

@ -1,13 +1,15 @@
TARGET_PLATFORM := android-9
LOCAL_PATH := $(call my-dir) LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := stbijme LOCAL_MODULE := stbijme
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_CFLAGS += -O2
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,, $(wildcard $(LOCAL_PATH)/*.c))
#adds zlib LOCAL_C_INCLUDES += $(LOCAL_PATH)
LOCAL_LDLIBS += -lz -llog
LOCAL_LDLIBS := -lz -llog -Wl,-s
LOCAL_SRC_FILES := com_jme3_texture_plugins_AndroidNativeImageLoader.c
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)

@ -1,3 +1,3 @@
APP_PLATFORM := android-9
APP_OPTIM := release APP_OPTIM := release
APP_ABI := all APP_ABI := all
#APP_ABI := armeabi-v7a

@ -6,8 +6,9 @@
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#define STBI_HEADER_FILE_ONLY
#include "stb_image.c" #define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
typedef unsigned int uint32; typedef unsigned int uint32;

Loading…
Cancel
Save