Merge remote-tracking branch 'origin/master' into develop

pull/445/head
jackun 3 years ago
commit 53cca5e723
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -204,6 +204,8 @@ Example: `MANGOHUD_CONFIG=cpu_temp,gpu_temp,position=top-right,height=500,font_s
Because comma is also used as option delimiter and needs to be escaped for values with a backslash, you can use `+` like `MANGOHUD_CONFIG=fps_limit=60+30+0` instead. Because comma is also used as option delimiter and needs to be escaped for values with a backslash, you can use `+` like `MANGOHUD_CONFIG=fps_limit=60+30+0` instead.
Note: Width and Height are set automatically based on the font_size, but can be overridden. Note: Width and Height are set automatically based on the font_size, but can be overridden.
Note: RAPL is currently used for Intel CPUs to show power draw with `cpu_power` which may be unreadable for non-root users due to [vulnerability](https://platypusattack.com/). The corresponding `energy_uj` file has to be readable by corresponding user, e.g. by running `chmod o+r /sys/class/powercap/intel-rapl\:0/energy_uj` as root, else the power shown will be *0 W*, though having the file readable may potentially be a security vulnerability persisting until system reboots.
## Vsync ## Vsync
### OpenGL Vsync ### OpenGL Vsync
- `-1` = Adaptive sync - `-1` = Adaptive sync

@ -5,13 +5,13 @@
################ PERFORMANCE ################# ################ PERFORMANCE #################
### Limit the application FPS. Comma-separated list of one or more FPS values (e.g. 0,30,60). 0 means unlimited (unless v-synced). ### Limit the application FPS. Comma-separated list of one or more FPS values (e.g. 0,30,60). 0 means unlimited (unless VSynced).
# fps_limit= # fps_limit=
### VSYNC [0-3] 0 = adaptive; 1 = off; 2 = mailbox; 3 = on ### VSync [0-3] 0 = adaptive; 1 = off; 2 = mailbox; 3 = on
# vsync= # vsync=
### OpenGL VSYNC [0-N] 0 = off; >=1 = wait for N v-blanks, N > 1 acts as a fps limiter (fps = display refresh rate / N) ### OpenGL VSync [0-N] 0 = off; >=1 = wait for N v-blanks, N > 1 acts as a FPS limiter (FPS = display refresh rate / N)
# gl_vsync= # gl_vsync=
################### VISUAL ################### ################### VISUAL ###################
@ -19,8 +19,8 @@
### Custom text centered useful for a header ### Custom text centered useful for a header
# custom_text_center = # custom_text_center =
### Legacy Layout ### Legacy layout
legacy_layout # legacy_layout = false
### Display the current CPU information ### Display the current CPU information
cpu_stats cpu_stats
@ -47,6 +47,7 @@ gpu_stats
### Display FPS and frametime ### Display FPS and frametime
fps fps
# fps_sampling_period=
frametime frametime
### Display loaded MangoHud architecture ### Display loaded MangoHud architecture
@ -71,7 +72,7 @@ frame_timing
### Time formatting examples ### Time formatting examples
# time_format = %H:%M # time_format = %H:%M
# time_format = [ %T %F ] # time_format = [ %T %F ]
# time_format = %X # locally formatted time, because of limited glyph range, missing characters may show as '?' (e.g. japanese) # time_format = %X # locally formatted time, because of limited glyph range, missing characters may show as '?' (e.g. Japanese)
### Change the hud font size (default is 24) ### Change the hud font size (default is 24)
font_size=24 font_size=24
@ -109,10 +110,12 @@ position=top-left
# swap # swap
# vram # vram
### Display Wine version ### Display MangoHud, engine or Wine version
# version
# engine_version
# wine # wine
### Disable / hide the hud by deafult ### Disable / hide the hud by default
# no_display # no_display
### Hud position offset ### Hud position offset
@ -152,25 +155,25 @@ background_alpha=0.5
# pci_dev = 0:0a:0.0 # pci_dev = 0:0a:0.0
### Blacklist ### Blacklist
#blacklist = # blacklist =
################## INTERACTION ################# ################## INTERACTION #################
### Change toggle keybinds for the hud & logging ### Change toggle keybinds for the hud & logging
#toggle_hud=Shift_R+F12 # toggle_hud=Shift_R+F12
#toggle_fps_limit=Shift_L+F1 # toggle_fps_limit=Shift_L+F1
#toggle_logging=Shift_L+F2 # toggle_logging=Shift_L+F2
#reload_cfg=Shift_L+F4 # reload_cfg=Shift_L+F4
#upload_log=Shift_L+F3 # upload_log=Shift_L+F3
################## LOG ################# ################## LOG #################
### Automatically start the log after X seconds ### Automatically start the log after X seconds
# autostart_log = 1 # autostart_log = 1
### Set amount of time in second that the logging will run for ### Set amount of time in seconds that the logging will run for
# log_duration # log_duration
### Set location of the output files (Required for logging) ### Set location of the output files (required for logging)
# output_folder = /home/<USERNAME>/mangologs # output_folder = /home/<USERNAME>/mangologs
### Permit uploading logs directly to Flightlessmango.com ### Permit uploading logs directly to FlightlessMango.com
# permit_upload=1 # permit_upload=1
### Define a '+'-separated list of percentiles shown in the benchmark results. ### Define a '+'-separated list of percentiles shown in the benchmark results.
### Use "AVG" to get a mean average. Default percentiles are 97+AVG+1+0.1 ### Use "AVG" to get a mean average. Default percentiles are 97+AVG+1+0.1

@ -19,7 +19,7 @@ if [ "$MANGOHUD_DLSYM" = "1" ]; then
MANGOHUD_LIB_NAME="@ld_libdir_mangohud_abs@libMangoHud_dlsym.so:${MANGOHUD_LIB_NAME}" MANGOHUD_LIB_NAME="@ld_libdir_mangohud_abs@libMangoHud_dlsym.so:${MANGOHUD_LIB_NAME}"
fi fi
# Preload using the plain filesnames of the libs, the dynamic linker will # Preload using the plain filenames of the libs, the dynamic linker will
# figure out whether the 32 or 64 bit version should be used, and will search # figure out whether the 32 or 64 bit version should be used, and will search
# for it in the correct directory # for it in the correct directory
LD_PRELOAD="${LD_PRELOAD}:${MANGOHUD_LIB_NAME}" LD_PRELOAD="${LD_PRELOAD}:${MANGOHUD_LIB_NAME}"

@ -14,7 +14,7 @@ if [ "$#" -eq 0 ]; then
fi fi
# Execute the program under a clean environment # Execute the program under a clean environment
# pass through the overriden LD_PRELOAD environment variables # pass through the overridden LD_PRELOAD environment variables
LD_PRELOAD="${LD_PRELOAD}:${MANGOHUD_LIB_NAME}" LD_PRELOAD="${LD_PRELOAD}:${MANGOHUD_LIB_NAME}"
exec env MANGOHUD=1 LD_PRELOAD="${LD_PRELOAD}" "$@" exec env MANGOHUD=1 LD_PRELOAD="${LD_PRELOAD}" "$@"

@ -15,7 +15,7 @@ if [ "$#" -eq 0 ]; then
fi fi
# Execute the program under a clean environment # Execute the program under a clean environment
# pass through the overriden LD_PRELOAD environment variables # pass through the overridden LD_PRELOAD environment variables
LD_PRELOAD="${LD_PRELOAD}:${MANGOHUD_LIB_NAME}" LD_PRELOAD="${LD_PRELOAD}:${MANGOHUD_LIB_NAME}"
LD_LIBRARY_PATH="${XDG_DATA_HOME}/MangoHud" LD_LIBRARY_PATH="${XDG_DATA_HOME}/MangoHud"

@ -78,7 +78,7 @@ dependencies() {
if [[ $(pip3 show meson; echo $?) == 1 || $(pip3 show mako; echo $?) == 1 ]]; then if [[ $(pip3 show meson; echo $?) == 1 || $(pip3 show mako; echo $?) == 1 ]]; then
$SU_CMD pip3 install 'meson>=0.54' mako $SU_CMD pip3 install 'meson>=0.54' mako
fi fi
if [[ ! -f /usr/local/bin/glslangValidator ]]; then if ! which glslangValidator >/dev/null; then
wget https://github.com/KhronosGroup/glslang/releases/download/SDK-candidate-26-Jul-2020/glslang-master-linux-Release.zip wget https://github.com/KhronosGroup/glslang/releases/download/SDK-candidate-26-Jul-2020/glslang-master-linux-Release.zip
unzip glslang-master-linux-Release.zip bin/glslangValidator unzip glslang-master-linux-Release.zip bin/glslangValidator
$SU_CMD install -m755 bin/glslangValidator /usr/local/bin/ $SU_CMD install -m755 bin/glslangValidator /usr/local/bin/

@ -7,7 +7,7 @@ project('MangoHud',
cc = meson.get_compiler('c') cc = meson.get_compiler('c')
cpp = meson.get_compiler('cpp') cpp = meson.get_compiler('cpp')
prog_python = import('python').find_installation('python3') prog_python = import('python').find_installation('python3', modules: ['mako'])
null_dep = dependency('', required : false) null_dep = dependency('', required : false)
mangohud_version = vcs_tag( mangohud_version = vcs_tag(

@ -407,7 +407,7 @@ parse_font_glyph_ranges(const char *str)
static bool static bool
parse_help(const char *str) parse_help(const char *str)
{ {
fprintf(stderr, "Layer params using VK_LAYER_MESA_OVERLAY_CONFIG=\n"); fprintf(stderr, "Layer params using MANGOHUD_CONFIG=\n");
#define OVERLAY_PARAM_BOOL(name) \ #define OVERLAY_PARAM_BOOL(name) \
fprintf(stderr, "\t%s=0|1\n", #name); fprintf(stderr, "\t%s=0|1\n", #name);
#define OVERLAY_PARAM_CUSTOM(name) #define OVERLAY_PARAM_CUSTOM(name)
@ -461,7 +461,7 @@ parse_string(const char *s, char *out_param, char *out_value)
} }
if (*s && !i) { if (*s && !i) {
fprintf(stderr, "mesa-overlay: syntax error: unexpected '%c' (%i) while " fprintf(stderr, "MANGOHUD: syntax error: unexpected '%c' (%i) while "
"parsing a string\n", *s, *s); "parsing a string\n", *s, *s);
fflush(stderr); fflush(stderr);
} }

@ -615,11 +615,11 @@ void init_system_info(){
const char* mangohud_recursion = getenv("MANGOHUD_RECURSION"); const char* mangohud_recursion = getenv("MANGOHUD_RECURSION");
if (!mangohud_recursion) { if (!mangohud_recursion) {
setenv("MANGOHUD_RECURSION", "1", 1); setenv("MANGOHUD_RECURSION", "1", 1);
driver = exec("glxinfo -B | grep 'OpenGL version' | sed 's/^.*: //' | cut -d' ' --output-delimiter=$'\n' -f1- | grep -v '(' | grep -v ')' | tr '\n' ' ' | cut -c 1-"); driver = exec("glxinfo -B | grep 'OpenGL version' | sed 's/^.*: //' | sed 's/([^()]*)//g' | tr -s ' '");
trim(driver); trim(driver);
unsetenv("MANGOHUD_RECURSION"); unsetenv("MANGOHUD_RECURSION");
} else { } else {
driver = "MangoHud glxinfo recurssion detected"; driver = "MangoHud glxinfo recursion detected";
} }
// Get WINE version // Get WINE version

Loading…
Cancel
Save