Merge pull request #556 from flgx16/togl

Detect ToGL
pull/561/head
flightlessmango 3 years ago committed by GitHub
commit 6824ccb439
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -78,14 +78,28 @@ void imgui_init()
} }
if (sw_stats.engine != EngineTypes::ZINK){ if (sw_stats.engine != EngineTypes::ZINK){
sw_stats.engine = OPENGL;
stringstream ss;
string line;
auto pid = getpid(); auto pid = getpid();
string find_wined3d = "lsof -w -lnPX -L -p " + to_string(pid) + " | grep -oh wined3d"; string path = "/proc/" + to_string(pid) + "/map_files/";
string ret_wined3d = exec(find_wined3d); auto files = exec("ls " + path);
if (ret_wined3d == "wined3d\n" ) ss << files;
sw_stats.engine = WINED3D;
else while(std::getline(ss, line, '\n')){
sw_stats.engine = OPENGL; auto file = path + line;
auto sym = read_symlink(file.c_str());
if (sym.find("wined3d") != std::string::npos) {
sw_stats.engine = WINED3D;
break;
} else if (sym.find("libtogl.so") != std::string::npos || sym.find("libtogl_client.so") != std::string::npos) {
sw_stats.engine = TOGL;
break;
}
}
} }
is_blacklisted(true); is_blacklisted(true);
notifier.params = &params; notifier.params = &params;
start_notifier(notifier); start_notifier(notifier);

@ -19,7 +19,7 @@ struct benchmark_stats benchmark;
struct fps_limit fps_limit_stats {}; struct fps_limit fps_limit_stats {};
ImVec2 real_font_size; ImVec2 real_font_size;
std::vector<logData> graph_data; std::vector<logData> graph_data;
const char* engines[] = {"Unknown", "OpenGL", "VULKAN", "DXVK", "VKD3D", "DAMAVAND", "ZINK", "WINED3D", "Feral3D"}; const char* engines[] = {"Unknown", "OpenGL", "VULKAN", "DXVK", "VKD3D", "DAMAVAND", "ZINK", "WINED3D", "Feral3D", "ToGL"};
void update_hw_info(struct swapchain_stats& sw_stats, struct overlay_params& params, uint32_t vendorID) void update_hw_info(struct swapchain_stats& sw_stats, struct overlay_params& params, uint32_t vendorID)
{ {

@ -35,6 +35,7 @@ enum EngineTypes
WINED3D, WINED3D,
FERAL3D, FERAL3D,
TOGL,
}; };
extern const char* engines[]; extern const char* engines[];

Loading…
Cancel
Save