2020-07-06 17:31:40 +00:00
|
|
|
#pragma once
|
|
|
|
#ifndef MANGOHUD_OVERLAY_PARAMS_H
|
|
|
|
#define MANGOHUD_OVERLAY_PARAMS_H
|
2020-01-28 04:11:05 +00:00
|
|
|
|
2020-03-02 09:35:11 +00:00
|
|
|
#include <string>
|
2020-05-06 02:10:45 +00:00
|
|
|
#include <vector>
|
2020-03-16 16:32:48 +00:00
|
|
|
#include <unordered_map>
|
2023-05-07 21:01:10 +00:00
|
|
|
#include <cstdint>
|
2024-04-10 07:44:59 +00:00
|
|
|
#include <condition_variable>
|
|
|
|
#include <mutex>
|
2020-03-02 09:35:11 +00:00
|
|
|
|
2020-01-28 04:11:05 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
2020-04-01 12:37:42 +00:00
|
|
|
|
|
|
|
#ifndef KeySym
|
|
|
|
typedef unsigned long KeySym;
|
|
|
|
#endif
|
2020-01-28 04:11:05 +00:00
|
|
|
|
2020-03-05 21:19:04 +00:00
|
|
|
#define RGBGetBValue(rgb) (rgb & 0x000000FF)
|
|
|
|
#define RGBGetGValue(rgb) ((rgb >> 8) & 0x000000FF)
|
|
|
|
#define RGBGetRValue(rgb) ((rgb >> 16) & 0x000000FF)
|
|
|
|
|
|
|
|
#define ToRGBColor(r, g, b, a) ((r << 16) | (g << 8) | (b));
|
|
|
|
|
2020-01-28 04:11:05 +00:00
|
|
|
#define OVERLAY_PARAMS \
|
|
|
|
OVERLAY_PARAM_BOOL(fps) \
|
|
|
|
OVERLAY_PARAM_BOOL(frame_timing) \
|
|
|
|
OVERLAY_PARAM_BOOL(core_load) \
|
2023-08-11 01:18:40 +00:00
|
|
|
OVERLAY_PARAM_BOOL(core_bars) \
|
2020-01-28 04:11:05 +00:00
|
|
|
OVERLAY_PARAM_BOOL(cpu_temp) \
|
2020-11-12 21:27:35 +00:00
|
|
|
OVERLAY_PARAM_BOOL(cpu_power) \
|
2020-01-28 04:11:05 +00:00
|
|
|
OVERLAY_PARAM_BOOL(gpu_temp) \
|
2022-09-29 07:33:11 +00:00
|
|
|
OVERLAY_PARAM_BOOL(gpu_junction_temp) \
|
|
|
|
OVERLAY_PARAM_BOOL(gpu_mem_temp) \
|
2020-02-05 02:43:44 +00:00
|
|
|
OVERLAY_PARAM_BOOL(cpu_stats) \
|
|
|
|
OVERLAY_PARAM_BOOL(gpu_stats) \
|
|
|
|
OVERLAY_PARAM_BOOL(ram) \
|
2020-12-13 10:07:17 +00:00
|
|
|
OVERLAY_PARAM_BOOL(swap) \
|
2020-02-05 02:43:44 +00:00
|
|
|
OVERLAY_PARAM_BOOL(vram) \
|
2021-08-07 12:55:04 +00:00
|
|
|
OVERLAY_PARAM_BOOL(procmem) \
|
|
|
|
OVERLAY_PARAM_BOOL(procmem_shared) \
|
|
|
|
OVERLAY_PARAM_BOOL(procmem_virt) \
|
2020-02-12 17:24:00 +00:00
|
|
|
OVERLAY_PARAM_BOOL(time) \
|
2020-02-12 15:52:54 +00:00
|
|
|
OVERLAY_PARAM_BOOL(full) \
|
2020-02-18 09:47:58 +00:00
|
|
|
OVERLAY_PARAM_BOOL(read_cfg) \
|
2020-03-01 18:36:55 +00:00
|
|
|
OVERLAY_PARAM_BOOL(io_read) \
|
|
|
|
OVERLAY_PARAM_BOOL(io_write) \
|
2020-03-01 21:01:59 +00:00
|
|
|
OVERLAY_PARAM_BOOL(gpu_mem_clock) \
|
|
|
|
OVERLAY_PARAM_BOOL(gpu_core_clock) \
|
2020-05-22 12:44:34 +00:00
|
|
|
OVERLAY_PARAM_BOOL(gpu_power) \
|
2020-03-23 19:11:53 +00:00
|
|
|
OVERLAY_PARAM_BOOL(arch) \
|
2020-02-03 22:31:44 +00:00
|
|
|
OVERLAY_PARAM_BOOL(media_player) \
|
2020-05-02 16:39:39 +00:00
|
|
|
OVERLAY_PARAM_BOOL(version) \
|
2020-05-10 00:22:44 +00:00
|
|
|
OVERLAY_PARAM_BOOL(vulkan_driver) \
|
2020-05-10 00:21:39 +00:00
|
|
|
OVERLAY_PARAM_BOOL(gpu_name) \
|
2020-05-23 21:16:08 +00:00
|
|
|
OVERLAY_PARAM_BOOL(engine_version) \
|
2020-05-24 15:17:17 +00:00
|
|
|
OVERLAY_PARAM_BOOL(histogram) \
|
2020-07-18 19:18:27 +00:00
|
|
|
OVERLAY_PARAM_BOOL(wine) \
|
2020-09-29 04:24:26 +00:00
|
|
|
OVERLAY_PARAM_BOOL(gpu_load_change) \
|
2020-10-05 23:41:59 +00:00
|
|
|
OVERLAY_PARAM_BOOL(cpu_load_change) \
|
2020-11-30 00:10:56 +00:00
|
|
|
OVERLAY_PARAM_BOOL(core_load_change) \
|
2020-11-06 23:01:23 +00:00
|
|
|
OVERLAY_PARAM_BOOL(graphs) \
|
2020-11-09 00:33:38 +00:00
|
|
|
OVERLAY_PARAM_BOOL(legacy_layout) \
|
2020-11-11 22:11:21 +00:00
|
|
|
OVERLAY_PARAM_BOOL(cpu_mhz) \
|
2020-11-16 23:37:03 +00:00
|
|
|
OVERLAY_PARAM_BOOL(frametime) \
|
2022-05-04 04:14:46 +00:00
|
|
|
OVERLAY_PARAM_BOOL(frame_count) \
|
2020-11-30 20:11:38 +00:00
|
|
|
OVERLAY_PARAM_BOOL(resolution) \
|
2020-12-01 02:36:20 +00:00
|
|
|
OVERLAY_PARAM_BOOL(show_fps_limit) \
|
2020-12-10 03:36:45 +00:00
|
|
|
OVERLAY_PARAM_BOOL(fps_color_change) \
|
2020-12-14 05:38:10 +00:00
|
|
|
OVERLAY_PARAM_BOOL(custom_text_center) \
|
|
|
|
OVERLAY_PARAM_BOOL(custom_text) \
|
2020-12-14 05:54:29 +00:00
|
|
|
OVERLAY_PARAM_BOOL(exec) \
|
2020-12-14 19:11:14 +00:00
|
|
|
OVERLAY_PARAM_BOOL(vkbasalt) \
|
|
|
|
OVERLAY_PARAM_BOOL(gamemode) \
|
2021-06-08 23:04:33 +00:00
|
|
|
OVERLAY_PARAM_BOOL(battery) \
|
|
|
|
OVERLAY_PARAM_BOOL(battery_icon) \
|
2022-01-03 03:30:52 +00:00
|
|
|
OVERLAY_PARAM_BOOL(fps_only) \
|
2022-02-08 23:32:17 +00:00
|
|
|
OVERLAY_PARAM_BOOL(fsr) \
|
2022-02-14 10:01:03 +00:00
|
|
|
OVERLAY_PARAM_BOOL(mangoapp_steam) \
|
2022-02-15 09:19:02 +00:00
|
|
|
OVERLAY_PARAM_BOOL(debug) \
|
2023-09-14 01:12:08 +00:00
|
|
|
OVERLAY_PARAM_BOOL(device_battery_icon) \
|
2022-03-08 16:51:06 +00:00
|
|
|
OVERLAY_PARAM_BOOL(hide_fsr_sharpness) \
|
2022-04-04 05:07:31 +00:00
|
|
|
OVERLAY_PARAM_BOOL(fan) \
|
2022-05-03 09:00:05 +00:00
|
|
|
OVERLAY_PARAM_BOOL(throttling_status) \
|
2023-09-21 20:20:22 +00:00
|
|
|
OVERLAY_PARAM_BOOL(throttling_status_graph) \
|
2022-04-19 17:37:29 +00:00
|
|
|
OVERLAY_PARAM_BOOL(fcat) \
|
2022-07-27 23:19:16 +00:00
|
|
|
OVERLAY_PARAM_BOOL(log_versioning) \
|
2022-09-05 11:50:04 +00:00
|
|
|
OVERLAY_PARAM_BOOL(horizontal) \
|
2023-05-05 05:41:34 +00:00
|
|
|
OVERLAY_PARAM_BOOL(horizontal_stretch) \
|
2022-09-05 11:50:04 +00:00
|
|
|
OVERLAY_PARAM_BOOL(hud_no_margin) \
|
2022-11-12 07:50:54 +00:00
|
|
|
OVERLAY_PARAM_BOOL(hud_compact) \
|
2023-03-12 13:01:04 +00:00
|
|
|
OVERLAY_PARAM_BOOL(battery_watt) \
|
|
|
|
OVERLAY_PARAM_BOOL(battery_time) \
|
2023-01-08 04:25:50 +00:00
|
|
|
OVERLAY_PARAM_BOOL(exec_name) \
|
2023-04-01 18:48:02 +00:00
|
|
|
OVERLAY_PARAM_BOOL(trilinear) \
|
2023-04-02 22:02:24 +00:00
|
|
|
OVERLAY_PARAM_BOOL(bicubic) \
|
2023-04-02 22:04:19 +00:00
|
|
|
OVERLAY_PARAM_BOOL(retro) \
|
2023-04-20 01:07:39 +00:00
|
|
|
OVERLAY_PARAM_BOOL(gpu_fan) \
|
2023-07-19 23:06:02 +00:00
|
|
|
OVERLAY_PARAM_BOOL(gpu_voltage) \
|
2023-05-05 00:01:00 +00:00
|
|
|
OVERLAY_PARAM_BOOL(engine_short_names) \
|
2023-05-27 06:30:07 +00:00
|
|
|
OVERLAY_PARAM_BOOL(text_outline) \
|
2023-06-11 17:33:36 +00:00
|
|
|
OVERLAY_PARAM_BOOL(temp_fahrenheit) \
|
2023-06-12 20:38:29 +00:00
|
|
|
OVERLAY_PARAM_BOOL(dynamic_frame_timing) \
|
2023-06-19 17:47:16 +00:00
|
|
|
OVERLAY_PARAM_BOOL(duration) \
|
2023-09-18 17:01:57 +00:00
|
|
|
OVERLAY_PARAM_BOOL(inherit) \
|
2023-11-07 19:55:06 +00:00
|
|
|
OVERLAY_PARAM_BOOL(hdr) \
|
|
|
|
OVERLAY_PARAM_BOOL(refresh_rate) \
|
2023-12-05 15:20:10 +00:00
|
|
|
OVERLAY_PARAM_BOOL(frame_timing_detailed) \
|
2023-11-14 05:17:00 +00:00
|
|
|
OVERLAY_PARAM_BOOL(winesync) \
|
2024-02-05 21:17:00 +00:00
|
|
|
OVERLAY_PARAM_BOOL(present_mode) \
|
2024-02-10 17:24:32 +00:00
|
|
|
OVERLAY_PARAM_BOOL(time_no_label) \
|
2020-01-28 04:11:05 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(fps_sampling_period) \
|
2020-08-15 13:14:55 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(output_folder) \
|
2020-08-16 13:11:53 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(output_file) \
|
2020-03-13 15:18:47 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(font_file) \
|
2020-06-29 14:15:50 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(font_file_text) \
|
|
|
|
OVERLAY_PARAM_CUSTOM(font_glyph_ranges) \
|
2020-09-23 11:02:27 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(no_small_font) \
|
2020-06-29 14:15:50 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(font_size) \
|
|
|
|
OVERLAY_PARAM_CUSTOM(font_size_text) \
|
|
|
|
OVERLAY_PARAM_CUSTOM(font_scale) \
|
|
|
|
OVERLAY_PARAM_CUSTOM(font_scale_media_player) \
|
2020-01-28 04:11:05 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(position) \
|
|
|
|
OVERLAY_PARAM_CUSTOM(width) \
|
|
|
|
OVERLAY_PARAM_CUSTOM(height) \
|
|
|
|
OVERLAY_PARAM_CUSTOM(no_display) \
|
|
|
|
OVERLAY_PARAM_CUSTOM(control) \
|
2020-02-07 11:14:59 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(fps_limit) \
|
2023-03-16 01:57:10 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(fps_limit_method) \
|
2020-02-07 12:12:58 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(vsync) \
|
2020-03-12 10:11:31 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(gl_vsync) \
|
2021-03-30 01:56:38 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(gl_size_query) \
|
|
|
|
OVERLAY_PARAM_CUSTOM(gl_bind_framebuffer) \
|
|
|
|
OVERLAY_PARAM_CUSTOM(gl_dont_flip) \
|
2020-02-09 11:10:41 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(toggle_hud) \
|
2022-12-12 15:23:47 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(toggle_hud_position) \
|
2023-07-07 04:23:12 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(toggle_preset) \
|
2020-08-17 06:09:01 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(toggle_fps_limit) \
|
2020-02-09 11:10:41 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(toggle_logging) \
|
2024-01-31 13:21:18 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(reset_fps_metrics) \
|
2020-03-13 13:57:11 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(reload_cfg) \
|
2020-06-19 11:57:44 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(upload_log) \
|
2020-08-01 23:10:21 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(upload_logs) \
|
2020-02-10 16:37:37 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(offset_x) \
|
|
|
|
OVERLAY_PARAM_CUSTOM(offset_y) \
|
2020-02-12 03:51:08 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(background_alpha) \
|
2020-03-02 09:35:11 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(time_format) \
|
2020-02-16 00:52:14 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(io_read) \
|
|
|
|
OVERLAY_PARAM_CUSTOM(io_write) \
|
2020-03-10 03:51:27 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(cpu_color) \
|
|
|
|
OVERLAY_PARAM_CUSTOM(gpu_color) \
|
|
|
|
OVERLAY_PARAM_CUSTOM(vram_color) \
|
|
|
|
OVERLAY_PARAM_CUSTOM(ram_color) \
|
|
|
|
OVERLAY_PARAM_CUSTOM(engine_color) \
|
2020-03-10 05:30:37 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(frametime_color) \
|
2020-03-10 06:48:04 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(background_color) \
|
2020-03-10 04:01:31 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(io_color) \
|
2020-03-11 05:20:18 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(text_color) \
|
2020-11-06 23:01:23 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(wine_color) \
|
2021-03-25 00:16:58 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(battery_color) \
|
2024-03-30 07:28:38 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(network_color) \
|
2020-03-11 05:07:41 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(alpha) \
|
2020-03-13 15:27:45 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(log_duration) \
|
2020-05-02 14:40:05 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(pci_dev) \
|
2020-05-11 19:01:40 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(media_player_name) \
|
|
|
|
OVERLAY_PARAM_CUSTOM(media_player_color) \
|
2021-09-09 17:52:52 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(media_player_format) \
|
2020-06-01 00:08:35 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(cpu_text) \
|
|
|
|
OVERLAY_PARAM_CUSTOM(gpu_text) \
|
2020-06-03 22:52:11 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(log_interval) \
|
2020-06-19 11:57:44 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(permit_upload) \
|
2020-06-18 22:42:25 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(benchmark_percentiles) \
|
2020-09-29 04:24:26 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(help) \
|
2020-10-20 05:11:26 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(gpu_load_value) \
|
|
|
|
OVERLAY_PARAM_CUSTOM(cpu_load_value) \
|
2020-11-06 23:01:23 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(gpu_load_color) \
|
|
|
|
OVERLAY_PARAM_CUSTOM(cpu_load_color) \
|
2020-12-10 03:36:45 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(fps_value) \
|
|
|
|
OVERLAY_PARAM_CUSTOM(fps_color) \
|
2020-11-16 11:53:38 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(cellpadding_y) \
|
2020-11-17 14:09:15 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(table_columns) \
|
2020-11-15 05:58:01 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(blacklist) \
|
2020-11-27 13:17:43 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(autostart_log) \
|
2021-04-30 04:06:22 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(round_corners) \
|
2022-03-08 16:36:13 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(fsr_steam_sharpness) \
|
2022-04-19 17:37:29 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(fcat_screen_edge) \
|
|
|
|
OVERLAY_PARAM_CUSTOM(fcat_overlay_width) \
|
2023-04-01 17:42:43 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(picmip) \
|
2023-04-01 18:47:14 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(af) \
|
2023-05-27 06:30:07 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(text_outline_color) \
|
|
|
|
OVERLAY_PARAM_CUSTOM(text_outline_thickness) \
|
2023-07-24 11:10:24 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(fps_text) \
|
2023-09-14 01:12:08 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(device_battery) \
|
2023-10-31 14:36:35 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(fps_metrics) \
|
2024-03-30 07:28:38 +00:00
|
|
|
OVERLAY_PARAM_CUSTOM(network) \
|
2020-01-28 04:11:05 +00:00
|
|
|
|
|
|
|
enum overlay_param_position {
|
|
|
|
LAYER_POSITION_TOP_LEFT,
|
2022-12-12 15:23:47 +00:00
|
|
|
LAYER_POSITION_TOP_CENTER,
|
2020-01-28 04:11:05 +00:00
|
|
|
LAYER_POSITION_TOP_RIGHT,
|
2021-07-04 19:17:43 +00:00
|
|
|
LAYER_POSITION_MIDDLE_LEFT,
|
|
|
|
LAYER_POSITION_MIDDLE_RIGHT,
|
2020-01-28 04:11:05 +00:00
|
|
|
LAYER_POSITION_BOTTOM_LEFT,
|
2023-03-11 18:55:03 +00:00
|
|
|
LAYER_POSITION_BOTTOM_CENTER,
|
2020-01-28 04:11:05 +00:00
|
|
|
LAYER_POSITION_BOTTOM_RIGHT,
|
2022-12-12 15:23:47 +00:00
|
|
|
// Count must always be the last entry
|
|
|
|
LAYER_POSITION_COUNT,
|
2020-01-28 04:11:05 +00:00
|
|
|
};
|
|
|
|
|
2020-03-24 19:38:08 +00:00
|
|
|
enum overlay_plots {
|
|
|
|
OVERLAY_PLOTS_frame_timing,
|
|
|
|
OVERLAY_PLOTS_MAX,
|
|
|
|
};
|
|
|
|
|
2020-06-29 14:15:50 +00:00
|
|
|
enum font_glyph_ranges {
|
|
|
|
FG_KOREAN = (1u << 0),
|
|
|
|
FG_CHINESE_FULL = (1u << 1),
|
|
|
|
FG_CHINESE_SIMPLIFIED = (1u << 2),
|
|
|
|
FG_JAPANESE = (1u << 3),
|
|
|
|
FG_CYRILLIC = (1u << 4),
|
|
|
|
FG_THAI = (1u << 5),
|
|
|
|
FG_VIETNAMESE = (1u << 6),
|
|
|
|
FG_LATIN_EXT_A = (1u << 7),
|
|
|
|
FG_LATIN_EXT_B = (1u << 8),
|
|
|
|
};
|
|
|
|
|
2021-03-30 01:56:38 +00:00
|
|
|
enum gl_size_query {
|
|
|
|
GL_SIZE_DRAWABLE,
|
|
|
|
GL_SIZE_VIEWPORT,
|
|
|
|
GL_SIZE_SCISSORBOX, // needed?
|
|
|
|
};
|
|
|
|
|
2023-03-16 01:57:10 +00:00
|
|
|
enum fps_limit_method {
|
|
|
|
FPS_LIMIT_METHOD_EARLY,
|
|
|
|
FPS_LIMIT_METHOD_LATE
|
|
|
|
};
|
|
|
|
|
2020-01-28 04:11:05 +00:00
|
|
|
enum overlay_param_enabled {
|
|
|
|
#define OVERLAY_PARAM_BOOL(name) OVERLAY_PARAM_ENABLED_##name,
|
|
|
|
#define OVERLAY_PARAM_CUSTOM(name)
|
|
|
|
OVERLAY_PARAMS
|
|
|
|
#undef OVERLAY_PARAM_BOOL
|
|
|
|
#undef OVERLAY_PARAM_CUSTOM
|
|
|
|
OVERLAY_PARAM_ENABLED_MAX
|
|
|
|
};
|
|
|
|
|
|
|
|
struct overlay_params {
|
|
|
|
bool enabled[OVERLAY_PARAM_ENABLED_MAX];
|
|
|
|
enum overlay_param_position position;
|
|
|
|
int control;
|
2020-12-13 13:27:23 +00:00
|
|
|
uint32_t fps_sampling_period; /* ns */
|
2020-08-17 06:09:01 +00:00
|
|
|
std::vector<std::uint32_t> fps_limit;
|
2023-03-16 01:57:10 +00:00
|
|
|
enum fps_limit_method fps_limit_method;
|
2020-01-28 04:11:05 +00:00
|
|
|
bool help;
|
|
|
|
bool no_display;
|
2020-02-12 15:52:54 +00:00
|
|
|
bool full;
|
2020-11-03 14:35:10 +00:00
|
|
|
bool io_read, io_write, io_stats;
|
2020-01-28 04:11:05 +00:00
|
|
|
unsigned width;
|
|
|
|
unsigned height;
|
2020-03-10 09:18:59 +00:00
|
|
|
int offset_x, offset_y;
|
2021-04-30 04:06:22 +00:00
|
|
|
float round_corners;
|
2020-02-07 12:12:58 +00:00
|
|
|
unsigned vsync;
|
2020-03-12 10:11:31 +00:00
|
|
|
int gl_vsync;
|
2021-03-30 01:56:38 +00:00
|
|
|
int gl_bind_framebuffer {-1};
|
|
|
|
enum gl_size_query gl_size_query {GL_SIZE_DRAWABLE};
|
|
|
|
bool gl_dont_flip {false};
|
2022-07-26 06:38:12 +00:00
|
|
|
int64_t log_duration, log_interval;
|
2024-03-30 07:28:38 +00:00
|
|
|
unsigned cpu_color, gpu_color, vram_color, ram_color,
|
|
|
|
engine_color, io_color, frametime_color, background_color,
|
|
|
|
text_color, wine_color, battery_color, network_color;
|
2020-10-20 03:41:39 +00:00
|
|
|
std::vector<unsigned> gpu_load_color;
|
2020-10-20 04:06:10 +00:00
|
|
|
std::vector<unsigned> cpu_load_color;
|
2020-10-20 05:11:26 +00:00
|
|
|
std::vector<unsigned> gpu_load_value;
|
|
|
|
std::vector<unsigned> cpu_load_value;
|
2020-12-10 03:36:45 +00:00
|
|
|
std::vector<unsigned> fps_color;
|
|
|
|
std::vector<unsigned> fps_value;
|
2020-05-11 19:01:40 +00:00
|
|
|
unsigned media_player_color;
|
2020-11-17 14:09:15 +00:00
|
|
|
unsigned table_columns;
|
2020-09-23 11:02:27 +00:00
|
|
|
bool no_small_font;
|
2020-06-29 14:15:50 +00:00
|
|
|
float font_size, font_scale;
|
|
|
|
float font_size_text;
|
2020-05-24 13:42:35 +00:00
|
|
|
float font_scale_media_player;
|
2020-03-11 05:07:41 +00:00
|
|
|
float background_alpha, alpha;
|
2020-11-16 11:53:38 +00:00
|
|
|
float cellpadding_y;
|
2020-05-06 02:10:45 +00:00
|
|
|
std::vector<KeySym> toggle_hud;
|
2023-07-07 04:23:12 +00:00
|
|
|
std::vector<KeySym> toggle_preset;
|
2020-08-17 06:09:01 +00:00
|
|
|
std::vector<KeySym> toggle_fps_limit;
|
2020-05-06 02:10:45 +00:00
|
|
|
std::vector<KeySym> toggle_logging;
|
|
|
|
std::vector<KeySym> reload_cfg;
|
2020-06-19 11:57:44 +00:00
|
|
|
std::vector<KeySym> upload_log;
|
2020-08-01 23:10:21 +00:00
|
|
|
std::vector<KeySym> upload_logs;
|
2022-12-12 15:23:47 +00:00
|
|
|
std::vector<KeySym> toggle_hud_position;
|
2024-01-31 13:21:18 +00:00
|
|
|
std::vector<KeySym> reset_fps_metrics;
|
2020-08-16 13:11:53 +00:00
|
|
|
std::string time_format, output_folder, output_file;
|
2020-05-02 14:40:05 +00:00
|
|
|
std::string pci_dev;
|
2020-05-11 19:01:40 +00:00
|
|
|
std::string media_player_name;
|
2023-07-24 11:10:24 +00:00
|
|
|
std::string cpu_text, gpu_text, fps_text;
|
2020-11-19 00:19:00 +00:00
|
|
|
std::vector<std::string> blacklist;
|
2022-07-26 06:38:12 +00:00
|
|
|
unsigned autostart_log;
|
2021-09-09 17:52:52 +00:00
|
|
|
std::vector<std::string> media_player_format;
|
2020-06-18 22:42:25 +00:00
|
|
|
std::vector<std::string> benchmark_percentiles;
|
2020-06-29 14:15:50 +00:00
|
|
|
std::string font_file, font_file_text;
|
|
|
|
uint32_t font_glyph_ranges;
|
2020-12-09 01:02:50 +00:00
|
|
|
std::string custom_text_center;
|
|
|
|
std::string custom_text;
|
2020-03-16 16:32:48 +00:00
|
|
|
std::string config_file_path;
|
|
|
|
std::unordered_map<std::string,std::string> options;
|
2020-06-19 11:57:44 +00:00
|
|
|
int permit_upload;
|
2022-03-08 16:36:13 +00:00
|
|
|
int fsr_steam_sharpness;
|
2022-04-19 17:37:29 +00:00
|
|
|
unsigned short fcat_screen_edge;
|
|
|
|
unsigned short fcat_overlay_width;
|
2023-04-01 17:42:43 +00:00
|
|
|
int picmip;
|
2023-04-01 18:47:14 +00:00
|
|
|
int af;
|
2023-07-07 04:23:12 +00:00
|
|
|
std::vector<int> preset;
|
2020-11-16 13:51:37 +00:00
|
|
|
size_t font_params_hash;
|
2023-05-27 06:30:07 +00:00
|
|
|
unsigned text_outline_color;
|
|
|
|
float text_outline_thickness;
|
2023-09-14 01:12:08 +00:00
|
|
|
std::vector<std::string> device_battery;
|
2023-10-31 14:36:35 +00:00
|
|
|
std::vector<std::string> fps_metrics;
|
2024-03-30 07:28:38 +00:00
|
|
|
std::vector<std::string> network;
|
2020-01-28 04:11:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const extern char *overlay_param_names[];
|
|
|
|
|
2020-02-15 21:21:32 +00:00
|
|
|
void parse_overlay_config(struct overlay_params *params,
|
2023-07-07 04:23:12 +00:00
|
|
|
const char *env, bool ignore_preset);
|
2023-09-18 17:01:57 +00:00
|
|
|
void presets(int preset, struct overlay_params *params, bool inherit=false);
|
2023-04-06 06:35:44 +00:00
|
|
|
bool parse_preset_config(int preset, struct overlay_params *params);
|
|
|
|
void add_to_options(struct overlay_params *params, std::string option, std::string value);
|
2020-01-28 04:11:05 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2024-04-10 07:44:59 +00:00
|
|
|
extern std::mutex config_mtx;
|
|
|
|
extern std::condition_variable config_cv;
|
|
|
|
extern bool config_ready;
|
2020-01-28 04:11:05 +00:00
|
|
|
|
2020-07-06 17:31:40 +00:00
|
|
|
#endif /* MANGOHUD_OVERLAY_PARAMS_H */
|