Skip to content

Commit

Permalink
Merge branch 'develop' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
flightlessmango committed Nov 28, 2020
2 parents 96bf797 + 03bd71d commit 18c2068
Show file tree
Hide file tree
Showing 60 changed files with 6,758 additions and 3,153 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ trim_trailing_whitespace = true
[src/overlay*{cpp,h}]
indent_size = 3

[src/{keybinds,vulkan}.{cpp,h}]
indent_size = 3

[src/mesa/**]
indent_size = 3

Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "modules/minhook"]
path = modules/minhook
url = https://github.com/flightlessmango/minhook
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ Parameters that are enabled by default have to be explicitly disabled. These (cu
| `font_file` | Change default font (set location to .TTF/.OTF file ) |
| `font_file_text` | Change text font. Otherwise `font_file` is used |
| `font_glyph_ranges` | Specify extra font glyph ranges, comma separated: `korean`, `chinese`, `chinese_simplified`, `japanese`, `cyrillic`, `thai`, `vietnamese`, `latin_ext_a`, `latin_ext_b`. If you experience crashes or text is just squares, reduce font size or glyph ranges. |
| `no_small_font` | Use primary font size for smaller text like units |
| `width=`<br>`height=` | Customizeable hud dimensions (in pixels) |
| `position=` | Location of the hud: `top-left` (default), `top-right`, `bottom-left`, `bottom-right`, `top-center` |
| `offset_x` `offset_y` | Hud position offsets |
Expand All @@ -158,21 +159,35 @@ Parameters that are enabled by default have to be explicitly disabled. These (cu
| `io_read`<br> `io_write` | Show non-cached IO read/write, in MiB/s |
| `pci_dev` | Select GPU device in multi-gpu setups |
| `version` | Shows current mangohud version |
| `fps_limit` | Limit the apps framerate |
| `fps_limit` | Limit the apps framerate. Comma-separated list of one or more FPS values. `0` means unlimited. |
| `toggle_fps_limit` | Cycle between FPS limits. Defaults to `Shift_L+F1`. |
| `arch` | Show if the application is 32 or 64 bit |
| `histogram` | Change fps graph to histogram |
| `cpu_text`<br>`gpu_text` | Override CPU and GPU text |
| `log_interval` | Change the default log interval, `100` is default |
| `vulkan_driver` | Displays used vulkan driver, radv/amdgpu-pro/amdvlk |
| `gpu_name` | Displays GPU name from pci.ids |
| `gpu_power` | Display GPU draw in watts |
| `cpu_power`<br>`gpu_power` | Display CPU/GPU draw in watts |
| `engine_version` | Display OpenGL or vulkan and vulkan-based render engine's version |
| `permit_upload` | Allow uploading of logs to Flightlessmango.com |
| `upload_log` | Change keybind for uploading log |
| `benchmark_percentiles` | Configure which framerate percentiles are shown in the logging summary. Default is `97+AVG+1+0.1` |
| `benchmark_percentiles` | Configure which framerate percentiles are shown in the logging summary. Default is `97,AVG,1,0.1` |
| `wine` | Shows current Wine or Proton version in use |
| `wine_color` | Change color of the wine/proton text |
| `cpu_mhz` | Shows the CPUs current MHz |
| `gpu_load_change` | Changes the color of the GPU load depending on load |
| `gpu_load_color` | Set the colors for the gpu load change low,medium and high. e.g `gpu_load_color=0000FF,00FFFF,FF00FF` |
| `gpu_load_value` | Set the values for medium and high load e.g `gpu_load_value=50,90` |
| `cpu_load_change` | Changes the color of the CPU load depending on load |
| `cpu_load_color` | Set the colors for the gpu load change low,medium and high. e.g `cpu_load_color=0000FF,00FFFF,FF00FF` |
| `cpu_load_value` | Set the values for medium and high load e.g `cpu_load_value=50,90` |
| `cellpadding_y` | Set the vertical cellpadding, default is `-0.085` |
| `frametime` | Display frametime next to fps text |
| `table_columns` | Set the number of table columns for ImGui, defaults to 3 |
| `blacklist` | Add a program to the blacklist. e.g `blacklist=vkcube,WatchDogs2.exe` |

Example: `MANGOHUD_CONFIG=cpu_temp,gpu_temp,position=top-right,height=500,font_size=32`
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.
## Vsync
Expand Down
28 changes: 26 additions & 2 deletions bin/MangoHud.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

################ PERFORMANCE #################

### Limit the application FPS
### Limit the application FPS. Comma-separated list of one or more FPS values (e.g. 0,30,60). 0 means unlimited (unless v-synced).
# fps_limit=

### VSYNC [0-3] 0 = adaptive; 1 = off; 2 = mailbox; 3 = on
Expand All @@ -16,10 +16,18 @@

################### VISUAL ###################

### Legacy Layout
legacy_layout

### Display the current CPU information
cpu_stats
# cpu_temp
# cpu_power
# cpu_text = "CPU"
# cpu_mhz
# cpu_load_change
# cpu_load_value
# cpu_load_color

### Display the current GPU information
gpu_stats
Expand All @@ -30,6 +38,13 @@ gpu_stats
# gpu_power
# gpu_text = "GPU"
# vulkan_driver
# gpu_load_change
# gpu_load_value
# gpu_load_color

### Display FPS and frametime
fps
frametime

### Display loaded MangoHud architecture
# arch
Expand All @@ -51,6 +66,7 @@ font_size=24
# font_scale=1.0
# font_size_text=24
# font_scale_media_player = 0.55
# no_small_font

### Change default font (set location to .TTF/.OTF file )
## Set font for the whole hud
Expand All @@ -73,6 +89,7 @@ position=top-left
### IO read and write for the app (not system)
# io_read
# io_write
# io_stats

### Display system ram / vram usage
# ram
Expand All @@ -91,6 +108,8 @@ position=top-left
### Hud dimensions
# width=
# height=
# table_columns=
# cellpadding_y=

### Hud transparency / alpha
background_alpha=0.5
Expand Down Expand Up @@ -118,16 +137,21 @@ background_alpha=0.5
### Set to 'domain:bus:slot.function'
# pci_dev = 0:0a:0.0

### Blacklist
#blacklist =

################## INTERACTION #################

### Change toggle keybinds for the hud & logging
#toggle_hud=Shift_R+F12
#toggle_fps_limit=Shift_L+F1
#toggle_logging=Shift_L+F2
#reload_cfg=Shift_L+F4
#upload_log=Shift_L+F3

################## LOG #################

### Automatically start the log after X seconds
# autostart_log = 1
### Set amount of time in second that the logging will run for
# log_duration
### Set location of the output files (Required for logging)
Expand Down
10 changes: 9 additions & 1 deletion bin/mangohud-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,19 @@ mangohud_install() {
install -vm755 ./usr/bin/mangohud /usr/bin/mangohud

# FIXME get the triplet somehow
mkdir -p /usr/lib/mangohud/tls
ln -sv ../lib /usr/lib/mangohud/tls/x86_64
ln -sv ../lib32 /usr/lib/mangohud/tls/i686
# Some distros search in $prefix/x86_64-linux-gnu/tls/x86_64 etc instead
ln -sv . /usr/lib/mangohud/lib/i686-linux-gnu
ln -sv . /usr/lib/mangohud/lib/x86_64-linux-gnu
# $LIB can be "lib/tls/x86_64"?
ln -sv ../tls /usr/lib/mangohud/lib/tls

ln -sv lib /usr/lib/mangohud/lib64
ln -sv lib /usr/lib/mangohud/x86_64
ln -sv lib /usr/lib/mangohud/x86_64-linux-gnu
ln -sv . /usr/lib/mangohud/lib/x86_64
ln -sv . /usr/lib/mangohud/lib/x86_64-linux-gnu
ln -sv lib32 /usr/lib/mangohud/i686
ln -sv lib32 /usr/lib/mangohud/i386-linux-gnu
ln -sv ../lib32 /usr/lib/mangohud/lib/i386-linux-gnu
Expand Down
6 changes: 3 additions & 3 deletions bin/mangohud.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh

if [ "$#" -eq 0 ]; then
programname=`basename "$0"`
Expand All @@ -13,10 +13,10 @@ if [ "$1" = "--dlsym" ]; then
shift
fi

MANGOHUD_LIB_NAME="libMangoHud.so"
MANGOHUD_LIB_NAME="@ld_libdir_mangohud_abs@libMangoHud.so"

if [ "$MANGOHUD_DLSYM" = "1" ]; then
MANGOHUD_LIB_NAME="libMangoHud_dlsym.so:${MANGOHUD_LIB_NAME}"
MANGOHUD_LIB_NAME="@ld_libdir_mangohud_abs@libMangoHud_dlsym.so:${MANGOHUD_LIB_NAME}"
fi

# Preload using the plain filesnames of the libs, the dynamic linker will
Expand Down
2 changes: 2 additions & 0 deletions build-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ NAME=MangoHud-$VERSION-Source

# create archive via git
git archive HEAD --format=tar --prefix=${NAME}/ --output=${NAME}.tar
# remove unused minihook from source tarball
tar -f ${NAME}.tar --delete ${NAME}/modules
# create DFSG compliant version which excludes NVML
cp ${NAME}.tar ${NAME}-DFSG.tar
tar -f ${NAME}-DFSG.tar --delete ${NAME}/include/nvml.h
Expand Down
Loading

0 comments on commit 18c2068

Please sign in to comment.