From 0264ff62f00d13cd84aa9b9f4a2ff9f98ffd3d12 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Sat, 6 Sep 2014 13:50:00 +0200 Subject: [PATCH] Update native with GL-lost-management (UI comes back on Android after switching away) --- Common/Log.h | 6 +----- UI/GameInfoCache.cpp | 2 +- UI/NativeApp.cpp | 4 ++-- native | 2 +- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Common/Log.h b/Common/Log.h index a23518c0ce..9780815b56 100644 --- a/Common/Log.h +++ b/Common/Log.h @@ -74,7 +74,6 @@ enum LOG_TYPE { NUMBER_OF_LOGS, // Must be last }; -// FIXME: should this be removed? enum LOG_LEVELS { LNOTICE = NOTICE_LEVEL, LERROR = ERROR_LEVEL, @@ -84,12 +83,9 @@ enum LOG_LEVELS { LVERBOSE = VERBOSE_LEVEL, }; -#define LOGTYPES_LEVELS LogTypes::LOG_LEVELS -#define LOGTYPES_TYPE LogTypes::LOG_TYPE - } // namespace -void GenericLog(LOGTYPES_LEVELS level, LOGTYPES_TYPE type, +void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type, const char *file, int line, const char *fmt, ...) #ifdef __GNUC__ __attribute__((format(printf, 5, 6))) diff --git a/UI/GameInfoCache.cpp b/UI/GameInfoCache.cpp index a2d5ec0804..70717a6ee3 100644 --- a/UI/GameInfoCache.cpp +++ b/UI/GameInfoCache.cpp @@ -609,7 +609,7 @@ again: void GameInfoCache::SetupTexture(GameInfo *info, std::string &textureData, Thin3DContext *thin3d, Thin3DTexture *&tex, double &loadTime) { if (textureData.size()) { if (!tex) { - tex = thin3d->CreateTextureFromFileData(textureData.data(), (int)textureData.size(), T3DFileType::PNG); + tex = thin3d->CreateTextureFromFileData((const uint8_t *)textureData.data(), (int)textureData.size(), T3DImageType::PNG); if (tex) { loadTime = time_now_d(); } else { diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 1eb3962f75..a88dcb19d7 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -533,10 +533,10 @@ void NativeInitGraphics() { ui_draw2d_front.Init(thin3d); #ifdef USING_QT_UI - uiTexture = thin3d->CreateTextureFromFile("ui_atlas_lowmem.zim", T3DFileType::ZIM); + uiTexture = thin3d->CreateTextureFromFile("ui_atlas_lowmem.zim", T3DImageType::ZIM); if (!uiTexture) { #else - uiTexture = thin3d->CreateTextureFromFile("ui_atlas.zim", T3DFileType::ZIM); + uiTexture = thin3d->CreateTextureFromFile("ui_atlas.zim", T3DImageType::ZIM); if (!uiTexture) { #endif PanicAlert("Failed to load ui_atlas.zim.\n\nPlace it in the directory \"assets\" under your PPSSPP directory."); diff --git a/native b/native index ef3912f63f..e96761e400 160000 --- a/native +++ b/native @@ -1 +1 @@ -Subproject commit ef3912f63f5bbb4738cc6fa6949e25197626e5c5 +Subproject commit e96761e400e03a4ad54d753953f3d71df8bef016