Commit Graph

1579 Commits

Author SHA1 Message Date
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>
2022-03-30 10:17:45 +03:00
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>
2022-03-30 10:17:45 +03:00
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>
2022-03-30 10:17:45 +03:00
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>
2022-03-30 10:17:45 +03:00
Emil Velikov
f2b991cccd
mangoapp: make internal function static
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2022-03-30 10:17:45 +03:00
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>
2022-03-30 10:17:45 +03:00
Emil Velikov
403b0f2154
mangoapp: remove unused ctrl_msgid
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2022-03-30 10:17:45 +03:00
Emil Velikov
5400332d5a
mangoapp: whitespace fixes
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2022-03-30 10:17:45 +03:00
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>
2022-03-30 10:17:44 +03:00
jackun
f4ea65429e
No frame time for first frame
We don't know when it started to render, so...
2022-03-29 13:04:18 +03:00
jackun
a13b041d1d
Fps limit: simplify converting frame time back to fps 2022-03-29 13:00:44 +03:00
jackun
d2d6787568
Cleanup some header inclusions 2022-03-29 09:33:26 +03:00
jackun
45113bb7d2
Specify fileChanged argument type 2022-03-29 09:33:25 +03:00
jackun
73da29d4ad
Try to init spdlog a bit earlier 2022-03-29 09:33:21 +03:00
jackun
2f5efc320a
Move FpsLimiter to overlay.cpp 2022-03-24 12:32:51 +02:00
jackun
a26e6325cc
[dbus] Use GameMode portal inside flatpak 2022-03-24 12:06:40 +02:00
jackun
906542f587
Add frame count param 2022-03-24 08:41:01 +02:00
jackun
bac50e42d5 Add frame count 2022-03-23 09:33:40 +02:00
FlightlessMango
3f92e10c14 mangoapp: fix broken fsr sharpness 2022-03-20 08:00:11 +01:00
FlightlessMango
e6adae8489 mangoapp: fixing some warnings 2022-03-19 22:23:59 +01:00
FlightlessMango
284ae0da2c mangoapp: layer: remove unused functions 2022-03-17 00:47:12 +01:00
FlightlessMango
529afdddf8 pkgbuild: don't prepend of append libdir 2022-03-15 23:53:11 +01:00
FlightlessMango
e556762890 pkgbuild: add nlohmann_json 2022-03-15 23:20:35 +01:00
FlightlessMango
4341843117 nlohmann_json wrap 2022-03-15 22:56:36 +01:00
FlightlessMango
0e680f8f7d Add PKGBUILD 2022-03-15 22:30:10 +01:00
FlightlessMango
7df8918c42 mangoapp: layer: append libdir to json 2022-03-15 22:29:51 +01:00
jackun
11142b5b2c
Merge pull request #703 from evelikov/misc-mixes
Remove libdrm_amdgpu and other unnecessary code
2022-03-15 19:47:48 +02:00
FlightlessMango
d4064bf6b7 mangoapp: layer: remove unused stuff 2022-03-14 20:44:46 +01:00
FlightlessMango
b064f47d66 mangoapp: vulkan layer 2022-03-14 19:49:20 +01:00
FlightlessMango
5b1bda770a mangoapp: remove debug stuff 2022-03-13 16:48:36 +01:00
FlightlessMango
1940a83566 mangoapp: don't assume APU for temps 2022-03-13 15:51:41 +01:00
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>
2022-03-12 20:19:16 +00:00
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>
2022-03-12 18:12:05 +00:00
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>
2022-03-12 18:10:31 +00:00
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>
2022-03-12 18:10:31 +00:00
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>
2022-03-12 18:10:30 +00:00
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>
2022-03-12 18:10:04 +00:00
Emil Velikov
d75b4d972b Remove unused LS_FLAGS::LS_ALL
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2022-03-12 10:28:18 +00:00
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>
2022-03-12 10:28:18 +00:00
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>
2022-03-12 10:28:18 +00:00
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>
2022-03-12 10:28:18 +00:00
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>
2022-03-12 10:28:18 +00:00
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>
2022-03-12 10:28:18 +00:00
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>
2022-03-12 10:28:18 +00:00
Emil Velikov
1ed88154b1 editorconfig: drop irrelevant Makefile section
There is no such file in-tree and never was.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2022-03-12 10:28:18 +00:00
FlightlessMango
8b801e8435 don't set hide_fsr_sharpness with full 2022-03-08 18:28:27 +01:00
FlightlessMango
0402fa4ab5 mangoapp: fsr_steam_sharpness 2022-03-08 17:51:06 +01:00
FlightlessMango
5c984e7b80 mangoapp: fsr_steam_sharpness 2022-03-08 17:36:13 +01:00
FlightlessMango
b1fdbc3a5b Disable gamemode dbus for now 2022-03-08 17:27:04 +01:00
jackun
822bb66629
Fix confusing vendorID with deviceID
OpenGL still needs some work to select the actual render device >:(
2022-03-06 22:06:48 +02:00