mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
Add basic mangohud support
This commit is contained in:
409
projects/ROCKNIX/packages/apps/mangohud/config/MangoHud.conf
Normal file
409
projects/ROCKNIX/packages/apps/mangohud/config/MangoHud.conf
Normal file
@@ -0,0 +1,409 @@
|
||||
### MangoHud configuration file
|
||||
### Uncomment any options you wish to enable. Default options are left uncommented
|
||||
### Use some_parameter=0 to disable a parameter (only works with on/off parameters)
|
||||
### Everything below can be used / overridden with the environment variable MANGOHUD_CONFIG instead
|
||||
|
||||
################ INFORMATIONAL #################
|
||||
## prints possible options on stdout
|
||||
# help
|
||||
|
||||
################ PERFORMANCE #################
|
||||
|
||||
### Limit the application FPS. Comma-separated list of one or more FPS values (e.g. 0,30,60). 0 means unlimited (unless VSynced)
|
||||
# fps_limit=0
|
||||
|
||||
### early = wait before present, late = wait after present
|
||||
# fps_limit_method=
|
||||
|
||||
### VSync [0-3] 0 = adaptive; 1 = off; 2 = mailbox; 3 = on
|
||||
# vsync=-1
|
||||
|
||||
### OpenGL VSync [0-N] 0 = off; >=1 = wait for N v-blanks, N > 1 acts as a FPS limiter (FPS = display refresh rate / N)
|
||||
# gl_vsync=-2
|
||||
|
||||
### Mip-map LoD bias. Negative values will increase texture sharpness (and aliasing)
|
||||
## Positive values will increase texture blurriness (-16 to 16)
|
||||
# picmip=-17
|
||||
|
||||
### Anisotropic filtering level. Improves sharpness of textures viewed at an angle (0 to 16)
|
||||
# af=-1
|
||||
|
||||
### Force bicubic filtering
|
||||
# bicubic
|
||||
|
||||
### Force trilinear filtering
|
||||
# trilinear
|
||||
|
||||
### Disable linear texture filtering. Makes textures look blocky
|
||||
# retro
|
||||
|
||||
################### VISUAL ###################
|
||||
|
||||
### Legacy layout
|
||||
# legacy_layout=0
|
||||
|
||||
### pre defined presets
|
||||
# -1 = default
|
||||
# 0 = no display
|
||||
# 1 = fps only
|
||||
# 2 = horizontal view
|
||||
# 3 = extended
|
||||
# 4 = high detailed information
|
||||
# preset=-1
|
||||
|
||||
### Enable most of the toggleable parameters (currently excludes `histogram`)
|
||||
# full
|
||||
|
||||
### Show FPS only. ***Not meant to be used with other display params***
|
||||
# fps_only
|
||||
|
||||
### Display custom centered text, useful for a header
|
||||
# custom_text_center=
|
||||
|
||||
### Display the current system time
|
||||
# time
|
||||
## removes the time label
|
||||
# time_no_label
|
||||
|
||||
### Time formatting examples
|
||||
## %H:%M
|
||||
## [ %T %F ]
|
||||
## %X # locally formatted time, because of limited glyph range, missing characters may show as '?' (e.g. Japanese)
|
||||
# time_format="%T"
|
||||
|
||||
### Display MangoHud version
|
||||
# version
|
||||
|
||||
### Display the current GPU information
|
||||
## Note: gpu_mem_clock and gpu_mem_temp also need "vram" to be enabled
|
||||
# gpu_stats
|
||||
# gpu_temp
|
||||
# gpu_junction_temp
|
||||
# gpu_core_clock
|
||||
# gpu_mem_temp
|
||||
# gpu_mem_clock
|
||||
# gpu_power
|
||||
# gpu_power_limit
|
||||
# gpu_text=
|
||||
# gpu_load_change
|
||||
# gpu_load_value=60,90
|
||||
# gpu_load_color=39F900,FDFD09,B22222
|
||||
## GPU fan in rpm on AMD, FAN in percent on NVIDIA
|
||||
# gpu_fan
|
||||
## gpu_voltage only works on AMD GPUs
|
||||
# gpu_voltage
|
||||
## Select list of GPUs to display
|
||||
# gpu_list=0,1
|
||||
# gpu_efficiency
|
||||
|
||||
### Display the current CPU information
|
||||
# cpu_stats
|
||||
# cpu_temp
|
||||
# cpu_power
|
||||
# cpu_text=
|
||||
cpu_mhz
|
||||
# cpu_load_change
|
||||
# cpu_load_value=60,90
|
||||
# cpu_load_color=39F900,FDFD09,B22222
|
||||
# cpu_efficiency
|
||||
|
||||
### Display the current CPU load & frequency for each core
|
||||
# core_load
|
||||
# core_load_change
|
||||
# core_bars
|
||||
# core_type
|
||||
|
||||
### Display IO read and write for the app (not system)
|
||||
# io_read
|
||||
# io_write
|
||||
|
||||
### Display system vram / ram / swap space usage
|
||||
# vram
|
||||
# ram
|
||||
# swap
|
||||
|
||||
### Display per process memory usage
|
||||
## Show resident memory and other types, if enabled
|
||||
procmem
|
||||
# procmem_shared
|
||||
# procmem_virt
|
||||
# proc_vram
|
||||
|
||||
### Display battery information
|
||||
# battery
|
||||
# battery_icon
|
||||
# device_battery=gamepad,mouse
|
||||
# device_battery_icon
|
||||
# battery_watt
|
||||
# battery_time
|
||||
|
||||
### Display FPS and frametime
|
||||
fps
|
||||
# fps_sampling_period=500
|
||||
# fps_color_change
|
||||
# fps_value=30,60
|
||||
# fps_color=B22222,FDFD09,39F900
|
||||
# fps_text=""
|
||||
frametime
|
||||
# frame_count
|
||||
## fps_metrics takes a list of decimal values or the value avg
|
||||
# fps_metrics=avg,0.01
|
||||
|
||||
### Display GPU throttling status based on Power, current, temp or "other"
|
||||
## Only shows if throttling is currently happening
|
||||
throttling_status
|
||||
## Same as throttling_status but displays throttling on the frametime graph
|
||||
#throttling_status_graph
|
||||
|
||||
### Display miscellaneous information
|
||||
# engine_version
|
||||
# engine_short_names
|
||||
# gpu_name
|
||||
# vulkan_driver
|
||||
# wine
|
||||
# exec_name
|
||||
# winesync
|
||||
# present_mode
|
||||
|
||||
### Display loaded MangoHud architecture
|
||||
# arch
|
||||
|
||||
### Display the frametime line graph
|
||||
frame_timing
|
||||
# frame_timing_detailed
|
||||
# dynamic_frame_timing
|
||||
# histogram
|
||||
|
||||
### Display GameMode / vkBasalt running status
|
||||
# gamemode
|
||||
# vkbasalt
|
||||
|
||||
### Gamescope related options
|
||||
## Display the status of FSR (only works in gamescope)
|
||||
# fsr
|
||||
## Hides the sharpness info for the `fsr` option (only available in gamescope)
|
||||
# hide_fsr_sharpness
|
||||
## Shows the graph of gamescope app frametimes and latency (only on gamescope obviously)
|
||||
# debug
|
||||
## Display the status of HDR (only works in gamescope)
|
||||
# hdr
|
||||
## Display the current refresh rate (only works in gamescope)
|
||||
# refresh_rate
|
||||
|
||||
|
||||
### graphs displays one or more graphs that you chose
|
||||
## separated by ",", available graphs are
|
||||
## gpu_load,cpu_load,gpu_core_clock,gpu_mem_clock,vram,ram,cpu_temp,gpu_temp
|
||||
# graphs=
|
||||
|
||||
### mangoapp related options
|
||||
## Enables mangoapp to be displayed above the Steam UI
|
||||
# mangoapp_steam
|
||||
|
||||
### Steam Deck options
|
||||
## Shows the Steam Deck fan rpm
|
||||
# fan
|
||||
|
||||
### Display current FPS limit
|
||||
# show_fps_limit
|
||||
|
||||
### Display the current resolution
|
||||
# resolution
|
||||
|
||||
### Display current display session
|
||||
# display_server
|
||||
|
||||
### Display temperature in fahrenheit
|
||||
# temp_fahrenheit
|
||||
|
||||
## Display efficiency in joules per frame
|
||||
# flip_efficiency
|
||||
|
||||
### Display custom text
|
||||
# custom_text=
|
||||
### Display output of Bash command in next column
|
||||
# exec=
|
||||
|
||||
### Display media player metadata
|
||||
# media_player
|
||||
## for example spotify
|
||||
# media_player_name=
|
||||
## Format metadata, lines are delimited by ; (wip)
|
||||
## example: {title};{artist};{album}
|
||||
## example: Track:;{title};By:;{artist};From:;{album}
|
||||
# media_player_format=title,artist,album
|
||||
|
||||
### Network interface throughput
|
||||
# network
|
||||
## Network can take arguments but it's not required.
|
||||
## without arguments it shows all interfaces
|
||||
## arguments set which interfaces will be displayed
|
||||
# network=eth0,wlo1
|
||||
|
||||
|
||||
### Change the hud font size
|
||||
font_size=40
|
||||
# font_scale=1.0
|
||||
# font_size_text=24
|
||||
# font_scale_media_player=0.55
|
||||
# no_small_font
|
||||
|
||||
### Change default font (set location to TTF/OTF file)
|
||||
## Set font for the whole hud
|
||||
# font_file=
|
||||
|
||||
## Set font only for text like media player metadata
|
||||
# font_file_text=
|
||||
|
||||
## Set font glyph ranges. Defaults to Latin-only. Don't forget to set font_file/font_file_text to font that supports these
|
||||
## Probably don't enable all at once because of memory usage and hardware limits concerns
|
||||
## If you experience crashes or text is just squares, reduce glyph range or reduce font size
|
||||
# font_glyph_ranges=korean,chinese,chinese_simplified,japanese,cyrillic,thai,vietnamese,latin_ext_a,latin_ext_b
|
||||
|
||||
### Outline text
|
||||
text_outline
|
||||
# text_outline_color = 000000
|
||||
# text_outline_thickness = 1.5
|
||||
|
||||
### Change the hud position
|
||||
# position=top-left
|
||||
|
||||
### Change the corner roundness
|
||||
# round_corners=0
|
||||
|
||||
### Remove margins around MangoHud
|
||||
# hud_no_margin
|
||||
|
||||
### Display compact version of MangoHud
|
||||
# hud_compact
|
||||
|
||||
### Display MangoHud in a horizontal position
|
||||
# horizontal
|
||||
# horizontal_stretch
|
||||
|
||||
### Disable / hide the hud by default
|
||||
# no_display
|
||||
|
||||
### Show FEX-Emu statistics
|
||||
## Only useful for Arm64 devices running applications under emulation
|
||||
# fex_stats
|
||||
|
||||
### Hud position offset
|
||||
# offset_x=0
|
||||
# offset_y=0
|
||||
|
||||
### Hud dimensions
|
||||
# width=0
|
||||
# height=140
|
||||
# table_columns=3
|
||||
# cellpadding_y=-0.085
|
||||
|
||||
### Hud transparency / alpha
|
||||
# background_alpha=0.5
|
||||
# alpha=1.0
|
||||
|
||||
### FCAT overlay
|
||||
### This enables an FCAT overlay to perform frametime analysis on the final image stream.
|
||||
### Enable the overlay
|
||||
# fcat
|
||||
### Set the width of the FCAT overlay.
|
||||
### 24 is a performance optimization on AMD GPUs that should not have adverse effects on nVidia GPUs.
|
||||
### A minimum of 20 pixels is recommended by nVidia.
|
||||
# fcat_overlay_width=24
|
||||
### Set the screen edge, this can be useful for special displays that don't update from top edge to bottom. This goes from 0 (left side) to 3 (top edge), counter-clockwise.
|
||||
# fcat_screen_edge=0
|
||||
|
||||
### Color customization
|
||||
# text_color=FFFFFF
|
||||
# gpu_color=2E9762
|
||||
# cpu_color=2E97CB
|
||||
# vram_color=AD64C1
|
||||
# ram_color=C26693
|
||||
# engine_color=EB5B5B
|
||||
# io_color=A491D3
|
||||
# frametime_color=00FF00
|
||||
# background_color=020202
|
||||
# media_player_color=FFFFFF
|
||||
# wine_color=EB5B5B
|
||||
# battery_color=FF9078
|
||||
# network_color=E07B85
|
||||
# horizontal_separator_color=AD64C1
|
||||
|
||||
### Specify GPU with PCI bus ID
|
||||
### Set to 'domain:bus:slot.function'
|
||||
### Example:
|
||||
### $ lspci | grep A770
|
||||
### 03:00.0 VGA compatible controller: Intel Corporation DG2 [Arc A770] (rev 08)
|
||||
# pci_dev=0000:03:00.0
|
||||
|
||||
### Blacklist
|
||||
# blacklist=
|
||||
|
||||
### Control over socket
|
||||
### Enable and set socket name, '%p' is replaced with process id
|
||||
## example: mangohud
|
||||
## example: mangohud-%p
|
||||
# control = -1
|
||||
|
||||
### ftrace tracepoint display
|
||||
## Enable display of tracepoint information gathered from ftrace. MangoHud will parse
|
||||
## out the necessary data from the ftrace pipe, ftrace itself still has to be configured
|
||||
## manually (enabling the desired event, applying any filtering etc.). The user running
|
||||
## MangoHud will require permission to access the default-mounted tracefs (expected at
|
||||
## /sys/kernel/tracing/).
|
||||
##
|
||||
## When parsing ftrace output, currently only the `key=value` format for event fields is
|
||||
## expected. This is the most common format used in events, but it's not standardized.
|
||||
##
|
||||
## Three types of display are available:
|
||||
## - `histogram/drm_vblank_event`, a histogram of event occurrence
|
||||
## - `linegraph/devfreq_monitor/freq`, a line graph of an event field's numerical value
|
||||
## - `label/devfreq_frequency/dev_name`, a textual presentation of an event field's value
|
||||
##
|
||||
## The displays are set through the `ftrace` option. Multiple displays can be specified.
|
||||
# ftrace=histogram/drm_vblank_event+linegraph/devfreq_monitor/freq
|
||||
|
||||
################ WORKAROUNDS #################
|
||||
### Options starting with "gl_*" are for OpenGL
|
||||
### Specify what to use for getting display size. Options are "viewport", "scissorbox" or disabled. Defaults to using glXQueryDrawable
|
||||
# gl_size_query=viewport
|
||||
|
||||
### (Re)bind given framebuffer before MangoHud gets drawn. Helps with Crusader Kings III
|
||||
# gl_bind_framebuffer=0
|
||||
|
||||
### Don't swap origin if using GL_UPPER_LEFT. Helps with Ryujinx
|
||||
# gl_dont_flip=1
|
||||
|
||||
################ INTERACTION #################
|
||||
|
||||
### Change toggle keybinds for the hud & logging
|
||||
# toggle_hud=Shift_R+F12
|
||||
# toggle_hud_position=Shift_R+F11
|
||||
# toggle_preset=Shift_R+F10
|
||||
# toggle_fps_limit=Shift_L+F1
|
||||
# toggle_logging=Shift_L+F2
|
||||
# reload_cfg=Shift_L+F4
|
||||
# upload_log=Shift_L+F3
|
||||
# reset_fps_metrics=Shift_R+f9
|
||||
|
||||
#################### LOG #####################
|
||||
### Automatically start the log after X seconds
|
||||
# autostart_log=
|
||||
### Set amount of time in seconds that the logging will run for
|
||||
# log_duration=
|
||||
### Change the default log interval, 0 is default
|
||||
# log_interval=0
|
||||
### Set location of the output files (required for logging)
|
||||
# output_folder=/home/<USERNAME>/mangologs
|
||||
### Permit uploading logs directly to FlightlessMango.com
|
||||
## set to 1 to enable
|
||||
# permit_upload=0
|
||||
### Define a '+'-separated list of percentiles shown in the benchmark results
|
||||
### Use "AVG" to get a mean average. Default percentiles are 97+AVG+1+0.1
|
||||
## example: ['97', 'AVG', '1', '0.1']
|
||||
# benchmark_percentiles=97,AVG
|
||||
## Adds more headers and information such as versioning to the log. This format is not supported on flightlessmango.com (yet)
|
||||
# log_versioning
|
||||
## Enable automatic uploads of logs to flightlessmango.com
|
||||
# upload_logs
|
||||
# output_file=""
|
||||
71
projects/ROCKNIX/packages/apps/mangohud/package.mk
Normal file
71
projects/ROCKNIX/packages/apps/mangohud/package.mk
Normal file
@@ -0,0 +1,71 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2025-present ROCKNIX (https://github.com/ROCKNIX)
|
||||
|
||||
PKG_NAME="mangohud"
|
||||
PKG_VERSION="0faf8b9d4e0bbd218fb6334e54bc7197c7451c2b"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/flightlessmango/MangoHud"
|
||||
PKG_URL="${PKG_SITE}/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain glslang mesa Python3 wayland libxcb"
|
||||
PKG_LONGDESC="A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more."
|
||||
PKG_PATCH_DIRS+="${DEVICE}"
|
||||
|
||||
if [ "${OPENGL_SUPPORT}" = "yes" ]; then
|
||||
PKG_DEPENDS_TARGET+=" ${OPENGL}"
|
||||
fi
|
||||
|
||||
if [ "${VULKAN_SUPPORT}" = "yes" ]
|
||||
then
|
||||
PKG_DEPENDS_TARGET+=" ${VULKAN}"
|
||||
fi
|
||||
|
||||
pre_configure_target() {
|
||||
PKG_MESON_OPTS_TARGET+=" -Dwith_xnvctrl=disabled \
|
||||
-Dwith_x11=enabled \
|
||||
-Dmangoplot=disabled \
|
||||
-Dwith_wayland=enabled"
|
||||
|
||||
# Download Sub Modules
|
||||
mkdir -p ${PKG_BUILD}/subprojects/
|
||||
|
||||
### vulkan-headers
|
||||
curl -Lo ${PKG_BUILD}/subprojects/vulkan-headers.tar.gz https://github.com/KhronosGroup/Vulkan-Headers/archive/v1.2.158.tar.gz
|
||||
tar -xvf ${PKG_BUILD}/subprojects/vulkan-headers.tar.gz -C ${PKG_BUILD}/subprojects/
|
||||
curl -Lo ${PKG_BUILD}/subprojects/vulkan-headers_patch.zip https://wrapdb.mesonbuild.com/v2/vulkan-headers_1.2.158-2/get_patch
|
||||
unzip -o ${PKG_BUILD}/subprojects/vulkan-headers_patch.zip -d ${PKG_BUILD}/subprojects
|
||||
rm -rf ${PKG_BUILD}/subprojects/vulkan-headers.tar.gz
|
||||
rm -rf ${PKG_BUILD}/subprojects/vulkan-headers_patches.zip
|
||||
|
||||
### imgui
|
||||
curl -Lo ${PKG_BUILD}/subprojects/imgui.tar.gz https://github.com/ocornut/imgui/archive/refs/tags/v1.89.9.tar.gz
|
||||
tar -xvf ${PKG_BUILD}/subprojects/imgui.tar.gz -C ${PKG_BUILD}/subprojects/
|
||||
curl -Lo ${PKG_BUILD}/subprojects/imgui_patch.zip https://wrapdb.mesonbuild.com/v2/imgui_1.89.9-1/get_patch
|
||||
unzip -o ${PKG_BUILD}/subprojects/imgui_patch.zip -d ${PKG_BUILD}/subprojects
|
||||
rm -rf ${PKG_BUILD}/subprojects/imgui.tar.gz
|
||||
rm -rf ${PKG_BUILD}/subprojects/imgui_patches.zip
|
||||
|
||||
### implot
|
||||
curl -Lo ${PKG_BUILD}/subprojects/implot.zip https://github.com/epezent/implot/archive/refs/tags/v0.16.zip
|
||||
unzip -o ${PKG_BUILD}/subprojects/implot.zip -d ${PKG_BUILD}/subprojects
|
||||
curl -Lo ${PKG_BUILD}/subprojects/implot_patch.zip https://wrapdb.mesonbuild.com/v2/implot_0.16-1/get_patch
|
||||
unzip -o ${PKG_BUILD}/subprojects/implot_patch.zip -d ${PKG_BUILD}/subprojects
|
||||
rm -rf ${PKG_BUILD}/subprojects/implot.zip
|
||||
rm -rf ${PKG_BUILD}/subprojects/implot_patches.zip
|
||||
|
||||
### spdlog
|
||||
curl -Lo ${PKG_BUILD}/subprojects/spdlog.tar.gz https://github.com/gabime/spdlog/archive/refs/tags/v1.14.1.tar.gz
|
||||
tar -xvf ${PKG_BUILD}/subprojects/spdlog.tar.gz -C ${PKG_BUILD}/subprojects/
|
||||
curl -Lo ${PKG_BUILD}/subprojects/spdlog_patch.zip https://wrapdb.mesonbuild.com/v2/spdlog_1.14.1-1/get_patch
|
||||
unzip -o ${PKG_BUILD}/subprojects/spdlog_patch.zip -d ${PKG_BUILD}/subprojects
|
||||
rm -rf ${PKG_BUILD}/subprojects/spdlog.tar.gz
|
||||
rm -rf ${PKG_BUILD}/subprojects/spdlog_patches.zip
|
||||
}
|
||||
|
||||
post_makeinstall_target() {
|
||||
mkdir -p ${INSTALL}/usr/bin
|
||||
cp -rf ${PKG_DIR}/sources/* ${INSTALL}/usr/bin
|
||||
chmod +x ${INSTALL}/usr/bin/*
|
||||
|
||||
mkdir -p ${INSTALL}/usr/config/MangoHud
|
||||
cp -rf ${PKG_DIR}/config/* ${INSTALL}/usr/config/MangoHud
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/src/meson.build b/src/meson.build
|
||||
index df7a164..54fcfbf 100644
|
||||
--- a/src/meson.build
|
||||
+++ b/src/meson.build
|
||||
@@ -176,7 +176,7 @@ if is_unixy
|
||||
endif
|
||||
endif
|
||||
|
||||
-link_args = cc.get_supported_link_arguments(['-Wl,-Bsymbolic-functions', '-Wl,-z,relro', '-Wl,--exclude-libs,ALL', '-lGL', '-static-libstdc++'])
|
||||
+link_args = cc.get_supported_link_arguments(['-Wl,-Bsymbolic-functions', '-Wl,-z,relro', '-Wl,--exclude-libs,ALL', '-lGL'])
|
||||
# meson fails to check version-script so just force add
|
||||
link_args += '-Wl,--version-script,@0@'.format(join_paths(meson.current_source_dir(), 'mangohud.version'))
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/src/battery.cpp b/src/battery.cpp
|
||||
index e5d311b..9cf8e5b 100644
|
||||
--- a/src/battery.cpp
|
||||
+++ b/src/battery.cpp
|
||||
@@ -13,7 +13,7 @@ void BatteryStats::numBattery() {
|
||||
fs::path path("/sys/class/power_supply/");
|
||||
for (auto& p : fs::directory_iterator(path)) {
|
||||
string fileName = p.path().filename();
|
||||
- if (fileName.find("BAT") != std::string::npos) {
|
||||
+ if (fileName.find("battery") != std::string::npos) {
|
||||
battPath[batteryCount] = p.path();
|
||||
batteryCount += 1;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/src/hud_elements.cpp b/src/hud_elements.cpp
|
||||
index 999ed7d..449a574 100644
|
||||
--- a/src/hud_elements.cpp
|
||||
+++ b/src/hud_elements.cpp
|
||||
@@ -784,7 +784,7 @@ void HudElements::procmem()
|
||||
return;
|
||||
|
||||
ImguiNextColumnFirstItem();
|
||||
- HUDElements.TextColored(HUDElements.colors.ram, "PMEM");
|
||||
+ HUDElements.TextColored(HUDElements.colors.ram, "RAM");
|
||||
ImguiNextColumnOrNewRow();
|
||||
right_aligned_text(HUDElements.colors.text, HUDElements.ralign_width, "%.1f", format_units(proc_mem_resident, unit));
|
||||
ImGui::SameLine(0, 1.0f);
|
||||
@@ -0,0 +1,45 @@
|
||||
diff --git a/src/gpu_fdinfo.cpp b/src/gpu_fdinfo.cpp
|
||||
index 84b5451..91ddb89 100644
|
||||
--- a/src/gpu_fdinfo.cpp
|
||||
+++ b/src/gpu_fdinfo.cpp
|
||||
@@ -167,7 +167,7 @@ void GPU_fdinfo::find_hwmon_sensors()
|
||||
std::string hwmon;
|
||||
|
||||
if (module == "msm")
|
||||
- hwmon = find_hwmon_sensor_dir("gpu");
|
||||
+ hwmon = find_hwmon_sensor_dir("gpu_top_thermal");
|
||||
else if (module == "panfrost")
|
||||
hwmon = find_hwmon_sensor_dir("gpu_thermal");
|
||||
else
|
||||
@@ -621,7 +621,7 @@ float GPU_fdinfo::amdgpu_helper_get_proc_vram() {
|
||||
}
|
||||
|
||||
void GPU_fdinfo::init_kgsl() {
|
||||
- const std::string sys_path = "/sys/class/kgsl/kgsl-3d0";
|
||||
+ const std::string sys_path = "/sys/class/devfreq/3d00000.gpu";
|
||||
|
||||
try {
|
||||
if (!fs::exists(sys_path)) {
|
||||
@@ -633,7 +633,7 @@ void GPU_fdinfo::init_kgsl() {
|
||||
return;
|
||||
}
|
||||
|
||||
- for (std::string metric : {"gpu_busy_percentage", "temp", "clock_mhz" }) {
|
||||
+ for (const std::string& metric : {"gpu_busy_percentage", "temp1_input", "cur_freq" }) {
|
||||
std::string p = sys_path + "/" + metric;
|
||||
|
||||
if (!fs::exists(p)) {
|
||||
@@ -643,10 +643,11 @@ void GPU_fdinfo::init_kgsl() {
|
||||
|
||||
SPDLOG_DEBUG("kgsl: {} found", p);
|
||||
|
||||
- if (metric == "clock_mhz")
|
||||
+ if (metric == "cur_freq") {
|
||||
gpu_clock_stream.open(p);
|
||||
- else
|
||||
+ } else {
|
||||
kgsl_streams[metric].open(p);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
diff --git a/src/cpu.cpp b/src/cpu.cpp
|
||||
index fc5067e..65937d9 100644
|
||||
--- a/src/cpu.cpp
|
||||
+++ b/src/cpu.cpp
|
||||
@@ -234,6 +234,11 @@ bool CPUStats::UpdateCPUData()
|
||||
|
||||
m_cpuPeriod = (double)m_cpuData[0].totalPeriod / m_cpuData.size();
|
||||
m_updatedCPUs = true;
|
||||
+
|
||||
+ if (m_cpuData.size() > 7) {
|
||||
+ m_cpuDataTotal.percent = m_cpuData[7].percent;
|
||||
+ }
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
|
||||
59
projects/ROCKNIX/packages/apps/mangohud/sources/mangohud_set
Normal file
59
projects/ROCKNIX/packages/apps/mangohud/sources/mangohud_set
Normal file
@@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2025-present ROCKNIX (https://github.com/ROCKNIX)
|
||||
|
||||
. /etc/profile
|
||||
|
||||
MHUD_SET=$1
|
||||
|
||||
### Confirm MangoHud dir exists
|
||||
if [ ! -d "/storage/.config/MangoHud" ]; then
|
||||
cp -r "/usr/config/MangoHud" "/storage/.config/"
|
||||
fi
|
||||
|
||||
### Confirm MangoHud conf exists
|
||||
if [ ! -f "/storage/.config/MangoHud/MangoHud.conf" ]; then
|
||||
cp -r "/usr/config/MangoHud/MangoHud.conf" "/storage/.config/MangoHud"
|
||||
fi
|
||||
|
||||
### Check if a value was sent to mangohud_set
|
||||
if [ ! -n "$MHUD_SET" ]; then
|
||||
MHUD_SET="NULL"
|
||||
fi
|
||||
|
||||
### Check that the value sent to manghud_set is a valid selection
|
||||
if [[ "$MHUD_SET" != "on" && "$MHUD_SET" != "off" && "$MHUD_SET" != "toggle" ]]; then
|
||||
echo "$MHUD_SET is not a valid choice, valid options are on | off | toggle, setting MangoHud to off."
|
||||
MHUD_SET="off"
|
||||
fi
|
||||
|
||||
CONF_DIR="/storage/.config/MangoHud"
|
||||
MANGOHUD_CONF="MangoHud.conf"
|
||||
|
||||
case $MHUD_SET in
|
||||
"off")
|
||||
sed -i '/no_display/c\no_display' ${CONF_DIR}/${MANGOHUD_CONF}
|
||||
set_setting "rocknix.mangohud.state" "off"
|
||||
echo "Turning MangoHud off."
|
||||
;;
|
||||
"on")
|
||||
sed -i '/no_display/c\# no_display' ${CONF_DIR}/${MANGOHUD_CONF}
|
||||
set_setting "rocknix.mangohud.state" "on"
|
||||
echo "Turning MangoHud on."
|
||||
;;
|
||||
"toggle")
|
||||
MHUD_STATE=$(get_setting "rocknix.mangohud.state")
|
||||
case ${MHUD_STATE} in
|
||||
"on")
|
||||
sed -i '/no_display/c\no_display' ${CONF_DIR}/${MANGOHUD_CONF}
|
||||
set_setting "rocknix.mangohud.state" "off"
|
||||
echo "Toggle MangoHud, turning MangoHud off."
|
||||
;;
|
||||
"off")
|
||||
sed -i '/no_display/c\# no_display' ${CONF_DIR}/${MANGOHUD_CONF}
|
||||
set_setting "rocknix.mangohud.state" "on"
|
||||
echo "Toggle MangoHud, turning MangoHud on."
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2025 ROCKNIX (https://github.com/ROCKNIX)
|
||||
|
||||
# Enable MangoHud support
|
||||
MANGOHUD_SUPPORTED=$(get_setting "rocknix.mangohud.supported")
|
||||
if [ ! -n "${MANGOHUD_SUPPORTED}" ]; then
|
||||
MANGOHUD_SUPPORTED="true"
|
||||
set_setting "rocknix.mangohud.supported" "${MANGOHUD_SUPPORTED}"
|
||||
fi
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)
|
||||
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
||||
@@ -393,6 +394,14 @@ CPU_GOVERNOR=$(get_setting "cpugovernor" "${PLATFORM}" "${ROMNAME##*/}")
|
||||
${VERBOSE} && log $0 "Set emulation performance mode to (${CPU_GOVERNOR})"
|
||||
${CPU_GOVERNOR}
|
||||
|
||||
# Check for MangoHud support and turn MangoHud off by defualt, will add ES feature later
|
||||
MANGOHUD_SUPPORTED=$(get_setting "rocknix.mangohud.supported")
|
||||
if [ "${MANGOHUD_SUPPORTED}" = "true" ]; then
|
||||
/usr/bin/mangohud_set "off"
|
||||
RUNTHIS="/usr/bin/mangohud ${RUNTHIS}"
|
||||
${VERBOSE} && log $0 "Enabling MangoHud"
|
||||
fi
|
||||
|
||||
# If the rom is a shell script just execute it, useful for DOSBOX and ScummVM scan scripts
|
||||
if [[ "${ROMNAME}" == *".sh" ]] && [ ! "${PLATFORM}" = "ports" ] && [ ! "${PLATFORM}" = "windows" ]; then
|
||||
${VERBOSE} && log $0 "Executing shell script ${ROMNAME}"
|
||||
|
||||
@@ -67,6 +67,7 @@ FUNCTION_HOTKEY_A_EVENT='*('${BTN_HOTKEY_A_MODIFIER}'), value *'
|
||||
FUNCTION_HOTKEY_B_EVENT='*('${BTN_HOTKEY_B_MODIFIER}'), value *'
|
||||
FUNCTION_HOTKEY_C_EVENT='*('${BTN_HOTKEY_C_MODIFIER}'), value *'
|
||||
|
||||
FUNCTION_HOTKEY_BTN_WEST_EVENT="*(BTN_WEST), value 1*"
|
||||
FUNCTION_HOTKEY_BTN_EAST_EVENT="*(BTN_EAST), value 1*"
|
||||
|
||||
FUNCTION_HOTKEY_TOUCH_EVENT="*(BTN_TOUCH), value 1*"
|
||||
@@ -375,5 +376,11 @@ set +e
|
||||
/usr/bin/rocknix-screenshot
|
||||
fi
|
||||
;;
|
||||
(${FUNCTION_HOTKEY_BTN_WEST_EVENT})
|
||||
if [ "${FN_A_PRESSED}" = true ]; then
|
||||
${DEBUG} && log $0 "${FUNCTION_HOTKEY_BTN_WEST_EVENT}: Config Mangohug"
|
||||
/usr/bin/mangohud_set toggle
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
@@ -7,7 +7,7 @@ PKG_SITE="https://rocknix.org"
|
||||
PKG_SECTION="virtual"
|
||||
PKG_LONGDESC="Game support software metapackage."
|
||||
|
||||
PKG_GAMESUPPORT="sixaxis rocknix-hotkey jstest-sdl gamecontrollerdb sdljoytest sdltouchtest control-gen rocknix-touchscreen-keyboard"
|
||||
PKG_GAMESUPPORT="sixaxis rocknix-hotkey jstest-sdl gamecontrollerdb sdljoytest sdltouchtest control-gen rocknix-touchscreen-keyboard mangohud"
|
||||
|
||||
PKG_DEPENDS_TARGET="${PKG_GAMESUPPORT}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user