From 6ee6663fb6626b71c5ceaea6c5968a83798f434c Mon Sep 17 00:00:00 2001 From: Alessandro Toia Date: Tue, 24 Nov 2020 19:48:38 -0800 Subject: [PATCH 1/2] Change delimiter for cpu and gpu load change and color to + --- README.md | 8 ++++---- src/overlay_params.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 97d94c1e..edb4a997 100644 --- a/README.md +++ b/README.md @@ -180,11 +180,11 @@ Parameters that are enabled by default have to be explicitly disabled. These (cu | `wine_color` | Change color of the wine/proton text | | `cpu_mhz` | Shows the CPUs current MHz | | `gpu_load_change` | Changes the color of the GPU load depending on load | -| `gpu_load_color` | Set the colors for the gpu load change low,medium and high. e.g `gpu_load_color=0000FF,00FFFF,FF00FF` | -| `gpu_load_value` | Set the values for medium and high load e.g `gpu_load_value=50,90` | +| `gpu_load_color` | Set the colors for the gpu load change low,medium and high. e.g `gpu_load_color=0000FF+00FFFF+FF00FF` | +| `gpu_load_value` | Set the values for medium and high load e.g `gpu_load_value=50+90` | | `cpu_load_change` | Changes the color of the CPU load depending on load | -| `cpu_load_color` | Set the colors for the gpu load change low,medium and high. e.g `cpu_load_color=0000FF,00FFFF,FF00FF` | -| `cpu_load_value` | Set the values for medium and high load e.g `cpu_load_value=50,90` | +| `cpu_load_color` | Set the colors for the gpu load change low,medium and high. e.g `cpu_load_color=0000FF+00FFFF+FF00FF` | +| `cpu_load_value` | Set the values for medium and high load e.g `cpu_load_value=50+90` | | `cellpadding_y` | Set the vertical cellpadding, default is `-0.085` | | `frametime` | Display frametime next to fps text | | `table_columns` | Set the number of table columns for ImGui, defaults to 3 | diff --git a/src/overlay_params.cpp b/src/overlay_params.cpp index 2daa07e0..3db74e9d 100644 --- a/src/overlay_params.cpp +++ b/src/overlay_params.cpp @@ -159,7 +159,7 @@ parse_load_color(const char *str) std::vector load_colors; std::stringstream ss(str); std::string token; - while (std::getline(ss, token, ',')) { + while (std::getline(ss, token, '+')) { trim(token); load_colors.push_back(std::stoi(token, NULL, 16)); } @@ -176,7 +176,7 @@ parse_load_value(const char *str) std::vector load_value; std::stringstream ss(str); std::string token; - while (std::getline(ss, token, ',')) { + while (std::getline(ss, token, '+')) { trim(token); load_value.push_back(std::stoi(token)); } From d855dc6691d9bf0be9d0a455a5187af39299cc76 Mon Sep 17 00:00:00 2001 From: Alessandro Toia Date: Tue, 24 Nov 2020 19:55:47 -0800 Subject: [PATCH 2/2] Also change delimiter for media_player_order to + --- README.md | 2 +- src/overlay_params.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index edb4a997..3f01eb7e 100644 --- a/README.md +++ b/README.md @@ -158,7 +158,7 @@ Parameters that are enabled by default have to be explicitly disabled. These (cu | `vsync`
`gl_vsync` | Set vsync for OpenGL or Vulkan | | `media_player` | Show media player metadata | | `media_player_name` | Force media player DBus service name without the `org.mpris.MediaPlayer2` part, like `spotify`, `vlc`, `audacious` or `cantata`. If none is set, MangoHud tries to switch between currently playing players. | -| `media_player_order` | Media player metadata field order. Defaults to `title,artist,album`. | +| `media_player_order` | Media player metadata field order. Defaults to `title+artist+album`. | | `font_scale_media_player` | Change size of media player text relative to font_size | | `io_read`
`io_write` | Show non-cached IO read/write, in MiB/s | | `pci_dev` | Select GPU device in multi-gpu setups | diff --git a/src/overlay_params.cpp b/src/overlay_params.cpp index 3db74e9d..269d02a7 100644 --- a/src/overlay_params.cpp +++ b/src/overlay_params.cpp @@ -243,7 +243,7 @@ parse_media_player_order(const char *str) std::vector order; std::stringstream ss(str); std::string token; - while (std::getline(ss, token, ',')) { + while (std::getline(ss, token, '+')) { trim(token); std::transform(token.begin(), token.end(), token.begin(), ::tolower); if (token == "title")