mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-01-15 11:25:13 +00:00
Fix loading RenderDoc in offline mode for Linux (#1968)
This commit is contained in:
parent
468d7ea80e
commit
202c1046a1
|
@ -65,11 +65,18 @@ void LoadRenderDoc() {
|
||||||
#else
|
#else
|
||||||
static constexpr const char RENDERDOC_LIB[] = "librenderdoc.so";
|
static constexpr const char RENDERDOC_LIB[] = "librenderdoc.so";
|
||||||
#endif
|
#endif
|
||||||
if (void* mod = dlopen(RENDERDOC_LIB, RTLD_NOW | RTLD_NOLOAD)) {
|
// Check if we are running by RDoc GUI
|
||||||
const auto RENDERDOC_GetAPI =
|
void* mod = dlopen(RENDERDOC_LIB, RTLD_NOW | RTLD_NOLOAD);
|
||||||
reinterpret_cast<pRENDERDOC_GetAPI>(dlsym(mod, "RENDERDOC_GetAPI"));
|
if (!mod && Config::isRdocEnabled()) {
|
||||||
const s32 ret = RENDERDOC_GetAPI(eRENDERDOC_API_Version_1_6_0, (void**)&rdoc_api);
|
// If enabled in config, try to load RDoc runtime in offline mode
|
||||||
ASSERT(ret == 1);
|
if ((mod = dlopen(RENDERDOC_LIB, RTLD_NOW))) {
|
||||||
|
const auto RENDERDOC_GetAPI =
|
||||||
|
reinterpret_cast<pRENDERDOC_GetAPI>(dlsym(mod, "RENDERDOC_GetAPI"));
|
||||||
|
const s32 ret = RENDERDOC_GetAPI(eRENDERDOC_API_Version_1_6_0, (void**)&rdoc_api);
|
||||||
|
ASSERT(ret == 1);
|
||||||
|
} else {
|
||||||
|
LOG_ERROR(Render, "Cannot load RenderDoc: {}", dlerror());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (rdoc_api) {
|
if (rdoc_api) {
|
||||||
|
|
Loading…
Reference in a new issue