Merge pull request #1836 from Dune-jr/fix-theme-saving

Fix none theme not saving properly (default is selected at restart) - #1833
This commit is contained in:
oy 2018-12-10 20:37:18 +01:00 committed by GitHub
commit 62dbf469fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -790,6 +790,8 @@ void CMenus::RenderThemeSelection(CUIRect MainView, bool Header)
if(m_lThemes.size() == 0) // not loaded yet
{
if(!g_Config.m_ClShowMenuMap)
str_copy(g_Config.m_ClMenuMap, "", sizeof(g_Config.m_ClMenuMap)); // cl_menu_map otherwise resets to default on loading
m_lThemes.add(CTheme("", false, false)); // no theme
Storage()->ListDirectory(IStorage::TYPE_ALL, "ui/themes", ThemeScan, (CMenus*)this);
Storage()->ListDirectory(IStorage::TYPE_ALL, "ui/themes", ThemeIconScan, (CMenus*)this);