From 9950d8dbf36364799cd97bcd735570ca59f4046d Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 7 Jan 2020 13:34:55 +0000 Subject: [PATCH] Fix compilation of disabled custom APK location codepath --- renderdoc/android/android.cpp | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/renderdoc/android/android.cpp b/renderdoc/android/android.cpp index 56ef3e9bf..1f6d3872f 100644 --- a/renderdoc/android/android.cpp +++ b/renderdoc/android/android.cpp @@ -258,18 +258,24 @@ ReplayStatus InstallRenderDocServer(const rdcstr &deviceID) rdcarray paths; #if defined(RENDERDOC_APK_PATH) - string customPath(RENDERDOC_APK_PATH); - RDCLOG("Custom APK path: %s", customPath.c_str()); - - if(FileIO::IsRelativePath(customPath)) - customPath = libDir + "/" + customPath; - - if(customPath.back() != '/')) - customPath += '/'; - - paths.push_back(customPath); + rdcstr customPath(RENDERDOC_APK_PATH); +#else + rdcstr customPath; #endif + if(!customPath.empty()) + { + RDCLOG("Custom APK path: %s", customPath.c_str()); + + if(FileIO::IsRelativePath(customPath)) + customPath = libDir + "/" + customPath; + + if(customPath.back() != '/') + customPath += '/'; + + paths.push_back(customPath); + } + rdcstr suff = GetPlainABIName(abis[0]); paths.push_back(libDir + "/plugins/android/"); // Windows install