FlightlessMango
070fa1be84
presets: don't clear options when parsing
2 years ago
FlightlessMango
915a3babad
Add preset param and allow for preset config
2 years ago
FlightlessMango
a6715b1bf6
Hud elements: Put frame_timing inside a child window to prevent it messing with the parent layout
...
Co-authored-by: Alessandro <gort818@gmail.com>
2 years ago
sfrcorne
020e8485e2
small fix for average cpu_power 2
2 years ago
sfrcorne
2187b9ef19
small fix for average cpu_power
2 years ago
sfrcorne
a98a402619
Fix for AMD Ryzen 7000 CPU when using the iGPU.
2 years ago
sfrcorne
cd74b27da2
Cleanup cpu.cpp and and support for gpu_metrics_v2_3
2 years ago
Emil Velikov
1b3f8b29bc
meson: restrict most libMangoHud.so symbols
...
With the introduction of the static library, we forgot the version
script. As a result we were spilling all the internal symbols.
Fixes: d4aa74c
("Create static and shared libs separately")
Closes: https://github.com/flightlessmango/MangoHud/issues/933
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2 years ago
FlightlessMango
ce5e0683f0
Nearest filter param
2 years ago
FlightlessMango
4fb0bb328b
Bicubic filtering param
2 years ago
FlightlessMango
de29e057de
Trilinear filtering param
2 years ago
FlightlessMango
5fe07a0ac3
Anisotropic filtering param
2 years ago
FlightlessMango
9b9e6e7b68
Sampler hook and picmip param
2 years ago
Emil Velikov
80d394c0cd
meson: make libMangoHud.so append_libdir_mangohud aware
...
The library does not honour the correct install location. Seems like it
was broken for a while and I didn't catch it with my recent rework...
Since all the scripts flip the default "true" to "false" 🤦
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2 years ago
FlightlessMango
c037a0cca7
amdgpu: add gpu_metrics_v2_3
2 years ago
FlightlessMango
d59375b0c9
amdgpu: add support for gpu_metrics_v2_3
2 years ago
FlightlessMango
22d374cc13
steam deck: fix fan speed
2 years ago
Leopard1907
1f841ef1a6
blacklist: Add Amazon client
...
Amazon Games App client needs this.
2 years ago
jackun
313abbe6a7
[OpenGL] Check GL_VENDOR too to determine GPU's vendor id
...
Try to fix #965
2 years ago
jackun
1055bc0c6c
X11 keyboard poller thread
2 years ago
Hannes Mann
3cebc55a35
hud_elements: Show FPS limit method
2 years ago
Hannes Mann
e1f41bbb92
glx,egl,vulkan: Limit FPS early or late depending on config
2 years ago
Hannes Mann
f92c8b1b76
overlay_params: Add FPS limit method
2 years ago
Artem Polishchuk
d323752d0b
build: Fix building with GCC 13
2 years ago
Emil Velikov
5c86369758
meson: explicitly annotate version.h as dependency
...
Currently we list the custom_target (aka vcs_tag() as part of the
sources. Although since it's not an explicit dependency meson/ninja are
free to compile the C/C++ files, before the file is generated.
Closes: https://github.com/flightlessmango/MangoHud/issues/862
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2 years ago
Emil Velikov
f47f777e26
meson: unwrap ld_libdir_mangohud handling, remove ld_libdir_abs
...
Currently we have ld_libdir_abs which defaults to false. In that case,
both the mangohud shell wrapper, as well as the json files, reference
the DSOs directly without any path component.
This means that at run-time the dynamic linker, vulkan loader as well as
pressure-vessel will need to jump through hoops and figure out the
bitness of the DSO, whether one wants the 32 or 64bit one and even then
there will be confusing messages like:
fatal: /usr/lib/libMangoHud.so: wrong ELF class: ELFCLASS32
When set to true, as seen in the in-tree build.sh we'll append empty
path to LD_LIBRARY_PATH (bad), the full path with the $LIB token will be
used with LD_PRELOAD (good) and json files (bad).
Since we are generating separate json files, we can use the actual path
(while $LIB currently works, it's not really strict json nor documented
as supported). We can also drop the dubious LD_LIBRARY_PATH manipulation
This basically reinstates the prepend_libdir_vk=true option that was
dropped earlier.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2 years ago
Emil Velikov
dd374d4c9e
meson: remove prepend_libdir_vk option
...
The option is always true for all distributions that build Mangohud.
While only the in-tree PKGBUILD disables it for undocumented reasons.
In practise the option will be enabled across the board - in different
manner, with latter commit. But for now, just remove it.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2 years ago
Emil Velikov
491510d41c
meson: produce per cpu_family json files
...
This will allow us to remove the $LIB from the json files and simplify
the related lib handling.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2 years ago
Emil Velikov
5d53d0dcc3
meson: inline PROJECT_NAME in mangohud.json.in
...
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2 years ago
Emil Velikov
def59db953
meson: remove ld_libdir_prefix option
...
The option defaults to false in-tree and across all distributions. The
only alleged use-case is the build.sh/build-srt.sh scripts. Although the
output of those scripts is absolutely identical with or w/o the flag.
Remove it.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2 years ago
FlightlessMango
06b46fd5d7
Fix building with mingw
2 years ago
FlightlessMango
c64ff84007
horizontal/compact layout fixes + battery_watt/battery_time params
2 years ago
FlightlessMango
47f822f19c
mangohudctl: reload_config variable in msg sctruct
2 years ago
Emil Velikov
08c26d595f
meson: do not pick system vulkan, when explicitly disabled
...
For this to actually work, we also need to set dep_vulkan for all users.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2 years ago
Emil Velikov
047bc2e7f7
tests: make it work aka hide HUDElements
...
Currently the test is pulling an external reference to HUDElements,
which is unresolved so the test fails to link.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2 years ago
FlightlessMango
d84c85609a
overlay: position: bottom center
2 years ago
FlightlessMango
175493c89c
horizontal: default to max width
2 years ago
FlightlessMango
8cf92ff8a6
overlay: horizontal_separator func
2 years ago
Alessandro Toia
3e136db6a8
gamepad: Change DS5 to DS4/5 as DS4 was added to hid_playstation in kernel 6.2
2 years ago
FlightlessMango
d0f8c8aa94
mangoapp: control: rerload_config option
2 years ago
Emil Velikov
221d335006
meson: remove mangoapp_32bit option
...
Was introduced as a means to shorten the build cycles. With the static
lib helper it should no longer be needed.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2 years ago
Emil Velikov
eecd451068
meson: build with -Werror=missing-declarations
...
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2 years ago
Emil Velikov
eecf901aed
hud_elements: remove unused LinearToSRGB
...
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2 years ago
Emil Velikov
f1a86fe10f
inject: drop unneeded declarations/function
...
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2 years ago
Emil Velikov
581b6b3375
meson: move util_files next to its user
...
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2 years ago
Emil Velikov
270beefdf3
meson: drop no_override_init_args
...
No longer needed
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2 years ago
Emil Velikov
ef169bd28b
meson: remove unused MANGOAPP_LAYER define
...
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2 years ago
Emil Velikov
b714f54cd4
dbus: reshuffle HAVE_DBUS handling
...
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2 years ago
Emil Velikov
535c1f0a83
mangoapp: reshuffle ifdef MANGOAPP guards
...
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2 years ago
Emil Velikov
da219457e5
mangoapp: control.cpp -> control.c
...
There's nothing C++ in there, so rename the file appropriately.
While in there, use C99 initializers, annotate static functions as
such and pull the implicit stdbool.h.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2 years ago
Emil Velikov
8e1c389f22
mangoapp: split proto details into separate header
...
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2 years ago
Emil Velikov
8a1c56ba25
meson: remove broken -Dwith_dlsym
...
The option does not even build, so let's remove it.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2 years ago
Alessandro Toia
7b255a8cbd
blacklist: Add RSI Launcher.exe
2 years ago
FlightlessMango
3190778086
Don't update metrics if we're not logging and not displaying
2 years ago
FlightlessMango
475026a183
amdgpu: move defines to header
2 years ago
Alessandro Toia
87cc5c62fa
vulkan: Remove unused VkPhysicalDeviceFeatures
2 years ago
Alessandro Toia
5d1877c2a3
Remove extraneous break
2 years ago
Kenton Groombridge
ffa7048543
vulkan: fix implicit instantiation of 'std::basic_stringstream<char>'
...
Add a missing include to fix the following build error seen with clang
15.0.7:
../MangoHud-0.6.8/src/vulkan.cpp:1523:22: error: implicit instantiation of undefined template 'std::basic_stringstream<char>'
std::stringstream ss;
^
/usr/include/c++/v1/iosfwd:146:32: note: template is declared here
class _LIBCPP_TEMPLATE_VIS basic_stringstream;
2 years ago
FlightlessMango
8450291777
vulkan: Do not modify pCreateInfo in CreateDevice
2 years ago
FlightlessMango
302ceaa3e6
logging: flush after each write
2 years ago
FlightlessMango
25b170d480
logging: change frametime to float
2 years ago
FlightlessMango
d6c7b3c101
logging: write to file while logging
2 years ago
FlightlessMango
f883e2cba1
set log_interval to 0 by default
2 years ago
azn1999
f7a1cc159c
Fix FPS limiter
...
Note: the egl limiter is already correct
2 years ago
Alessandro Toia
f6d980696d
Fix not finding wine binary, with 64bit only wine
2 years ago
Alessandro Toia
f76527d14f
Revert "Fix reporting temp of AMD zen4 CPUs"
...
This reverts commit edac405d57
.
Didn't actually fix the issue oops
2 years ago
FlightlessMango
0ae106dba5
hud_elements: remove extra '}'
2 years ago
Echo J
ba7e2cb313
Logging: Switch to a different sleep function
...
This fixes a freeze with zink when automatic logging is enabled
I didn't test this on Windows, so please report any issues there
2 years ago
FlightlessMango
7c54ea819c
params: exec_name: don't show unless enabled
2 years ago
FlightlessMango
99c72d30cf
check for mangoapp_layer option for manifest
2 years ago
FlightlessMango
abb5359cdd
Blacklist: add gamescope
...
Co-authored-by: Valters <valters.tomsons@protonmail.com>
2 years ago
Alessandro Toia
f7c3ec2072
Add redlauncher(CDPR) to blacklist
2 years ago
Alessandro Toia
edac405d57
Fix reporting temp of AMD zen4 CPUs, zen4 doesn't use Tdie, use Tctl instead
2 years ago
Bitwolf
a67ba60773
Blacklist GOG Galaxy 2.0
...
FPS counter appears in the client, it probably shouldn't.
2 years ago
FlightlessMango
d4aa74c149
Create static and shared libs separately
2 years ago
FlightlessMango
6f23cdeaf1
mangoapp: meson option to install lib32
2 years ago
FlightlessMango
03d64e5afb
params: exec_name
2 years ago
Alessandro Toia
b2bcd889f0
Skip OpenGL impl if vulkan is loaded togther with zink or wined3d.
2 years ago
FlightlessMango
e3995ffcbf
mangoapp: compile using static mangohud_library
2 years ago
Alessandro Toia
7b248efef7
Check if libvulkan is loaded when opengl is also loaded and skip opengl rendering
...
Fixes #866 #852 issues with zink and multiple games using DXVK that load OpenGL for some reason
2 years ago
Alessandro Toia
b61f83f522
Add lib_loaded function to check for current loaded libraries
2 years ago
Kurt Kartaltepe
1a3fa6e4ff
overlay: Fixup device detection on intel GPUs
...
This resolves missing GPU names due to deviceID only being computed for
AMD gpus. It also filters out display adapters so there is less noise in
the logs when scanning cards.
2 years ago
FlightlessMango
7dee12a75a
params: toggle_hud_position
2 years ago
FlightlessMango
61596104ce
params: hud_compact default off
2 years ago
Alessandro Toia
5bf4091cdf
Add window padding if hud_compact = 0
2 years ago
FlightlessMango
ddbb4f5be1
intel: use json for parsing intel_gpu_top output
2 years ago
FlightlessMango
f8ca49f627
allow for compact hud layout
2 years ago
FlightlessMango
e38413b2d8
use intel_gpu_top for gpu stats
2 years ago
Zebediah Figura
2f01d15690
Bind a zero pixel unpack buffer if necessary when uploading fonts texture
2 years ago
FlightlessMango
e6c5ff4a4b
overlay.cpp: fixed renamed check metrics function
2 years ago
FlightlessMango
cb7d2a2447
amdgpu tests
2 years ago
Gustavo Parreira
96f72e2352
fix: Look for NAVI in device name for AMD GPUs
2 years ago
Vir Chaudhury
c670203a5b
add logging for when the OpenGL context fails to initialize
2 years ago
Stephan Lachnit
b8b6d61b25
Build mangoapp and mangohudctl for any CPU architecture
...
On 32-bit-only machines, building these for the 32-bit architecture makes sense.
Signed-off-by: Simon McVittie <smcv@debian.org>
2 years ago
Deis Dupeyron
b46908bdbc
src/battery.cpp: fix getTimeRemaining for energy_now
2 years ago
FlightlessMango
ebb0f969de
params: don't enable hud_no_margin and log_versioning with full
2 years ago
FlightlessMango
a76e8a26f5
hud elements: battery: adjust remaining time for normal and horizontal view
2 years ago
FlightlessMango
57c4e4e6c2
increase width based on table_columns
2 years ago
FlightlessMango
bc89947df0
hud_elements: battery: don't show plug or watt in horizontal
2 years ago
FlightlessMango
4f49ffea7b
frame_timing: minor adjustments for horizontal and mangoapp
2 years ago
FlightlessMango
3949c6c87f
amdgpu: change cpu/gpu temps from max to avg
2 years ago
MasterDevX
99f0e4139c
Add support for it8603 sensor
2 years ago
FlightlessMango
d0a1c4ea07
horizontal view and hud_no_margin
2 years ago
jackun
dcabe6b33f
Explicitly include array
2 years ago
jackun
021df9b932
`env -u` doesn't affect "piped" commands, use `unset` instead
2 years ago
jackun
a05dd84bf5
Don't use unsetenv in `exec`
...
Hopefully fixes #809
2 years ago
Alessandro Toia
08431a0221
Fix reporting amdgpu clock speed
2 years ago
FlightlessMango
5f43fcd121
logger: control: use hudelements
2 years ago
FlightlessMango
e9a7865a90
logger: reinit on config reload
2 years ago
tisim
732439b8e6
changing Logger class from struct pointer to 3 variables
...
removing commented line of code
2 years ago
jackun
85007fe0bd
Use separate font atlas for vulkan
...
vkCreateSwapchainKHR and vkQueuePresentKHR may share the same ImGui context accidentally and
vkCreateSwapchainKHR might (re)create font image and destroy old font atlas while vkQueuePresentKHR is still rendering :(
2 years ago
FlightlessMango
14dcd153ae
control: send msg when log stops
2 years ago
FlightlessMango
ef4ace2e2a
logging: versioning
2 years ago
Alessandro Toia
52c24afae9
Don't check for conf file if blacklisted
2 years ago
jackun
05133ae3cd
When `pci_dev` is set, don't skip AMD gpu if device id doesn't match
2 years ago
jackun
e132bb9268
Lower api minor version
...
Apparently too new of a version implicit layer might also not get loaded
2 years ago
jackun
e5d52c202e
Add meson install_tags, bump meson to 0.60
2 years ago
jackun
50720d2215
Install data files only if `include_doc` option is set
2 years ago
Stephan Lachnit
5709832576
Install MangoApp layer into libdir_mangohud
...
This makes the installation path adapt correctly to the value of
the append_libdir_mangohud option, which defaults to putting it in a
subdirectory ${libdir}/mangohud. Without this, the path in the JSON
manifest (which does respect append_libdir_mangohud) is inconsistent
with the actual location of the library.
Resolves: https://github.com/flightlessmango/MangoHud/issues/795
Co-authored-by: Simon McVittie <smcv@collabora.com>
2 years ago
jackun
c6bc257e11
Remove unnecessary row/column changes in HudElements::gpu_stats
...
Somehow missed these. Fixes f78107e6
2 years ago
jackun
032abbb031
Fix mangoapp frame time alignment
2 years ago
jackun
61716494c1
Check if data logger is valid
2 years ago
jackun
acfc62a434
Check if ImGui::BeginTable actually begun
2 years ago
FlightlessMango
421ca3b57b
mangoapp: don't resize window if fps_only
2 years ago
Trigg
dfad000928
- Unsaved change from XA_ATOM to XA_CARDINAL
2 years ago
trigg
661cb205e4
Add and remove XAtom in gamescope mode
2 years ago
FlightlessMango
17f3ebb7bd
mangoapp: unused previous_pid variable
2 years ago
FlightlessMango
4eb6c83d81
mangoapp: disable checking vulkan layer for now
2 years ago
Alessandro Toia
32cd485568
Remove uppercase MANGOHUD_LOG_LEVEL strings
2 years ago
Alessandro Toia
f0c3d123f5
Simplify MANGOHUD_LOG_LEVEL TO SPDLOG_LEVEL
2 years ago
Alessandro Toia
6e2e1d3967
Add check for valid log_level when using MANGOHUD_LOG_LEVEL
2 years ago
Alessandro Toia
c27de42465
use MANGOHUD_LOG_LEVEL env var to control SPDLOG_LEVEL
2 years ago
Alessandro Toia
5b44ef7d07
Convert printf to spdlog
2 years ago
Alessandro Toia
bab3529c74
If fps_only is enabled then disable legacy_layout
2 years ago
Alessandro Toia
ce53794d5f
Blacklist: add StarCitizen_Launcher.exe and InsurgencyEAC.exe
2 years ago
jackun
0916dadea6
Convert some "printfs" to spdlog
2 years ago
Alessandro Toia
22abf62b76
Disable fcat when full is present in conf file
2 years ago
Alessandro Toia
3f15f2322f
Disable fcat when using MANGOHUD_CONFIG=full
2 years ago
jackun
27c9863119
Set initial client socket handle to "invalid" value
2 years ago
Alessandro Toia
b699b16d2a
gamepad: disable gamepad_battery_icon by default
2 years ago
jackun
a8a0a245e6
Bump layer api version
2 years ago
jackun
c19d37ab76
Temporary perma fix for vkQueueSubmit blocking on "used" semaphore when multiple swapchains are sent to vkQueuePresentKHR
2 years ago
jackun
f680c28f1f
Generalize control over socket so it works with OpenGL too
2 years ago
PMunkes
6a010d8eab
Introduce FCAT overlay support
...
This introduces support to overlay FCAT markers on top of other HUD elements.
For more information about nVidia's FCAT tool see: https://nvidia.com/en-us/geforce/technologies/fcat/technology
This patch includes support for the existing parameter infrastructure and it is fully dynamic.
Squashed commit:
Refactor FCAT to use existing parameter handling infrastructure
With this patch the FCAT overlay should be hooked up into the normal
parameter handling infrastructure. This includes support for
configuration file options, which are also part of this commit.
2 years ago
FlightlessMango
f81369bd68
amdgpu: average gfx and cpu power as float
2 years ago
FlightlessMango
3184a44b96
Remove update_hw_info thread from log keybind
2 years ago
Alessandro Toia
a18cabb152
Move gamepad_update to update_hw_info
2 years ago
jackun
39ba57daa1
s/is/are/g
2 years ago
jackun
8a628e6a77
Rename GL files to avoid some confusion with upstream Dear ImGui files
2 years ago
jackun
3e6b35560c
Use overlay_new/end_frame with mangoapp
2 years ago
FlightlessMango
1447778fd4
amdgpu: improve polling perf by reading with c
...
Co-authored-by: Martin Roukala <martin.roukala@mupuf.org>
2 years ago
FlightlessMango
10e17b3153
Use Hudelements params in logging
2 years ago
jackun
b404fb948e
Set width by `table_columns` if not specified. Set "text" values to next column with `no_small_text`
2 years ago
jackun
753dd96325
Use overlay_new/end_frame to push/pop custom ImGui styles
2 years ago
jackun
f78107e662
Wrap columns to new row depending on `table_columns` param
2 years ago
jackun
85db56b36b
[dbus] Skip rendering MPRIS info if locking fails
...
D-Bus code gets randomly stuck for some reason.
2 years ago
jackun
f4cbb8b14b
When available (i.e. using vulkan), check vendor/device id and skip device if no match
2 years ago
jackun
ac7c898ba7
Use uint32_t for device id etc
2 years ago
jackun
d73932ad17
Clean up getAmdGpuInfo_actual
2 years ago
Alessandro Toia
9eb8447e14
Check if param gamepad_battery is enabled
2 years ago
FlightlessMango
3e57824f00
Fix zink detection from opengl path
2 years ago
FlightlessMango
5167e72649
gpu_metrics: send v1_0 to sysfs instead
2 years ago
jackun
bd2f7b24b8
Snapshot some paths so moving stuff around doesn't randomly break things
2 years ago
FlightlessMango
17d4c1dd4a
amdgpu: use gtt_used for APUs
2 years ago
FlightlessMango
19fbd9bf9b
Nvidia: only do throttling checks if enabled
2 years ago
FlightlessMango
5d6ebe2f38
Logging: use same data for benchmark and summary
2 years ago
FlightlessMango
6119fa80d1
mangoapp: layer: remove unused get_device_chain_info func
2 years ago
FlightlessMango
b30302c889
amdgpu: prefer hwmon over gpu_metrics for gpu temp
...
Co-authored-by: Martin Roukala <martin.roukala@mupuf.org>
2 years ago
FlightlessMango
bcf16a0def
amdgpu: fixed incorrect gpu load for centipercent
...
Co-authored-by: Martin Roukala <martin.roukala@mupuf.org>
2 years ago
jackun
f0177703ea
Rename to `frame_count` for consistency
2 years ago
FlightlessMango
ec5952d834
amdgpu: changed clocks to average
2 years ago
FlightlessMango
8b7a1995a9
amdgpu: fix cpu temp and watt
2 years ago
FlightlessMango
f9cfdeb080
Add gpu throttling status
...
Co-authored-by: Martin Roukala <martin.roukala@mupuf.org>
2 years ago
FlightlessMango
ae85730448
Improve amdgpu polling
...
Co-authored-by: Martin Roukala <martin.roukala@mupuf.org>
2 years ago
FlightlessMango
350dca5d21
Dynamic width when fps_only
2 years ago
jackun
e4b23c937e
Deal with disappearing cpus
...
Reinit if cpu is brought offline/online, e.g. `echo 0 > /sys/devices/system/cpu/cpu1/online`
Fix #737
2 years ago
FlightlessMango
5349226fa5
amdgpu: average load over .5s
2 years ago
Alessandro Toia
06e3e9f663
Remove frametime when using fps_only param
2 years ago
FlightlessMango
4f9d870c72
fan: add some checks
3 years ago
FlightlessMango
66876b79f5
fix typo in fan element
3 years ago
FlightlessMango
65e70c9cfb
fan param
3 years ago
jackun
425b98ae9a
[dbus] Fix trying to deinit non-active service(s)
...
Also, don't log with spdlog. It's already dead by then probably.
3 years ago
jackun
1f90b0b2aa
Revert "overlay: remove HUDElements.params setter"
...
This reverts commit 14ddc9563f
.
HUDElements.params gets stale. Needs a proper fix though.
3 years ago
jackun
3ee1048acf
Check if amdgpu gpu_metrics can be read and do some sanity-checks
3 years ago
Emil Velikov
e50a969586
hud_elements: one assignment per line
...
Stay consistent with the rest of the project.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
14ddc9563f
overlay: remove HUDElements.params setter
...
HUDElements.params is already set in the parse_overlay_config() call
before we even get here.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
1dfb14da47
overlay_params: make parse_overlay_env() static
...
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
6f85e388e5
overlay_params: mutate log_interval just after parsing
...
Currently we mutate the log_interval (if mangoapp is built), within the
logger itself. Move that to parse_overlay_config() where the actual
value is being parsed/set.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
2b7db32f54
Const annotate overlay_params& across the board
...
Most of the API does not modify it, so annotate it as const.
This makes it earlier to reason what's happening.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
f8e9ecb9fe
overlay: remove unused calculate_benchmark_data() declaration
...
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
9639377694
overlay: annotate render_benchmark() as static
...
Function is used solely within the compilation unit.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
5a53ad010f
overlay: position_layer() takes an immutable window_size
...
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
1e840f286b
mangohud: initialize the window_size
...
This one seems janky - other frontends (glx/egl LD_PRELOAD, Vulkan)
init their own global window_size.
Although in reality we use the initial data solely to set the imgui
"window" position and we immediatelly overwrite it, with the follow-up
call render_imgui().
Odds are this won't fix the glitchy (re)sizes but it's a step in the
right direction.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
74e83c0bba
mangoapp: iconify/restore the window, don't destroy it
...
Currently we're destroying the window, from under the glfw's framework
feet.
Basically we do a use-after-free, as glfwWindowShouldClose() is called
and due to some miracle we don't crash out.
Since we suspend all rendering, there's no need to actually destroy the
window - just iconify/restore it. A simple show/hide was attempted but
empirically did not work.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
40a1758518
mangoapp: reuse shutdown() helper
...
Use the helper across the board, instead of open-coding it.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
fc7a426d67
mangoapp: explicitly handle 0 over the protocol
...
Receiving 0 indicates no-op/keep as-is. Add a trivial self-describing
two-liner.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
f2b991cccd
mangoapp: make internal function static
...
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
8482ca00fa
mangoapp: make mangoapp_paused, msgid static
...
Both variables are used within the app alone - make them static to that
unit.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
403b0f2154
mangoapp: remove unused ctrl_msgid
...
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
5400332d5a
mangoapp: whitespace fixes
...
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
5e53342f6c
mangohudctl: rework argv handling, always send valid data
...
Currently, if the user sets attribute we send dummy data to mangohud.
Avoid that by pulling the attrib handling into main and avoiding the
duplicate attribute name checking.
Kill off the no-longer relevant TODO while we're here.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
jackun
f4ea65429e
No frame time for first frame
...
We don't know when it started to render, so...
3 years ago
jackun
a13b041d1d
Fps limit: simplify converting frame time back to fps
3 years ago
jackun
d2d6787568
Cleanup some header inclusions
3 years ago
jackun
45113bb7d2
Specify `fileChanged` argument type
3 years ago
jackun
73da29d4ad
Try to init spdlog a bit earlier
3 years ago
jackun
2f5efc320a
Move FpsLimiter to overlay.cpp
3 years ago
jackun
a26e6325cc
[dbus] Use GameMode portal inside flatpak
3 years ago
jackun
bac50e42d5
Add frame count
3 years ago
FlightlessMango
3f92e10c14
mangoapp: fix broken fsr sharpness
3 years ago
FlightlessMango
e6adae8489
mangoapp: fixing some warnings
3 years ago
FlightlessMango
284ae0da2c
mangoapp: layer: remove unused functions
3 years ago
FlightlessMango
4341843117
nlohmann_json wrap
3 years ago
FlightlessMango
7df8918c42
mangoapp: layer: append libdir to json
3 years ago
jackun
11142b5b2c
Merge pull request #703 from evelikov/misc-mixes
...
Remove libdrm_amdgpu and other unnecessary code
3 years ago
FlightlessMango
d4064bf6b7
mangoapp: layer: remove unused stuff
3 years ago
FlightlessMango
b064f47d66
mangoapp: vulkan layer
3 years ago
FlightlessMango
5b1bda770a
mangoapp: remove debug stuff
3 years ago
FlightlessMango
1940a83566
mangoapp: don't assume APU for temps
3 years ago
Emil Velikov
816d9f6b98
overlay: rework misleading gpu_busy_percent check
...
Above all, we really don't need the gpu_busy_percent node, if the GPU
exposes a gpu_metrics node,
Although looking closer, the gpu_busy_percent check is meant for
something else - to distinguish between the card node (cardX) and the
card output node (cardX-output-foo).
To top it all up, the check at the very end implies that we can get a
case where gpu_metrics and gpu_busy_perfect is missing ... that's not
possible.
So instead, drop the early gpu_busy_perfect check and properly mandate
it later on.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
9c6de0271f
overlay: completely remove force_amdgpu_hwmon option
...
No longer applicable, since the libdrm path is gone and hwmon is
required - either partially or in full.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
17bfd6ed08
Skip the standalone nodes, when gpu_metrics is present
...
Currently we open the standalone busy, temp, gpu/memory clock and
power_usage nodes, even if gpu_metrics is present.
At the same time, we correctly ignore them when doing the read-only.
So just avoid opening them all together.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
5143229bd1
Fix gpu_stats logic check
...
Currently we can get the load and temp stats either from the standalone
nodes or from the gpu_metrics (binary) sysfs node.
Fix the next to handle that.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
a7e8ae9417
Remove dummy vendorID overwrite in init_gpu_stats()
...
We have already enforced that a few lines above just after parsing the
vendor node.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
2aa49caf52
Remove find_folder() API
...
Can be trivially replaced with ls()
v2: Move break where it's supposed to.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
d75b4d972b
Remove unused LS_FLAGS::LS_ALL
...
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
ffb9b592f5
Use a switch in ls() d_type handling
...
Makes the code much easier to read.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
ab684a2f24
List regular files with ls(.. LS_FILES)
...
Currently it can give you a regular file, block/char device, fifo or a
socket.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
68ce8f81cc
Remove libdrm_amdgpu metrics
...
There are two alternatives - hwmon entries and gpu_metrics sysfs file.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
abbe5233ee
Remove unused X11/drm auth code
...
The code was added back in 2020 and seemingly never built. Just drop it
- if needed it can be git reverted at some point.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
7ad24b4c0a
Simplify cpu/mem/os/glxinfo parsing
...
Currently we pipeline a bunch of commands alike cat | grep | sed, there
we can do all that job with a single sed invocation - use that.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
83ce3ace2d
keybinds: move ifdef spaghetti into the header
...
Drop the ifdef and simplify the .cpp file.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
FlightlessMango
8b801e8435
don't set hide_fsr_sharpness with full
3 years ago
FlightlessMango
0402fa4ab5
mangoapp: fsr_steam_sharpness
3 years ago
FlightlessMango
5c984e7b80
mangoapp: fsr_steam_sharpness
3 years ago
FlightlessMango
b1fdbc3a5b
Disable gamemode dbus for now
3 years ago
jackun
822bb66629
Fix confusing vendorID with deviceID
...
OpenGL still needs some work to select the actual render device >:(
3 years ago
jackun
8e21b52acf
Make `get_device_name` return GPU name
3 years ago
jackun
c88ef84bf5
Revert "Get device name before system info"
...
This reverts commit e7de7b5b93
.
3 years ago
jackun
8af07b4945
Move `logging()` to Logger struct
...
Stopgap to use same m_params while waiting for proper multithreading-safe overlay_params fix.
3 years ago
Emil Velikov
42de1edc22
Rework cpu freq node handling
...
Similar to the prior commit - fscanf directly into the required data
type.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
597f78cbee
Fixup device/vendor node handling
...
Currently we readout the data as string only to convert it to hex. In
the error case, we leak the fd for the given nodes.
Read the data as hex directly, error out if that fails and avoid the
leaks.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
e3de89e475
Couple of whitespace fixes
...
Automatically picked by my editor, while fixing the warnings with prior
commits.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
c5748a3154
Reorder Logger() constructor args
...
Currently the order varies across the struct and constructor. As a nice
reminder GCC will throw a lovely warning at us. Fix the ordering.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
30cfe839eb
Address signed comparisons warnings
...
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
8ac81477d9
Remove unused parseConfigFile() return type
...
Was briefly introduced a while ago and the only user was been dropped
since then.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
dc53cbf0f0
Remove unused-but-set variables
...
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
FlightlessMango
3f2db318c5
Some fixes for windows compiling
3 years ago
FlightlessMango
ae7c5f0f24
Fix hud benchmark
3 years ago
Alessandro Toia
9b668babdc
gamepad: add bool is_charging
3 years ago
Alessandro Toia
6db23968ee
gamepad: fix 8Bitdo counter
3 years ago
Alessandro Toia
74b328d209
gamepad: add option to disable icon and show capacity instead
3 years ago
Alessandro Toia
5c92c32491
add gamepad_battery to legacy elements
3 years ago
Alessandro Toia
7d90ef8169
GAMEPAD: add 8Bitdo support
3 years ago
Alessandro Toia
a484f32e57
GAMEPAD: remove unsed variables
3 years ago
Alessandro Toia
a8ab4e2991
GAMEPAD: remove unused param and change xone to xbox
3 years ago
Alessandro Toia
4be3ba20c2
GAMEPAD: add battery reporting for gamepad devices
...
(xone,xpadneo,ds4,ds5,switch)
3 years ago
jackun
a029dfaaf2
Don't hide gpu_metrics behind HAVE_LIBDRM_AMDGPU
3 years ago
FlightlessMango
93f389dd62
clean up frametime_data
3 years ago
FlightlessMango
3a667ab66b
Revert FPS calc
3 years ago
FlightlessMango
cf8ba8fd63
mangoapp: clean up msg_size
3 years ago
FlightlessMango
d82738b03c
mangoapp: use GAMESCOPE_FOCUSED_APP_GFX instead
3 years ago
FlightlessMango
68f40c56cc
only shrink frametime graph on mangoapp
3 years ago
jackun
e555a942fb
Use single IO stats instance
3 years ago
FlightlessMango
e12042ca3d
mangoapp: adjust for changed msg size in gamescope
3 years ago
FlightlessMango
fa133940c8
Fix min/max frametime
3 years ago
Alessandro Toia
fb97530965
cpu: Fix not reporting amd cpu power
3 years ago
FlightlessMango
e289a55c6f
mangoapp: make sure steam_focused is false when mangoapp_steam
3 years ago
FlightlessMango
316914da8d
mangoapp: fixed mangoapp not respecting no_display
3 years ago
FlightlessMango
5cdedc4671
mangoapp: gamescope debug graphs
3 years ago
jackun
4608fa5e3a
vkGetInstanceProcAddr(instance, "vkGetInstanceProcAddr") should return our vkGetInstanceProcAddr not the next in the chain.
3 years ago
FlightlessMango
7740e8430f
mangoapp: clean up unused variable
3 years ago
FlightlessMango
44a335a809
mangoapp: mangoapp_steam bool
3 years ago
FlightlessMango
6521eaa82d
mangoapp: hide hud by default
3 years ago
Alessandro Toia
056f7b0e29
Check if battery status is full
3 years ago
FlightlessMango
17867f2a6d
Battery: show remaining if > 1.f
3 years ago
FlightlessMango
b11714a326
mangoapp: hide fsr sharp when off
3 years ago
FlightlessMango
339f5c0d11
mangoapp: hide when steam is focused
3 years ago
FlightlessMango
cdcd08be44
battery remaining: don't show seconds at least by default
3 years ago
FlightlessMango
5508933c47
mangoapp: make fsr display a little prettier
3 years ago
Alessandro Toia
590f52d223
When battery is plugged in show plug icon
3 years ago
FlightlessMango
30ee0b770d
Don't use all sysfs files if metrics_path
3 years ago
FlightlessMango
c708b1a8a8
disable deviceid check for now
3 years ago
FlightlessMango
4556caf6d3
mangoapp: remove some debug
3 years ago
FlightlessMango
b598d22543
mangoapp: don't write imgui.ini
3 years ago
Alessandro Toia
b158888d54
Add remaining time text to battery
3 years ago
FlightlessMango
61fb9267a0
mangoapp: don't use fsr if msg doesn't contain fsr
3 years ago
FlightlessMango
39f6ae98ec
Battery remaining time
3 years ago
FlightlessMango
a9f811a207
mangoapp: gamescope fsr
3 years ago
FlightlessMango
8ddbcc3803
don't average log fps
3 years ago
FlightlessMango
d71dd74685
Fix amdgpu watt and make it more granular
3 years ago
flightlessmango
a76f2a9677
Merge pull request #684 from Joshua-Ashton/no_display_default_mapp
...
Enable no_overlay by default with mangoapp
3 years ago
FlightlessMango
5373140341
Don't enable battery_icon with full
3 years ago
FlightlessMango
d72099d1e7
Fixed issue with amdgpu metrics for APU
3 years ago
Joshua Ashton
beecde110b
Enable no_overlay by default with mangoapp
...
Don't want this displaying unless explicitly requested.
3 years ago
FlightlessMango
986f3cc1b3
gpu_metrics: apu: set cpu temp as highest core temp
3 years ago
FlightlessMango
6983c2ec39
Use gpu_metrics instead of libdrm when available
3 years ago
jackun
eefce24024
Log an error if `nvmlDeviceGetUtilizationRates` failed
3 years ago
Joshua Ashton
8bc979b53c
mangoapp: Fix janky window size transitions
...
GL apps that use non-normalized coordinates for stuff that will probably do stuff like this a lot in ways that make it hard to precompute the values beforehand make me very upset.
3 years ago
Joshua Ashton
b99817fd2b
mangoapp: Don't redraw if we don't have new frames
3 years ago