From 24b731f78c49c0ef822c2fee99bd44ed9a7ea8cc Mon Sep 17 00:00:00 2001 From: jackun Date: Tue, 4 Aug 2020 20:50:38 +0300 Subject: [PATCH] Add `--dlsym` option --- bin/mangohud.in | 7 ++++++- data/mangohud.1 | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/mangohud.in b/bin/mangohud.in index 9f91374c..610725a8 100755 --- a/bin/mangohud.in +++ b/bin/mangohud.in @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash if [ "$#" -eq 0 ]; then programname=`basename "$0"` @@ -8,6 +8,11 @@ if [ "$#" -eq 0 ]; then exit 1 fi +if [ "$1" = "--dlsym" ]; then + MANGOHUD_DLSYM=1 + shift +fi + MANGOHUD_LIB_NAME="libMangoHud.so" if [ "$MANGOHUD_DLSYM" = "1" ]; then diff --git a/data/mangohud.1 b/data/mangohud.1 index be473871..89e38068 100644 --- a/data/mangohud.1 +++ b/data/mangohud.1 @@ -5,7 +5,7 @@ mangohud \- enable MangoHud on any application .SH SYNOPSIS -\fBmangohud\fR COMMAND +\fBmangohud\fR [--dlsym] COMMAND .SH DESCRIPTION MangoHud is a Vulkan/OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more. @@ -15,7 +15,7 @@ MangoHud can be enabled for Vulkan applications by setting \fBMANGOHUD=1\fR as e .br To load MangoHud for any application, including OpenGL applications, the \fBmangohud\fR executable can be used. It preloads a library via ld into the application. .br -Note: some OpenGL applications may also need dlsym hooking. This can be done by setting \fBMANGOHUD_DLSYM=1\fR as envrionment variable. +Note: some OpenGL applications may also need dlsym hooking. This can be done by passing option \fB--dlsym\fR or by setting \fBMANGOHUD_DLSYM=1\fR as envrionment variable. .SH CONFIG MangoHud comes with a config file which can be used to set configuration options globally or per application. The priorities of different config files are: