André Almeida
f07aea54b6
logging: check if duration is enabled before checking if it has expired
...
If we check if log_duration is enabled before checking if it has expired
we can save some math and comparison instructions on every log write.
5 years ago
André Almeida
0a942512e9
logging: don't sleep if time is over
5 years ago
André Almeida
0303f8de28
logging: write log to a memory buffer
...
Instead of writing every line of the log to the file (and, consequently,
to the disk), write to a memory buffer first and after the log finishes
flush from memory to disk. This improve the performance of the tool, since
it avoids making the program blocked by disk IO.
5 years ago
jackun
f3f04f3f78
Print dlerror() in lib loaders
5 years ago
jackun
780ea7c89b
[OpenGL] Use GLAD instead on gl3w and hook EGL
5 years ago
jackun
772ab6aa5b
[OpenGL] Don't exit if function is not found, it probably isn't catastrophic
5 years ago
André Almeida
4830268a11
logging: fix indentation
5 years ago
jackun
a6bfa712e3
Do a sanity check for XNVCtrl and GLX headers
5 years ago
FlightlessMango
d454ff43a2
Hide all hud elements on no_display
5 years ago
jackun
e95a96d9f0
If used for other things than just reading sysfs files, xfs/jfs need stat() for inode type
5 years ago
jackun
0db804aa01
Don't free DBusError if it was never inited because dbus_error_free() is nullptr too
5 years ago
jackun
421146b822
Don't reinit dbus manager
5 years ago
jackun
0a27e0a447
Clear all metadata strings in case other mpris-compatible media players don't have them all
5 years ago
jackun
8024736253
Add DBus loader, combined ticker for Spotify metadata
5 years ago
FlightlessMango
d975278396
Dbus with spotify
5 years ago
jackun
cbb46fa21b
Also call default constructor for libnvctrl_loader
5 years ago
Stephan Lachnit
0998d33d72
Use Vulkan-Headers module via wrap
...
This commit replaces the git submodule for the Vulkan headers with meson subproject using wrap.
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
5 years ago
jackun
8cd3172335
[OpenGL] Separate GLX out from shareable code so wayland sessions can just use EGL, hopefully
5 years ago
jackun
2f034c6d1e
Use X11 loader functions instead of linking to X11 libs
5 years ago
jackun
71b37906da
Shared X11 intialization functions
5 years ago
jackun
329b5d66c2
Add X11 loader
5 years ago
jackun
108bca7d4f
Don't include X11 headers in overlay_params.h
5 years ago
jackun
bd9d9650a0
Move `dlsym` hook out from inject_glx.cpp
5 years ago
jackun
0a36578adf
[OpenGL] Rename GLX loader functions
5 years ago
jackun
b2e6727b25
[OpenGL] Rename loader_gl.* to loader_glx.*
5 years ago
jackun
2e7d92e068
Move `real_dlsym` files out from `gl` subdir
5 years ago
jackun
e750173b51
[OpenGL] Check if X11 is enabled
5 years ago
Danilo Spinella
0373383581
Add x11/wayland feature switches, rename 'use_xnvctrl' to 'with_xnvctrl'
5 years ago
jackun
59113b3ae2
[OpenGL] Move ImGui functions to separate file
5 years ago
jackun
c3e50db2f4
[OpenGL] Import glXQueryDrawable just in case
5 years ago
jackun
accac3a015
[OpenGL] Import XGetGeometry
5 years ago
jackun
ebe23d3431
[OpenGL] Rename inject.cpp to inject_glx.cpp in preparation for separating X11 related functions
5 years ago
jackun
042267f26b
Update API version to 1.2.135 in manifest
5 years ago
jackun
049e960589
Add 'use_xnvctrl' feature to allow building without libXNVCtrl support
5 years ago
jackun
5afbe10005
[OpenGL] Restore ImGui's context to previously saved one, duh
5 years ago
jackun
6eb2c9bc09
[OpenGL] Explicitly set ImGui's context and treat global context as foreign
...
Apps might be using Dear ImGui so keep our stuff separate from theirs.
Issue #107
5 years ago
jackun
f5e3f3b73b
[config] Add MANGOHUD_CONFIGFILE envvar for specific configuration file
...
Issue #104
5 years ago
jackun
f8cc3bbf06
[config] Allow fps_limit=0 or commenting it out to disable fps limit
5 years ago
jackun
49742e1cea
[config] Load config changes to local copy of overlay_params so it does not block rendering thread while parsing
5 years ago
FlightlessMango
0d53d7d39d
Fixed typo in nvctrl
5 years ago
FlightlessMango
85291d25ef
Added warning messages for nvctrl
5 years ago
Lionel Landwerlin
1fc94600e9
vulkan/overlay: Add a workaround semaphore for application presenting without one
...
When an application calls vkQueuePresent() on a different queue than
the one we run our drawing on and it doesn't give a semaphore to wait
on, let's insert our own semaphore so that we don't race the
application's drawing.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2540
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3893 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3893 >
5 years ago
jackun
32ae051434
Add Bethesda launcher to blacklist
5 years ago
Sporif
c24d9015cd
Blacklist support
...
Initial blacklist: Battle.net.exe, EpicGamesLauncher.exe, IGOProxy.exe, IGOProxy64.exe, Origin.exe, Steam.exe
Signed-off-by: jackun <jack.un@gmail.com>
5 years ago
jackun
25b0adfbf9
Move Wine exe name code from config.cpp to get_wine_exe_name(...)
5 years ago
jackun
cf17f70dab
Remove unused statistics related code
5 years ago
jackun
d3f895cbef
[config] keep pthread_t pointers in notify_thread struct for MT safety
5 years ago
jackun
1b192c4910
[config] join notifier thread just to be sure
5 years ago
jackun
e72a7bdd76
[config] Try to set notifier file descriptor to non-blocking mode; add start/stop_notifier functions
...
If setting to non-blocking fails, just closing the fd should kill it anyway
5 years ago
jackun
841d76c6af
Quit config watcher thread if it fails to init and clean up
5 years ago
jackun
2ab386d70a
Fix double definition
5 years ago
FlightlessMango
a84f5ef178
Show mangohud arch in hud
5 years ago
FlightlessMango
23adda92b7
Added param 'arch'
5 years ago
FlightlessMango
c9558eec50
Merge branch 'xnvctrl' into develop
5 years ago
jackun
ae3a155e22
Keep engine name per vulkan instance
5 years ago
jackun
053a07d83c
[OpenGL] Don't set display size to scissor box if its size is just 1 by 1
5 years ago
jackun
f92a2a07db
GiB not GB
5 years ago
jackun
fbae1dfcc0
More checks for XNVCtrl support. Favor NVML but fallback to XNVCtrl if supported.
5 years ago
jackun
b059fa26bc
xnvctrl: parse tokenized attributes
5 years ago
jackun
c16f4b4275
try_stoi: spam in debug build only
5 years ago
FlightlessMango
79add746b5
Removed debugging messages
5 years ago
FlightlessMango
f2b770abac
Use XNVCTRLQueryTargetAttribute64 instead
5 years ago
FlightlessMango
2c979e52e6
Set nvmlSuccess to false if NVML gpu load is unsupported
5 years ago
FlightlessMango
e7b5a18d87
If NVML fails fallback to NVctrl
5 years ago
FlightlessMango
f81af99ee5
NVCtrl meson build
5 years ago
FlightlessMango
aaaf30b807
NVctrl fetching
5 years ago
FlightlessMango
8ee0ec2c3f
NVCtrl loader
5 years ago
jackun
1915352c86
Draw versions after table so they don't get clipped
5 years ago
jackun
c7bee1a99d
[OpenGL] Compare if viewport or scissor box size changed with window resizing and use that for display size
5 years ago
jackun
6ad6bffade
Use ImGui's DisplaySize so display size for layer positioning etc can be set the same way for vulkan and OpenGL
5 years ago
jackun
3d46ccafe1
Show OpenGL version below engine name too to avoid it getting clipped
5 years ago
jackun
8aa0783b4a
Show vulkan/opengl version
...
OpenGL glGetIntegerv(GL_[MAJOR|MINOR]_VERSION) don't work on versions < 3.0 though
5 years ago
jackun
bb3aba9080
[OpenGL] Use elfhacks to load real OpenGL functions
5 years ago
jackun
85801bcc17
[OpenGL] Add elfhacks
...
https://github.com/ienorand/elfhacks
5 years ago
FlightlessMango
8fb13e23e4
Resize window when reloading config
5 years ago
jackun
5bdfcd493d
[config] Add config file change notifier to OpenGL
5 years ago
jackun
a0f5cb56a2
[config] Guard overlay_params from the thread with mutex
5 years ago
jackun
34184abf2e
[config] loop in the notifier thread and reload configuration file if it is changed
5 years ago
jackun
341aa21b87
[config] Move options map and config_file_path to overlay_params
5 years ago
FlightlessMango
c5dad16612
Listen for modify on config file
5 years ago
jackun
b0f36fad31
Expand paths only
5 years ago
FlightlessMango
b0e1fe9321
[params] set targetFrameTime in params.cpp
5 years ago
FlightlessMango
71b602751d
[meson] option to include_doc
5 years ago
jackun
6e40f9bdd5
Expand tilde to home dir if string param start with `~`
5 years ago
jackun
f7a7256374
Clear options map so reloading config files actually has an effect
5 years ago
jackun
6b4103eae9
[config] Parse Wine application name without absolute path
5 years ago
jackun
abef561573
Disable CPU stat(s) if it failed to initialize
5 years ago
jackun
712590befe
Check if CPU sensor file handle is valid
5 years ago
FlightlessMango
64a42df047
forgot to include functional
5 years ago
FlightlessMango
cbb58ab79c
make sure Xdisplay is closed on shutdown
5 years ago
FlightlessMango
b3286cbe48
check if opengl/vulkan with is_vulkan bool
5 years ago
jackun
13e57578c3
Fix update_hud_info indentation
5 years ago
jackun
154380e056
Don't update time if not enabled
5 years ago
jackun
9a7a4d99e0
Don't update CPU freq/temp if not enabled
5 years ago
jackun
6bbc89a9cc
Don't update CPU stats if not enabled
5 years ago
jackun
16552b25e3
Don't update RAM/IO stats if not enabled
5 years ago
jackun
c850507314
[OpenGL] Initialize MangoHud from glXSwapBuffers even if glXMakeCurrent is skipped for some reason
5 years ago
jackun
fa41e6f882
Always configure vulkan json
5 years ago
jackun
ad64bf345d
Update build scripts, again
...
Install to $prefix$libdir/mangohud by default.
5 years ago
jackun
50cef9621b
Remove ~/.local/share/MangoHud/MangoHud.conf support
5 years ago