https://github.com/libsdl-org/Maelstrom/commit/5097fbcbd2339d4186209a3e9ec99b0f606523c7
From 5097fbcbd2339d4186209a3e9ec99b0f606523c7 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 5 Nov 2012 00:45:43 -0800
Subject: [PATCH] Fixed compile on Android
---
game/gameover.cpp | 12 ++++++------
physfs/physfs_platforms.h | 3 +++
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/game/gameover.cpp b/game/gameover.cpp
index 56a82880..956c3ff1 100644
--- a/game/gameover.cpp
+++ b/game/gameover.cpp
@@ -33,10 +33,10 @@ struct FinalScore {
int Frags;
};
-static int cmp_byscore(const void *_A, const void *_B)
+static int cmp_byscore(const void *pA, const void *pB)
{
- const FinalScore *A = static_cast<const FinalScore*>(_A);
- const FinalScore *B = static_cast<const FinalScore*>(_B);
+ const FinalScore *A = static_cast<const FinalScore*>(pA);
+ const FinalScore *B = static_cast<const FinalScore*>(pB);
if (A->Score == B->Score) {
// Sort lowest player first
return A->Player - B->Player;
@@ -44,10 +44,10 @@ static int cmp_byscore(const void *_A, const void *_B)
return B->Score - A->Score;
}
-static int cmp_byfrags(const void *_A, const void *_B)
+static int cmp_byfrags(const void *pA, const void *pB)
{
- const FinalScore *A = static_cast<const FinalScore*>(_A);
- const FinalScore *B = static_cast<const FinalScore*>(_B);
+ const FinalScore *A = static_cast<const FinalScore*>(pA);
+ const FinalScore *B = static_cast<const FinalScore*>(pB);
if (A->Frags == B->Frags) {
return cmp_byscore(A, B);
}
diff --git a/physfs/physfs_platforms.h b/physfs/physfs_platforms.h
index 1baf6fcb..511ebfed 100644
--- a/physfs/physfs_platforms.h
+++ b/physfs/physfs_platforms.h
@@ -36,6 +36,9 @@
#elif defined(macintosh)
# error Classic Mac OS support was dropped from PhysicsFS 2.0. Move to OS X.
#elif defined(__linux)
+# if defined(ANDROID)
+# define PHYSFS_NO_CDROM_SUPPORT
+# endif
# define PHYSFS_PLATFORM_LINUX 1
# define PHYSFS_PLATFORM_UNIX 1
# define PHYSFS_PLATFORM_POSIX 1