From 7e37e68755146827dfdf1e6842f8664b18bcddab Mon Sep 17 00:00:00 2001 From: Xawotihs Date: Tue, 23 Nov 2010 23:35:40 +0000 Subject: [PATCH] more iOS port fix --- projects/mtg/include/utils.h | 2 +- projects/mtg/src/GameStateMenu.cpp | 4 ---- projects/mtg/src/WResourceManager.cpp | 6 +++--- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/projects/mtg/include/utils.h b/projects/mtg/include/utils.h index e29344aa7..7f310fecf 100644 --- a/projects/mtg/include/utils.h +++ b/projects/mtg/include/utils.h @@ -62,7 +62,7 @@ void dumpStack(); // *** DEFINES *** -#if defined (WIN32) || defined (LINUX) +#if defined (WIN32) || defined (LINUX) || defined (IOS) #define RAM_BLOCK (100 * 1024 * 1024) #else #define RAM_BLOCK (1024 * 1024) diff --git a/projects/mtg/src/GameStateMenu.cpp b/projects/mtg/src/GameStateMenu.cpp index 5e5afe4a2..3f28fdc39 100644 --- a/projects/mtg/src/GameStateMenu.cpp +++ b/projects/mtg/src/GameStateMenu.cpp @@ -278,11 +278,7 @@ int GameStateMenu::nextDirectory(const char * root, const char * file) int found = 0; if (!mDip) { -#ifdef IOS - mDip = opendir(JGE_GET_RES(root).c_str()); -#else mDip = opendir(root); -#endif //IOS } while (!found && (mDit = readdir(mDip))) diff --git a/projects/mtg/src/WResourceManager.cpp b/projects/mtg/src/WResourceManager.cpp index 3a56a894e..779811695 100644 --- a/projects/mtg/src/WResourceManager.cpp +++ b/projects/mtg/src/WResourceManager.cpp @@ -69,7 +69,7 @@ void WResourceManager::DebugRender() textureWCache.cacheSize, textureWCache.maxCacheSize, man); font->DrawString(buf, 10, 5); -#if defined (WIN32) || defined (LINUX) +#if defined (WIN32) || defined (LINUX) || defined (IOS) #else int maxLinear = ramAvailableLineareMax(); int ram = ramAvailable(); @@ -950,7 +950,7 @@ void WResourceManager::RemoveWFonts() void WResourceManager::ResetCacheLimits() { -#if defined WIN32 || defined LINUX +#if defined WIN32 || defined LINUX || defined (IOS) #ifdef FORCE_LOW_CACHE_MEMORY textureWCache.Resize(kConstrainedCacheLimit, MAX_CACHE_OBJECTS); #else @@ -1383,7 +1383,7 @@ bool WCache::Cleanup() } while (cacheItems > MAX_CACHE_OBJECTS || cacheItems > maxCached || cacheSize > maxCacheSize -#if defined WIN32 || defined LINUX +#if defined WIN32 || defined LINUX || defined (IOS) #else || ramAvailableLineareMax() < MIN_LINEAR_RAM #endif