From aa77a351deba3edbf1a8f41645283da4e0d39476 Mon Sep 17 00:00:00 2001 From: Kingsley McDonald Date: Thu, 18 Jun 2020 23:42:25 +0100 Subject: [PATCH 1/8] implement configurable benchmark percentiles. --- bin/MangoHud.conf | 8 ++++++- src/overlay.cpp | 50 +++++++++++++++++++++++++----------------- src/overlay.h | 7 ++---- src/overlay_params.cpp | 34 ++++++++++++++++++++++++++++ src/overlay_params.h | 5 +++++ 5 files changed, 78 insertions(+), 26 deletions(-) diff --git a/bin/MangoHud.conf b/bin/MangoHud.conf index 652a933f..f4cb0346 100644 --- a/bin/MangoHud.conf +++ b/bin/MangoHud.conf @@ -117,5 +117,11 @@ background_alpha=0.5 # log_duration ### Define name and location of the output file (Required for logging) # output_file +<<<<<<< HEAD ### Permit uploading logs directly to Flightlessmango.com -# permit_upload=1 \ No newline at end of file +# permit_upload=1 +======= +### 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 +# benchmark_percentiles= +>>>>>>> 6d4ed4e... implement configurable benchmark percentiles. diff --git a/src/overlay.cpp b/src/overlay.cpp index 183630ff..7263f526 100644 --- a/src/overlay.cpp +++ b/src/overlay.cpp @@ -750,7 +750,7 @@ void check_keybinds(struct swapchain_stats& sw_stats, struct overlay_params& par last_f2_press = now; if(loggingOn){ log_end = now; - std::thread(calculate_benchmark_data).detach(); + std::thread(calculate_benchmark_data, ¶ms).detach(); } else { logUpdate = false; std::thread(update_hw_info, std::ref(sw_stats), std::ref(params), vendorID).detach(); @@ -805,27 +805,38 @@ void check_keybinds(struct swapchain_stats& sw_stats, struct overlay_params& par } } -void calculate_benchmark_data(){ - vector sorted; - sorted = benchmark.fps_data; +void calculate_benchmark_data(void *params_void){ + overlay_params *params = reinterpret_cast(params_void); + + vector sorted = benchmark.fps_data; sort(sorted.begin(), sorted.end()); - // 97th percentile - int index = sorted.size() * 0.97; - benchmark.ninety = sorted[index]; - // avg + benchmark.percentile_data.clear(); + benchmark.total = 0.f; for (auto fps_ : sorted){ benchmark.total = benchmark.total + fps_; } - benchmark.avg = benchmark.total / sorted.size(); - // 1% min - benchmark.total = 0.f; - for (size_t i = 0; i < sorted.size() * 0.01; i++){ - benchmark.total = sorted[i]; + + for (std::string percentile : params->benchmark_percentiles) { + float result; + + // special case handling for a mean-based average + if (percentile.find("AVG") == 0) { + result = benchmark.total / sorted.size(); + } + // everything else is used to calculate percentiles + else { + char *endChar; + float fraction = std::strtof(percentile.c_str(), &endChar) / 100; + + if (*endChar != '%' || fraction <= 0.0 || fraction > 1.0) { + std::cerr << "MANGOHUD: Invalid percentile value for benchmark: '" << percentile << "'\n"; + continue; + } + result = sorted[(fraction * sorted.size()) - 1]; + } + benchmark.percentile_data.push_back({percentile, result}); } - benchmark.oneP = benchmark.total; - // 0.1% min - benchmark.pointOneP = sorted[sorted.size() * 0.001]; } void update_hud_info(struct swapchain_stats& sw_stats, struct overlay_params& params, uint32_t vendorID){ @@ -1040,14 +1051,13 @@ static void render_mpris_metadata(struct overlay_params& params, metadata& meta, void render_benchmark(swapchain_stats& data, struct overlay_params& params, ImVec2& window_size, unsigned height, uint64_t now){ // TODO, FIX LOG_DURATION FOR BENCHMARK - int benchHeight = 6 * params.font_size + 10.0f + 58; + int benchHeight = (2 + benchmark.percentile_data.size()) * params.font_size + 10.0f + 58; ImGui::SetNextWindowSize(ImVec2(window_size.x, benchHeight), ImGuiCond_Always); if (height - (window_size.y + data.main_window_pos.y + 5) < benchHeight) ImGui::SetNextWindowPos(ImVec2(data.main_window_pos.x, data.main_window_pos.y - benchHeight - 5), ImGuiCond_Always); else ImGui::SetNextWindowPos(ImVec2(data.main_window_pos.x, data.main_window_pos.y + window_size.y + 5), ImGuiCond_Always); - vector> benchmark_data = {{"97% ", benchmark.ninety}, {"AVG ", benchmark.avg}, {"1% ", benchmark.oneP}, {"0.1%", benchmark.pointOneP}}; float display_time = float(now - log_end) / 1000000; static float display_for = 10.0f; float alpha; @@ -1085,7 +1095,7 @@ void render_benchmark(swapchain_stats& data, struct overlay_params& params, ImVe snprintf(duration, sizeof(duration), "Duration: %.1fs", float(log_end - log_start) / 1000000); ImGui::SetCursorPosX((ImGui::GetWindowSize().x / 2 )- (ImGui::CalcTextSize(duration).x / 2)); ImGui::TextColored(ImVec4(1.0, 1.0, 1.0, alpha / params.background_alpha), "%s", duration); - for (auto& data_ : benchmark_data){ + for (auto& data_ : benchmark.percentile_data){ char buffer[20]; snprintf(buffer, sizeof(buffer), "%s %.1f", data_.first.c_str(), data_.second); ImGui::SetCursorPosX((ImGui::GetWindowSize().x / 2 )- (ImGui::CalcTextSize(buffer).x / 2)); @@ -1394,7 +1404,7 @@ void render_imgui(swapchain_stats& data, struct overlay_params& params, ImVec2& if (loggingOn && params.log_duration && (now - log_start) >= params.log_duration * 1000000){ loggingOn = false; log_end = now; - std::thread(calculate_benchmark_data).detach(); + std::thread(calculate_benchmark_data, ¶ms).detach(); } if((now - log_end) / 1000000 < 12) render_benchmark(data, params, window_size, height, now); diff --git a/src/overlay.h b/src/overlay.h index 45521948..5528781c 100644 --- a/src/overlay.h +++ b/src/overlay.h @@ -52,12 +52,9 @@ struct fps_limit { }; struct benchmark_stats { - float ninety; - float avg; - float oneP; - float pointOneP; float total; std::vector fps_data; + std::vector> percentile_data; }; extern struct fps_limit fps_limit_stats; @@ -75,5 +72,5 @@ void init_system_info(void); void FpsLimiter(struct fps_limit& stats); void imgui_custom_style(struct overlay_params& params); void get_device_name(int32_t vendorID, int32_t deviceID, struct swapchain_stats& sw_stats); -void calculate_benchmark_data(void); +void calculate_benchmark_data(void *params_void); void create_fonts(const overlay_params& params, ImFont*& default_font, ImFont*& small_font); diff --git a/src/overlay_params.cpp b/src/overlay_params.cpp index ae30711c..f40526a7 100644 --- a/src/overlay_params.cpp +++ b/src/overlay_params.cpp @@ -202,6 +202,36 @@ parse_media_player_order(const char *str) return order; } +static std::vector +parse_benchmark_percentiles(const char *str) +{ + std::vector percentiles; + std::stringstream percentStrings(str); + std::string value; + + size_t maxLength = 0; // for padding later on + + while (std::getline(percentStrings, value, '+')) { + trim(value); + + // everything except AVG is assumed to be a percentile. + if (value != "AVG") + value += '%'; + + percentiles.push_back(value); + + if (value.length() > maxLength) + maxLength = value.length(); + } + + // now reiterate over the strings and add equal padding + for (size_t i = 0; i < percentiles.size(); i++) { + percentiles[i].append(maxLength - percentiles[i].length(), ' '); + } + + return percentiles; +} + #define parse_width(s) parse_unsigned(s) #define parse_height(s) parse_unsigned(s) #define parse_vsync(s) parse_unsigned(s) @@ -392,7 +422,11 @@ parse_overlay_config(struct overlay_params *params, params->font_scale_media_player = 0.55f; params->log_interval = 100; params->media_player_order = { MP_ORDER_TITLE, MP_ORDER_ARTIST, MP_ORDER_ALBUM }; +<<<<<<< HEAD params->permit_upload = 0; +======= + params->benchmark_percentiles = { "97% ", "AVG ", "1% ", "0.1%" }; +>>>>>>> 6d4ed4e... implement configurable benchmark percentiles. #ifdef HAVE_X11 params->toggle_hud = { XK_Shift_R, XK_F12 }; diff --git a/src/overlay_params.h b/src/overlay_params.h index 05a6181b..7300cf54 100644 --- a/src/overlay_params.h +++ b/src/overlay_params.h @@ -89,7 +89,11 @@ typedef unsigned long KeySym; OVERLAY_PARAM_CUSTOM(cpu_text) \ OVERLAY_PARAM_CUSTOM(gpu_text) \ OVERLAY_PARAM_CUSTOM(log_interval) \ +<<<<<<< HEAD OVERLAY_PARAM_CUSTOM(permit_upload) \ +======= + OVERLAY_PARAM_CUSTOM(benchmark_percentiles) \ +>>>>>>> 6d4ed4e... implement configurable benchmark percentiles. OVERLAY_PARAM_CUSTOM(help) enum overlay_param_position { @@ -152,6 +156,7 @@ struct overlay_params { std::string cpu_text, gpu_text; unsigned log_interval; std::vector media_player_order; + std::vector benchmark_percentiles; std::string config_file_path; std::unordered_map options; From 979c4d32cad3480ae5b83cf7715410b1f5fc8eb0 Mon Sep 17 00:00:00 2001 From: Kingsley McDonald Date: Tue, 23 Jun 2020 18:51:51 +0100 Subject: [PATCH 2/8] oops! i didn't save changes from the merge conflict >.< --- bin/MangoHud.conf | 3 --- src/overlay_params.cpp | 3 --- src/overlay_params.h | 3 --- 3 files changed, 9 deletions(-) diff --git a/bin/MangoHud.conf b/bin/MangoHud.conf index f4cb0346..1e0238c8 100644 --- a/bin/MangoHud.conf +++ b/bin/MangoHud.conf @@ -117,11 +117,8 @@ background_alpha=0.5 # log_duration ### Define name and location of the output file (Required for logging) # output_file -<<<<<<< HEAD ### Permit uploading logs directly to Flightlessmango.com # permit_upload=1 -======= ### 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 # benchmark_percentiles= ->>>>>>> 6d4ed4e... implement configurable benchmark percentiles. diff --git a/src/overlay_params.cpp b/src/overlay_params.cpp index f40526a7..53def4be 100644 --- a/src/overlay_params.cpp +++ b/src/overlay_params.cpp @@ -422,11 +422,8 @@ parse_overlay_config(struct overlay_params *params, params->font_scale_media_player = 0.55f; params->log_interval = 100; params->media_player_order = { MP_ORDER_TITLE, MP_ORDER_ARTIST, MP_ORDER_ALBUM }; -<<<<<<< HEAD params->permit_upload = 0; -======= params->benchmark_percentiles = { "97% ", "AVG ", "1% ", "0.1%" }; ->>>>>>> 6d4ed4e... implement configurable benchmark percentiles. #ifdef HAVE_X11 params->toggle_hud = { XK_Shift_R, XK_F12 }; diff --git a/src/overlay_params.h b/src/overlay_params.h index 7300cf54..82a2fbbe 100644 --- a/src/overlay_params.h +++ b/src/overlay_params.h @@ -89,11 +89,8 @@ typedef unsigned long KeySym; OVERLAY_PARAM_CUSTOM(cpu_text) \ OVERLAY_PARAM_CUSTOM(gpu_text) \ OVERLAY_PARAM_CUSTOM(log_interval) \ -<<<<<<< HEAD OVERLAY_PARAM_CUSTOM(permit_upload) \ -======= OVERLAY_PARAM_CUSTOM(benchmark_percentiles) \ ->>>>>>> 6d4ed4e... implement configurable benchmark percentiles. OVERLAY_PARAM_CUSTOM(help) enum overlay_param_position { From 0e1fe708c8bba24a3fe2ede043c89deac0fe4f46 Mon Sep 17 00:00:00 2001 From: Kingsley McDonald Date: Tue, 23 Jun 2020 19:00:55 +0100 Subject: [PATCH 3/8] make use of new float parsing function i've also moved the input validation checks to the config parser, so that warnings aren't displayed in the terminal output every time a benchmark is run with an invalid percentile entry. --- src/overlay.cpp | 25 +++++++++++++++---------- src/overlay_params.cpp | 41 ++++++++++++++++++++++++++--------------- 2 files changed, 41 insertions(+), 25 deletions(-) diff --git a/src/overlay.cpp b/src/overlay.cpp index 7263f526..9ac2db76 100644 --- a/src/overlay.cpp +++ b/src/overlay.cpp @@ -817,26 +817,31 @@ void calculate_benchmark_data(void *params_void){ benchmark.total = benchmark.total + fps_; } + size_t max_label_size = 0; + for (std::string percentile : params->benchmark_percentiles) { float result; // special case handling for a mean-based average - if (percentile.find("AVG") == 0) { + if (percentile == "AVG") { result = benchmark.total / sorted.size(); - } - // everything else is used to calculate percentiles - else { - char *endChar; - float fraction = std::strtof(percentile.c_str(), &endChar) / 100; + } else { + // the percentiles are already validated when they're parsed from the config. + float fraction = parse_float(percentile) / 100; - if (*endChar != '%' || fraction <= 0.0 || fraction > 1.0) { - std::cerr << "MANGOHUD: Invalid percentile value for benchmark: '" << percentile << "'\n"; - continue; - } result = sorted[(fraction * sorted.size()) - 1]; + percentile += "%"; } + + if (percentile.length() > max_label_size) + max_label_size = percentile.length(); + benchmark.percentile_data.push_back({percentile, result}); } + + for (auto& entry : benchmark.percentile_data) { + entry.first.append(max_label_size - entry.first.length(), ' '); + } } void update_hud_info(struct swapchain_stats& sw_stats, struct overlay_params& params, uint32_t vendorID){ diff --git a/src/overlay_params.cpp b/src/overlay_params.cpp index 53def4be..2f9fc729 100644 --- a/src/overlay_params.cpp +++ b/src/overlay_params.cpp @@ -206,27 +206,38 @@ static std::vector parse_benchmark_percentiles(const char *str) { std::vector percentiles; - std::stringstream percentStrings(str); + std::stringstream percent_strings(str); std::string value; - size_t maxLength = 0; // for padding later on - - while (std::getline(percentStrings, value, '+')) { + while (std::getline(percent_strings, value, '+')) { trim(value); - // everything except AVG is assumed to be a percentile. - if (value != "AVG") - value += '%'; + if (value == "AVG") { + percentiles.push_back(value); + continue; + } - percentiles.push_back(value); + float as_float; + size_t float_len = 0; - if (value.length() > maxLength) - maxLength = value.length(); - } + try { + as_float = parse_float(value, &float_len); + } catch (const std::invalid_argument&) { + std::cerr << "MANGOHUD: invalid benchmark percentile: '" << value << "'\n"; + continue; + } - // now reiterate over the strings and add equal padding - for (size_t i = 0; i < percentiles.size(); i++) { - percentiles[i].append(maxLength - percentiles[i].length(), ' '); + if (float_len != value.length()) { + std::cerr << "MANGOHUD: invalid benchmark percentile: '" << value << "'\n"; + continue; + } + + if (as_float > 100 || as_float < 0) { + std::cerr << "MANGOHUD: benchmark percentile is not between 0 and 100 (" << value << ")\n"; + continue; + } + + percentiles.push_back(value); } return percentiles; @@ -423,7 +434,7 @@ parse_overlay_config(struct overlay_params *params, params->log_interval = 100; params->media_player_order = { MP_ORDER_TITLE, MP_ORDER_ARTIST, MP_ORDER_ALBUM }; params->permit_upload = 0; - params->benchmark_percentiles = { "97% ", "AVG ", "1% ", "0.1%" }; + params->benchmark_percentiles = { "97", "AVG", "1", "0.1" }; #ifdef HAVE_X11 params->toggle_hud = { XK_Shift_R, XK_F12 }; From f3f408f880e648d03b02cd1a73af15444e677638 Mon Sep 17 00:00:00 2001 From: Kingsley McDonald Date: Tue, 23 Jun 2020 19:03:14 +0100 Subject: [PATCH 4/8] add `benchmark_percentiles` description to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index acd61bf9..d50b5fa6 100644 --- a/README.md +++ b/README.md @@ -168,6 +168,7 @@ A partial list of parameters are below. See the config file for a complete list. | `engine_version` | Display OpenGL or vulkan and vulkan-based render engine's version | | `permit_upload` | Allow uploading of logs to Flightlessmango.com | | `upload_log` | Change keybind for uploading log | +| `benchmark_percentiles` | Configure which framerate percentiles are shown in the logging summary. Default is `97+AVG+1+0.1` | Example: `MANGOHUD_CONFIG=cpu_temp,gpu_temp,position=top-right,height=500,font_size=32` From c9c91808dc76c5a934eaa5f25747366a27c9dc06 Mon Sep 17 00:00:00 2001 From: m-rzb <43208506+m-rzb@users.noreply.github.com> Date: Sat, 27 Jun 2020 11:42:45 +0100 Subject: [PATCH 5/8] Update build.sh Added "KDE neon" --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 9c230b95..74c22c77 100755 --- a/build.sh +++ b/build.sh @@ -69,7 +69,7 @@ dependencies() { DEPS="{glibc-devel.i686,libstdc++-devel.i686,libX11-devel.i686}" dep_install ;; - *"buntu"|"Linux Mint"|"Debian GNU/Linux"|"Zorin OS"|"Pop!_OS"|"elementary OS") + *"buntu"|"Linux Mint"|"Debian GNU/Linux"|"Zorin OS"|"Pop!_OS"|"elementary OS"|"KDE neon") MANAGER_QUERY="dpkg-query -s" MANAGER_INSTALL="apt install" DEPS="{gcc,g++,gcc-multilib,g++-multilib,ninja-build,python3-pip,python3-setuptools,python3-wheel,pkg-config,mesa-common-dev,libx11-dev,libxnvctrl-dev,libdbus-1-dev}" From b47315642f347e013c45f11c059a26af580fcf45 Mon Sep 17 00:00:00 2001 From: jackun Date: Mon, 29 Jun 2020 22:24:08 +0300 Subject: [PATCH 6/8] Update README.md What needs to be disable explicitly and about `full` --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 276b3576..7cec0bbd 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,7 @@ You can also customize the hud by using the `MANGOHUD_CONFIG` environment variab You can also specify configuration file with `MANGOHUD_CONFIGFILE=/path/to/config` for applications whose names are hard to guess (java, python etc). A partial list of parameters are below. See the config file for a complete list. +Parameters that are enabled by default have to be explicitly disabled. These (currently) are `fps`, `frame_timing`, `cpu_stats` (cpu load), `gpu_stats` (gpu load). | Variable | Description | |------------------------------------|---------------------------------------------------------------------------------------| @@ -133,7 +134,7 @@ A partial list of parameters are below. See the config file for a complete list. | `core_load` | Displays load & frequency per core | | `gpu_core_clock`
`gpu_mem_clock`| Displays GPU core/memory frequency | | `ram`
`vram` | Displays system RAM/VRAM usage | -| `full` | Enables all of the above config options | +| `full` | Enables most of the toggleable parameters (currently excludes `histogram`) | | `font_size=` | Customizeable font size (default=24) | | `width=`
`height=` | Customizeable hud dimensions (in pixels) | | `position=` | Location of the hud: `top-left` (default), `top-right`, `bottom-left`, `bottom-right`, `top-center` | @@ -141,7 +142,7 @@ A partial list of parameters are below. See the config file for a complete list. | `no_display` | Hide the hud by default | | `toggle_hud=`
`toggle_logging=` | Modifiable toggle hotkeys. Default are `Shift_R+F12` and `Shift_L+F2`, respectively. | | `reload_cfg=` | Change keybind for reloading the config. Default = `Shift_L+F4` | -| `time`
`time_format=%T` | Displays local time. See [std::put_time](https://en.cppreference.com/w/cpp/io/manip/put_time) for formatting help. NOTE: Sometimes apps (or AMDVLK) may set `TZ` environment variable to `GMT+0` | +| `time`
`time_format=%T` | Displays local time. See [std::put_time](https://en.cppreference.com/w/cpp/io/manip/put_time) for formatting help. NOTE: Sometimes apps (or AMDVLK (should be fixed in latest)) may set `TZ` (timezone) environment variable to UTC/GMT | | `gpu_color`
`gpu_color`
`vram_color`
`ram_color`
`io_color`
`engine_color`
`frametime_color`
`background_color`
`text_color`
`media_player_color` | Change default colors: `gpu_color=RRGGBB`| | `alpha` | Set the opacity of all text and frametime graph `0.0-1.0` | | `background_alpha` | Set the opacity of the background `0.0-1.0` | From 107526198e9ae66e99d265de5c3734b86e34a996 Mon Sep 17 00:00:00 2001 From: FlightlessMango Date: Mon, 27 Jul 2020 16:24:14 +0200 Subject: [PATCH 7/8] [Build.sh] Updated glslang link for *buntu --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 9c230b95..3f23f019 100755 --- a/build.sh +++ b/build.sh @@ -79,7 +79,7 @@ dependencies() { $SU_CMD pip3 install 'meson>=0.54' mako fi if [[ ! -f /usr/local/bin/glslangValidator ]]; then - wget https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-linux-Release.zip + wget https://github.com/KhronosGroup/glslang/releases/download/SDK-candidate-26-Jul-2020/glslang-master-linux-Release.zip unzip glslang-master-linux-Release.zip bin/glslangValidator $SU_CMD install -m755 bin/glslangValidator /usr/local/bin/ rm bin/glslangValidator glslang-master-linux-Release.zip From 4fd1c5f3e76b034b665d3d622fb7f45264f7e54a Mon Sep 17 00:00:00 2001 From: FlightlessMango Date: Sun, 2 Aug 2020 08:25:04 +0200 Subject: [PATCH 8/8] Fixed some basic errors --- src/logging.cpp | 2 +- src/overlay.cpp | 1 - src/overlay.h | 2 +- src/overlay_params.cpp | 1 + 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/logging.cpp b/src/logging.cpp index 757edc1b..04c69d52 100644 --- a/src/logging.cpp +++ b/src/logging.cpp @@ -119,7 +119,7 @@ void Logger::stop_logging() { m_logging_on = false; m_log_end = Clock::now(); - std::thread(calculate_benchmark_data).detach(); + std::thread(calculate_benchmark_data, m_params).detach(); if(not m_params->output_file.empty()) { m_log_files.emplace_back(m_params->output_file + get_log_suffix()); diff --git a/src/overlay.cpp b/src/overlay.cpp index 6cc632c1..47417f57 100644 --- a/src/overlay.cpp +++ b/src/overlay.cpp @@ -1069,7 +1069,6 @@ void render_benchmark(swapchain_stats& data, struct overlay_params& params, ImVe else ImGui::SetNextWindowPos(ImVec2(data.main_window_pos.x, data.main_window_pos.y + window_size.y + 5), ImGuiCond_Always); - vector> benchmark_data = {{"97% ", benchmark.ninety}, {"AVG ", benchmark.avg}, {"1% ", benchmark.oneP}, {"0.1%", benchmark.pointOneP}}; float display_time = std::chrono::duration(now - logger->last_log_end()).count(); static float display_for = 10.0f; float alpha; diff --git a/src/overlay.h b/src/overlay.h index 18a40c02..3f55dbd0 100644 --- a/src/overlay.h +++ b/src/overlay.h @@ -78,7 +78,7 @@ void init_system_info(void); void FpsLimiter(struct fps_limit& stats); void imgui_custom_style(struct overlay_params& params); void get_device_name(int32_t vendorID, int32_t deviceID, struct swapchain_stats& sw_stats); -void calculate_benchmark_data(void); +void calculate_benchmark_data(void *params_void); void create_fonts(const overlay_params& params, ImFont*& small_font, ImFont*& text_font); #endif //MANGOHUD_OVERLAY_H \ No newline at end of file diff --git a/src/overlay_params.cpp b/src/overlay_params.cpp index e988082d..447eac25 100644 --- a/src/overlay_params.cpp +++ b/src/overlay_params.cpp @@ -242,6 +242,7 @@ parse_benchmark_percentiles(const char *str) } return percentiles; +} static uint32_t parse_font_glyph_ranges(const char *str)