Commit Graph

991 Commits

Author SHA1 Message Date
jackun
ae410f01e7
Re-init cpu stats if core count changes; fix off-by one error
Helps with #438
2021-01-30 15:50:02 +02:00
jackun
6ad9791ceb
Deduplicate code for find_*_input functions 2021-01-30 14:52:07 +02:00
jackun
0fbbf00fe2
[OpenGL] Load libEGL.so.1 and use eglGetProcAddress to get EGL procs 2021-01-26 10:26:44 +02:00
jackun
18650c3c70
Add --dlsym 2021-01-22 08:47:07 +02:00
flightlessmango
2fe9808f69
Merge pull request #433 from baryluk/programname
Improve code for program name extraction
2021-01-20 09:58:10 +01:00
flightlessmango
d183a4589d
Merge pull request #460 from baryluk/patch-3
Disable lsof warnings explicitly
2021-01-13 21:00:40 +01:00
Witold Baryluk
25f7201770
Disable lsof warnings explicitly
On most system lsof is compiled with warnings enabled.

This causes spam multiple times per one mangohud invocation (up to about 10 times even), like this:

```
lsof: WARNING: can't stat() tracefs file system /sys/kernel/debug/tracing
      Output information may be incomplete.
```

Disable warnings explicitly.
2021-01-13 19:17:34 +00:00
flightlessmango
8aa299630c Disable by default some vulkan layers that cause issues 2021-01-11 12:27:52 +01:00
jackun
19ef4f3df0
[dbus] re-init active player so media_player_name changes take effect
Might be good to check if player name actually changed though.
2021-01-10 00:33:44 +02:00
Witold Baryluk
c92f805c2d Prevent infinite recursion when using Mesa zink.
When using zink (`MESA_LOADER_DRIVER_OVERRIDE=zink`),
running any app (OpenGL or Vulkan), will trigger running
`glxinfo`. Unsetting of `LD_PRELOAD` is not sufficient,
because if using `zink`, it will load Vulkan, and load Vulkan
implicit layer for Mangohud, using `/usr/share/vulkan/implicit_layer.d/MangoHud.json`,
which will cause it to reenter this function in another process,
causing infinite recursion (until the Vulkan driver finally errors
out with too many VkDevices  / contexts created).
I have easily have seen recursion depths of 200+ until this happen,
and sometimes takes up to 2 minutes, with 2000 extra shell and `cut`
processes in the process tree.

Fix this by marking recursion entrance.

This makes glxmark start in less than 1 second, instead
about 60 seconds.

When at it us `glxinfo -B`, which is significantly faster
on zink, yet provides all information we need.
2021-01-08 12:09:48 +02:00
flightlessmango
185941a857 Fix some warnings 2021-01-07 13:54:49 +01:00
flightlessmango
fc8eeaf0dc Lingering TableNextCell 2021-01-07 13:29:49 +01:00
flightlessmango
e57be394d7
Merge pull request #428 from flgx16/swap
Add swap
2021-01-05 23:40:43 +01:00
jackun
4862d83b60
Make add_blacklist const&
Might be optimized by compiler already but who knows.
2020-12-26 22:55:39 +02:00
jackun
72f1ec094c
Don't continue parsing configs if process is blacklisted 2020-12-26 22:36:30 +02:00
FlightlessMango
90ce1c5778 ImGui wrap 2020-12-18 16:14:05 +01:00
FlightlessMango
0162fb913c Always try to update exec's 2020-12-16 03:43:14 +01:00
Alessandro Toia
2c99138374 Remove custom_text_center from legacy and trailing spaces 2020-12-15 15:49:57 -08:00
flightlessmango
bd71d0b5fd Check for lsof before trying to use it 2020-12-14 22:13:29 +01:00
flightlessmango
1b44c57db5 Improved lsof for checking gamemode/vkbasalt 2020-12-14 20:30:52 +01:00
flightlessmango
214bb83d40 Moved update_exec() into a thread 2020-12-14 20:21:33 +01:00
flightlessmango
05cf9fc5d6 Add gamemode and vkbasalt function 2020-12-14 20:11:14 +01:00
Alessandro Toia
1d8f4b79c1 Formatting Fixes and remove unused variable 2020-12-13 21:59:03 -08:00
FlightlessMango
c54f8bec5d Hud elements exec function 2020-12-14 06:54:29 +01:00
Alessandro Toia
c4925ac83e Allow multiple instances of custom_text_center and custom_text 2020-12-13 21:38:10 -08:00
FlightlessMango
05c09e3fdf Only draw custom_text_center if it's not empty 2020-12-14 04:38:55 +01:00
Witold Baryluk
4f20da781d Improve code for program name extraction
This cleans up the code, as well fixes the bug of not setting
program_name if the MANGOHUD_CONFIG env is specified.

Instead of global variable, that could be not-initialized
use a function to get a program name in logging.

While at it, revamp code and separate things into own functions,
and return by value, and make them easier to use / share code.
2020-12-13 11:35:40 +00:00
Lukáš Horáček
f11a49ae8b
Add swap 2020-12-13 11:07:17 +01:00
Alessandro Toia
80004d3fe0 Chnage fps color based on fps value 2020-12-09 19:36:45 -08:00
Alessandro Toia
75d9e51445 Remove custom_header, add new params custom_text_center and custom_text 2020-12-08 17:02:50 -08:00
Alessandro Toia
439f1266ba Remove custom_header background and add newline after 2020-12-07 18:35:08 -08:00
Alessandro Toia
db82ed0a1d Add documentation for custom_header param 2020-12-07 18:35:08 -08:00
Alessandro Toia
576f9887e0 Add custom_header to legacy_elements, make sure custom_header is always shown first 2020-12-07 18:35:08 -08:00
Alessandro Toia
c479694735 Use SetCursorPosX() instead of SameLine() to center text 2020-12-07 18:35:08 -08:00
Alessandro Toia
b77517501c Add new param custom_header 2020-12-07 18:35:08 -08:00
FlightlessMango
d54409b6b5 Don't need vulkan hooking in kiero 2020-12-06 04:51:20 +01:00
FlightlessMango
af0658e137 Change win config location to mangohud folder 2020-12-06 02:33:58 +01:00
FlightlessMango
1a86d3b241 Set dx_version var 2020-12-06 02:33:41 +01:00
FlightlessMango
3bc0f32a3b Init all related renderTypes 2020-12-06 01:39:28 +01:00
FlightlessMango
079f700241 Make sure logger gets inited in win 2020-12-06 01:36:02 +01:00
Alessandro Toia
a061ca060f __gnu_linux__ shouldn't be caps 2020-12-03 22:15:17 -08:00
Alessandro Toia
8e873fe547 Remove more "not" and "and" in if statments
Rename dbus_helpers.hpp to dbus_helpers.h
2020-12-03 22:00:18 -08:00
FlightlessMango
6ed47879e7 __gnu_linux__ shouldn't be caps 2020-12-04 05:48:32 +01:00
FlightlessMango
f375d94188 libgen.h not needed on win32 2020-12-04 04:55:15 +01:00
FlightlessMango
45c7ea0841 Include intrin.h for _ReturnAddress win32 2020-12-04 04:54:58 +01:00
flightlessmango
cfc0b74d1a
Merge pull request #418 from baryluk/patch-3
Perform updates of gpuInfo struct in more atomic way
2020-12-04 04:51:50 +01:00
FlightlessMango
ce7de641cf Don't use "and" and "not" in if statements 2020-12-04 04:49:02 +01:00
FlightlessMango
d1af7c97ac Removed lingering pthread.h 2020-12-04 04:46:14 +01:00
FlightlessMango
eef6d8974a Only use popen/close on linux 2020-12-04 04:43:16 +01:00
FlightlessMango
c20b06c851 Remove more ram related things for windows 2020-12-03 21:26:00 +01:00