From e5ac2253622de3d1199dd8f82b447d8f2067cb93 Mon Sep 17 00:00:00 2001 From: Aloshi Date: Sat, 24 May 2014 11:09:45 -0500 Subject: [PATCH] Ctrl-R now also reloads the system view when in debug mode. --- THEMES.md | 2 +- src/views/SystemView.cpp | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/THEMES.md b/THEMES.md index 65c8504ee..bff94baf8 100644 --- a/THEMES.md +++ b/THEMES.md @@ -112,7 +112,7 @@ Or, you can create your own elements by adding `extra="true"` (as is done in the Advanced Features ================= -It is recommended that if you are writing a theme you launch EmulationStation with the `--debug` and `--windowed` switches. This way you can read error messages without having to check the log file. You can also reload the current gamelist view with `Ctrl-R` if `--debug` is specified. +It is recommended that if you are writing a theme you launch EmulationStation with the `--debug` and `--windowed` switches. This way you can read error messages without having to check the log file. You can also reload the current gamelist view and system view with `Ctrl-R` if `--debug` is specified. ### The `` tag diff --git a/src/views/SystemView.cpp b/src/views/SystemView.cpp index a512683ca..702f9de42 100644 --- a/src/views/SystemView.cpp +++ b/src/views/SystemView.cpp @@ -6,6 +6,7 @@ #include "ViewController.h" #include "../animations/LambdaAnimation.h" #include "../SystemData.h" +#include "../Settings.h" #include "../Util.h" #define SELECTED_SCALE 1.5f @@ -91,6 +92,17 @@ bool SystemView::input(InputConfig* config, Input input) { if(input.value != 0) { + if(config->getDeviceId() == DEVICE_KEYBOARD && input.value && input.id == SDLK_r && SDL_GetModState() & KMOD_LCTRL && Settings::getInstance()->getBool("Debug")) + { + LOG(LogInfo) << " Reloading SystemList view"; + + // reload themes + for(auto it = mEntries.begin(); it != mEntries.end(); it++) + it->object->loadTheme(); + + populate(); + return true; + } if(config->isMappedTo("left", input)) { listInput(-1);