Emil Velikov
9639377694
overlay: annotate render_benchmark() as static
...
Function is used solely within the compilation unit.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
5a53ad010f
overlay: position_layer() takes an immutable window_size
...
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 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>
3 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>
3 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>
3 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>
3 years ago
Emil Velikov
f2b991cccd
mangoapp: make internal function static
...
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 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>
3 years ago
Emil Velikov
403b0f2154
mangoapp: remove unused ctrl_msgid
...
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
Emil Velikov
5400332d5a
mangoapp: whitespace fixes
...
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 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>
3 years ago
jackun
f4ea65429e
No frame time for first frame
...
We don't know when it started to render, so...
3 years ago
jackun
a13b041d1d
Fps limit: simplify converting frame time back to fps
3 years ago
jackun
d2d6787568
Cleanup some header inclusions
3 years ago
jackun
45113bb7d2
Specify `fileChanged` argument type
3 years ago
jackun
73da29d4ad
Try to init spdlog a bit earlier
3 years ago
jackun
2f5efc320a
Move FpsLimiter to overlay.cpp
3 years ago
jackun
a26e6325cc
[dbus] Use GameMode portal inside flatpak
3 years ago
jackun
bac50e42d5
Add frame count
3 years ago
FlightlessMango
3f92e10c14
mangoapp: fix broken fsr sharpness
3 years ago
FlightlessMango
e6adae8489
mangoapp: fixing some warnings
3 years ago
FlightlessMango
284ae0da2c
mangoapp: layer: remove unused functions
3 years ago
FlightlessMango
4341843117
nlohmann_json wrap
3 years ago
FlightlessMango
7df8918c42
mangoapp: layer: append libdir to json
3 years ago
jackun
11142b5b2c
Merge pull request #703 from evelikov/misc-mixes
...
Remove libdrm_amdgpu and other unnecessary code
3 years ago
FlightlessMango
d4064bf6b7
mangoapp: layer: remove unused stuff
3 years ago
FlightlessMango
b064f47d66
mangoapp: vulkan layer
3 years ago
FlightlessMango
5b1bda770a
mangoapp: remove debug stuff
3 years ago
FlightlessMango
1940a83566
mangoapp: don't assume APU for temps
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
Emil Velikov
d75b4d972b
Remove unused LS_FLAGS::LS_ALL
...
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
FlightlessMango
8b801e8435
don't set hide_fsr_sharpness with full
3 years ago
FlightlessMango
0402fa4ab5
mangoapp: fsr_steam_sharpness
3 years ago
FlightlessMango
5c984e7b80
mangoapp: fsr_steam_sharpness
3 years ago
FlightlessMango
b1fdbc3a5b
Disable gamemode dbus for now
3 years ago
jackun
822bb66629
Fix confusing vendorID with deviceID
...
OpenGL still needs some work to select the actual render device >:(
3 years ago
jackun
8e21b52acf
Make `get_device_name` return GPU name
3 years ago
jackun
c88ef84bf5
Revert "Get device name before system info"
...
This reverts commit e7de7b5b93
.
3 years ago
jackun
8af07b4945
Move `logging()` to Logger struct
...
Stopgap to use same m_params while waiting for proper multithreading-safe overlay_params fix.
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
Emil Velikov
30cfe839eb
Address signed comparisons warnings
...
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
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>
3 years ago
Emil Velikov
dc53cbf0f0
Remove unused-but-set variables
...
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years ago
FlightlessMango
3f2db318c5
Some fixes for windows compiling
3 years ago
FlightlessMango
ae7c5f0f24
Fix hud benchmark
3 years ago
Alessandro Toia
9b668babdc
gamepad: add bool is_charging
3 years ago
Alessandro Toia
6db23968ee
gamepad: fix 8Bitdo counter
3 years ago
Alessandro Toia
74b328d209
gamepad: add option to disable icon and show capacity instead
3 years ago
Alessandro Toia
5c92c32491
add gamepad_battery to legacy elements
3 years ago
Alessandro Toia
7d90ef8169
GAMEPAD: add 8Bitdo support
3 years ago
Alessandro Toia
a484f32e57
GAMEPAD: remove unsed variables
3 years ago
Alessandro Toia
a8ab4e2991
GAMEPAD: remove unused param and change xone to xbox
3 years ago
Alessandro Toia
4be3ba20c2
GAMEPAD: add battery reporting for gamepad devices
...
(xone,xpadneo,ds4,ds5,switch)
3 years ago
jackun
a029dfaaf2
Don't hide gpu_metrics behind HAVE_LIBDRM_AMDGPU
3 years ago
FlightlessMango
93f389dd62
clean up frametime_data
3 years ago
FlightlessMango
3a667ab66b
Revert FPS calc
3 years ago
FlightlessMango
cf8ba8fd63
mangoapp: clean up msg_size
3 years ago
FlightlessMango
d82738b03c
mangoapp: use GAMESCOPE_FOCUSED_APP_GFX instead
3 years ago
FlightlessMango
68f40c56cc
only shrink frametime graph on mangoapp
3 years ago
jackun
e555a942fb
Use single IO stats instance
3 years ago
FlightlessMango
e12042ca3d
mangoapp: adjust for changed msg size in gamescope
3 years ago
FlightlessMango
fa133940c8
Fix min/max frametime
3 years ago
Alessandro Toia
fb97530965
cpu: Fix not reporting amd cpu power
3 years ago
FlightlessMango
e289a55c6f
mangoapp: make sure steam_focused is false when mangoapp_steam
3 years ago
FlightlessMango
316914da8d
mangoapp: fixed mangoapp not respecting no_display
3 years ago
FlightlessMango
5cdedc4671
mangoapp: gamescope debug graphs
3 years ago
jackun
4608fa5e3a
vkGetInstanceProcAddr(instance, "vkGetInstanceProcAddr") should return our vkGetInstanceProcAddr not the next in the chain.
3 years ago
FlightlessMango
7740e8430f
mangoapp: clean up unused variable
3 years ago
FlightlessMango
44a335a809
mangoapp: mangoapp_steam bool
3 years ago
FlightlessMango
6521eaa82d
mangoapp: hide hud by default
3 years ago
Alessandro Toia
056f7b0e29
Check if battery status is full
3 years ago
FlightlessMango
17867f2a6d
Battery: show remaining if > 1.f
3 years ago
FlightlessMango
b11714a326
mangoapp: hide fsr sharp when off
3 years ago
FlightlessMango
339f5c0d11
mangoapp: hide when steam is focused
3 years ago
FlightlessMango
cdcd08be44
battery remaining: don't show seconds at least by default
3 years ago
FlightlessMango
5508933c47
mangoapp: make fsr display a little prettier
3 years ago
Alessandro Toia
590f52d223
When battery is plugged in show plug icon
3 years ago
FlightlessMango
30ee0b770d
Don't use all sysfs files if metrics_path
3 years ago
FlightlessMango
c708b1a8a8
disable deviceid check for now
3 years ago
FlightlessMango
4556caf6d3
mangoapp: remove some debug
3 years ago
FlightlessMango
b598d22543
mangoapp: don't write imgui.ini
3 years ago
Alessandro Toia
b158888d54
Add remaining time text to battery
3 years ago
FlightlessMango
61fb9267a0
mangoapp: don't use fsr if msg doesn't contain fsr
3 years ago
FlightlessMango
39f6ae98ec
Battery remaining time
3 years ago
FlightlessMango
a9f811a207
mangoapp: gamescope fsr
3 years ago
FlightlessMango
8ddbcc3803
don't average log fps
3 years ago