More fixes to MIDI support in SDL_mixer, fixed crashing because of no native mouse cursor support on Android
This commit is contained in:
@@ -7,7 +7,8 @@ LOCAL_MODULE := sdl_mixer
|
||||
LOCAL_CFLAGS := -O3 -I$(LOCAL_PATH) -I$(LOCAL_PATH)/../sdl-$(SDL_VERSION)/include -I$(LOCAL_PATH)/include \
|
||||
-I$(LOCAL_PATH)/../mad/include -I$(LOCAL_PATH)/../flac/include -I$(LOCAL_PATH)/../ogg/include \
|
||||
-I$(LOCAL_PATH)/../vorbis/include -I$(LOCAL_PATH)/../tremor/include -I$(LOCAL_PATH)/../mikmod/include \
|
||||
-DWAV_MUSIC -DOGG_USE_TREMOR -DOGG_MUSIC -DFLAC_MUSIC -DMOD_MUSIC -DUSE_TIMIDITY_MIDI
|
||||
-DWAV_MUSIC -DOGG_USE_TREMOR -DOGG_MUSIC -DFLAC_MUSIC -DMOD_MUSIC \
|
||||
-I$(LOCAL_PATH)/timidity -DMID_MUSIC -DUSE_TIMIDITY_MIDI
|
||||
|
||||
LOCAL_CPP_EXTENSION := .cpp
|
||||
|
||||
@@ -16,6 +17,8 @@ LOCAL_SRC_FILES := $(notdir $(wildcard $(LOCAL_PATH)/*.c)) $(addprefix timidity/
|
||||
LOCAL_SHARED_LIBRARIES := sdl-$(SDL_VERSION)
|
||||
LOCAL_STATIC_LIBRARIES := flac mikmod
|
||||
|
||||
LOCAL_LDLIBS := -llog
|
||||
|
||||
ifeq "$(TARGET_ARCH_ABI)" "armeabi"
|
||||
LOCAL_CFLAGS += -DOGG_USE_TREMOR
|
||||
LOCAL_STATIC_LIBRARIES += tremor
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifdef ANDROID
|
||||
#include <android/log.h>
|
||||
#endif
|
||||
|
||||
#include "SDL.h"
|
||||
#include "config.h"
|
||||
@@ -298,6 +301,9 @@ int Timidity_Init(int rate, int format, int channels, int samples)
|
||||
if (!env || read_config_file(env)<0) {
|
||||
if (read_config_file(CONFIG_FILE)<0) {
|
||||
if (read_config_file(CONFIG_FILE_ETC)<0) {
|
||||
#ifdef ANDROID
|
||||
__android_log_print(ANDROID_LOG_INFO, "libSDL", "SDL_Mixer: Timidity: cannot find timidity.cfg, MIDI support disabled");
|
||||
#endif
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user