Show bitness in library loaders

pull/390/head
jackun 4 years ago
parent db151bb236
commit 1f81889d1b
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -26,7 +26,7 @@ bool libdbus_loader::Load(const std::string& library_name) {
#if defined(LIBRARY_LOADER_DBUS_H_DLOPEN)
library_ = dlopen(library_name.c_str(), RTLD_LAZY);
if (!library_) {
std::cerr << "MANGOHUD: " << library_name << " dlopen failed: " << dlerror() << std::endl;
std::cerr << "MANGOHUD: Failed to open " << "" MANGOHUD_ARCH << " " << library_name << ": " << dlerror() << std::endl;
return false;
}

@ -17,7 +17,7 @@ bool glx_loader::Load() {
// Force load libGL
void *handle = real_dlopen("libGL.so.1", RTLD_LAZY);
if (!handle) {
std::cerr << "MANGOHUD: couldn't find libGL.so.1: " << dlerror() << std::endl;
std::cerr << "MANGOHUD: Failed to open " << "" MANGOHUD_ARCH << " libGL.so.1: " << dlerror() << std::endl;
return false;
}

@ -25,7 +25,7 @@ bool libnvctrl_loader::Load(const std::string& library_name) {
#if defined(LIBRARY_LOADER_NVCTRL_H_DLOPEN)
library_ = dlopen(library_name.c_str(), RTLD_LAZY);
if (!library_) {
std::cerr << "MANGOHUD: " << library_name << " dlopen failed: " << dlerror() << std::endl;
std::cerr << "MANGOHUD: Failed to open " << "" MANGOHUD_ARCH << " " << library_name << ": " << dlerror() << std::endl;
return false;
}

@ -2,6 +2,7 @@
// Path to the code generator: /home/crz/git/MangoHud/generate_library_loader.py .
#include "loader_nvml.h"
#include <iostream>
// Put these sanity checks here so that they fire at most once
// (to avoid cluttering the build output).
@ -26,8 +27,10 @@ bool libnvml_loader::Load(const std::string& library_name) {
#if defined(LIBRARY_LOADER_NVML_H_DLOPEN)
library_ = dlopen(library_name.c_str(), RTLD_LAZY);
if (!library_)
if (!library_) {
std::cerr << "MANGOHUD: Failed to open " << "" MANGOHUD_ARCH << " " << library_name << ": " << dlerror() << std::endl;
return false;
}
#endif

@ -15,7 +15,7 @@ bool libx11_loader::Load(const std::string& library_name) {
library_ = dlopen(library_name.c_str(), RTLD_LAZY);
if (!library_) {
std::cerr << "MANGOHUD: " << library_name << " dlopen failed: " << dlerror() << std::endl;
std::cerr << "MANGOHUD: Failed to open " << "" MANGOHUD_ARCH << " " << library_name << ": " << dlerror() << std::endl;
return false;
}

Loading…
Cancel
Save