Commit Graph

1354 Commits

Author SHA1 Message Date
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
jackun
8e21b52acf
Make get_device_name return GPU name 2022-03-06 22:02:09 +02:00
jackun
c88ef84bf5
Revert "Get device name before system info"
This reverts commit e7de7b5b93.
2022-03-06 21:32:16 +02:00
jackun
8af07b4945
Move logging() to Logger struct
Stopgap to use same m_params while waiting for proper multithreading-safe overlay_params fix.
2022-03-06 21:31:17 +02:00
jackun
ed95ab6140
Merge pull request #702 from evelikov/all-the-warnings
All the warnings
2022-03-06 21:15:11 +02:00
Emil Velikov
40343db3fc Use a proper mingw32.txt file
Current one is some html gibberish and is practically unusable...

Oh look - neither mingw* toolchain file is actually hooked up into the
CI. We can do that with follow-up commit.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2022-03-06 19:08:09 +00:00
Emil Velikov
aafc2e0981 Build with CI jobs with -Dwerror=true
Currently the CI jobs only builds on releases, which catches some of the
fallout.

We might get a proper CI at some point in the future.

v2: pass the -Dwerror=true directly into build.sh

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2022-03-06 19:07:01 +00:00
Emil Velikov
5bb97fb2b1 Remove broken PKGBUILD
For a while now there is an Arch PKBGUILD in the AUR. The in-tree one is
broken and does not build.

With that the Arch handling in build.sh is no longer used, alas as
requested I've left it since it is "useful for quicker MangoHud
development" :-P

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2022-03-06 19:03:35 +00:00
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>
2022-03-06 19:03:35 +00:00
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>
2022-03-06 19:03:35 +00:00
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>
2022-03-06 19:03:35 +00:00
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>
2022-03-06 19:03:35 +00:00
Emil Velikov
30cfe839eb Address signed comparisons warnings
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2022-03-06 19:03:35 +00:00
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>
2022-03-06 19:02:39 +00:00
Emil Velikov
dc53cbf0f0 Remove unused-but-set variables
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2022-03-06 19:01:23 +00:00
Emil Velikov
e3977ad648 meson: increase the warning_level to 2
The default is 1, which effectively omits -Wextra.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2022-03-06 14:16:06 +00:00
Emil Velikov
a5d5091f0e meson: build with -Wno-unused-parameter
Otherwise we get a ton of warnings about unused function parameters.
The existing -Qunused-arguments seems to be clang specific.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2022-03-06 14:16:06 +00:00
FlightlessMango
3f2db318c5 Some fixes for windows compiling 2022-02-24 22:26:28 +01:00
FlightlessMango
ae7c5f0f24 Fix hud benchmark 2022-02-24 22:26:28 +01:00
Alessandro Toia
4026743fe3 add gamepad_battery & gamepad_battery_icon params to readme 2022-02-19 21:52:52 -08:00
Alessandro Toia
9b668babdc gamepad: add bool is_charging 2022-02-18 18:16:41 -08:00
Alessandro Toia
6db23968ee gamepad: fix 8Bitdo counter 2022-02-18 18:16:41 -08:00
Alessandro Toia
74b328d209 gamepad: add option to disable icon and show capacity instead 2022-02-18 18:16:41 -08:00
Alessandro Toia
5c92c32491 add gamepad_battery to legacy elements 2022-02-18 18:16:41 -08:00
Alessandro Toia
7d90ef8169 GAMEPAD: add 8Bitdo support 2022-02-18 18:16:41 -08:00
Alessandro Toia
a484f32e57 GAMEPAD: remove unsed variables 2022-02-18 18:16:41 -08:00