Skip to content

Commit

Permalink
Only use SDL specific code on Android and OSX when USE_SDL is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghabry committed Apr 14, 2019
1 parent d953825 commit 2949343
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/decoder_wildmidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
# define WILDMIDI_FREQ 44100
#endif

#ifdef __ANDROID__
#if defined(USE_SDL) && defined(__ANDROID__)
# include <jni.h>
# include "SDL_system.h"
# include "string.h"
Expand All @@ -46,7 +46,7 @@
*/
#define WILDMIDI_OPTS 0

#ifdef __ANDROID__
#if defined(USE_SDL) && defined(__ANDROID__)
std::string get_timidity_path_jni() {
JNIEnv* env = (JNIEnv*)SDL_AndroidGetJNIEnv();
jobject sdl_activity = (jobject)SDL_AndroidGetActivity();
Expand Down
2 changes: 1 addition & 1 deletion src/filefinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
# include <sys/types.h>
#endif

#ifdef __ANDROID__
#if defined(USE_SDL) && defined(__ANDROID__)
# include <jni.h>
# include <SDL_system.h>
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/main_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#elif defined(PSP2)
# include <cstdio>
# include <psp2/io/stat.h>
#elif defined(__APPLE__) && defined(__MACH__)
#if defined(USE_SDL) && defined(__APPLE__) && defined(__MACH__)
# include <SDL.h>
#endif

Expand Down Expand Up @@ -132,7 +132,7 @@ void Main_Data::Init() {
// No RomFS -> load games from hardcoded path
project_path = "sdmc:/3ds/easyrpg-player";
}
#elif defined(__APPLE__) && defined(__MACH__)
#elif defined(USE_SDL) && defined(__APPLE__) && defined(__MACH__)
# if SDL_MAJOR_VERSION>1
// Apple Finder does not set the working directory
// It points to HOME instead. When it is HOME change it to
Expand Down

0 comments on commit 2949343

Please sign in to comment.