Commit Graph

93 Commits (master)

Author SHA1 Message Date
flightlessmango 66d5ce43d2 mangoapp: add GAMESCOPE_NO_FOCUS property 2 months ago
Joshua Ashton baa06da2ad main: Check for error in msgrcv 2 months ago
Joshua Ashton 7c7cb9a1dc Revert "main: Don't resize the window if we aren't horizontal"
Seems to regress on some systems, I need to look into why at some point :/

This reverts commit 7349a1cf29.
2 months ago
Joshua Ashton 7349a1cf29 main: Don't resize the window if we aren't horizontal
Fixes weird janking when using this in Gamescope and the window gets resized
3 months ago
Joshua Ashton aeae2a00ac app: Support for setting only frametime/app frametime 6 months ago
flightlessmango ea725ed1d2 mangoapp: revert the msg key 6 months ago
flightlessmango b1ae5b87c7 mangoapp: init spdlog 6 months ago
flightlessmango 94a8dfb658 Add hdr and refresh rate options 6 months ago
flightlessmango 0849ae42b8 remove accidental debug stuff 7 months ago
flightlessmango f351515265 Fix gpu_fan for AMD
It was incorrectly checking deviceID instead of vendorID.
We also use hwmon for fan reading just in case.
7 months ago
FlightlessMango 84caba707a subproject: implot 8 months ago
Alex Maese cd05d1771f Add ability to toggle through presets 8 months ago
Joshua Ashton ef444a740d mangoapp: Use glXQueryCurrentRendererIntegerMESA if available
This is the best way to get vendor IDs instead of hardcoding based on the GL_RENDERER vendor string.
10 months ago
FlightlessMango 7c2a90c209 mangoapp: update colors if needed
[skip ci]
11 months ago
FlightlessMango 352d365493 mangoapp: get resolution from gamescope
[skip ci]
12 months ago
FlightlessMango 7853af98d0 mangoapp: amdgpu: pause the polling thread when it's not needed 1 year ago
FlightlessMango 11bc5111eb mangoapp: move some variables to hudelements 1 year 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>
1 year ago
FlightlessMango 47f822f19c mangohudctl: reload_config variable in msg sctruct 1 year ago
FlightlessMango d0f8c8aa94 mangoapp: control: rerload_config option 1 year ago
Emil Velikov 535c1f0a83 mangoapp: reshuffle ifdef MANGOAPP guards
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
1 year 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>
1 year ago
Emil Velikov 8e1c389f22 mangoapp: split proto details into separate header
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
1 year ago
FlightlessMango 3190778086 Don't update metrics if we're not logging and not displaying 1 year 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.
1 year ago
FlightlessMango d0a1c4ea07 horizontal view and hud_no_margin 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
jackun e132bb9268
Lower api minor version
Apparently too new of a version implicit layer might also not get loaded
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
jackun a8a0a245e6
Bump layer api version 2 years ago
jackun f680c28f1f
Generalize control over socket so it works with OpenGL too 2 years ago
jackun 3e6b35560c
Use overlay_new/end_frame with mangoapp 2 years ago
FlightlessMango 6119fa80d1 mangoapp: layer: remove unused get_device_chain_info func 2 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>
2 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>
2 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>
2 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>
2 years ago
Emil Velikov f2b991cccd
mangoapp: make internal function static
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2 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>
2 years ago
Emil Velikov 403b0f2154
mangoapp: remove unused ctrl_msgid
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2 years ago
Emil Velikov 5400332d5a
mangoapp: whitespace fixes
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2 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>
2 years ago
FlightlessMango 3f92e10c14 mangoapp: fix broken fsr sharpness 2 years ago
FlightlessMango e6adae8489 mangoapp: fixing some warnings 2 years ago
FlightlessMango 284ae0da2c mangoapp: layer: remove unused functions 2 years ago
FlightlessMango 7df8918c42 mangoapp: layer: append libdir to json 2 years ago