mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
Scan for none.png for the checkerboard theme
This commit is contained in:
parent
30b6d760f2
commit
91458b18f6
|
@ -593,6 +593,9 @@ int CMenus::ThemeScan(const char *pName, int IsDir, int DirType, void *pUser)
|
|||
}
|
||||
else
|
||||
str_copy(aThemeName, aFullName, sizeof(aThemeName));
|
||||
|
||||
if(str_comp(aThemeName, "none") == 0) // "none" is reserved, disallowed for maps
|
||||
return 0;
|
||||
|
||||
// try to edit an existing theme
|
||||
for(int i = 0; i < pSelf->m_lThemes.size(); i++)
|
||||
|
@ -629,7 +632,7 @@ int CMenus::ThemeIconScan(const char *pName, int IsDir, int DirType, void *pUser
|
|||
// save icon for an existing theme
|
||||
for(sorted_array<CTheme>::range r = pSelf->m_lThemes.all(); !r.empty(); r.pop_front()) // bit slow but whatever
|
||||
{
|
||||
if(str_comp(r.front().m_Name, aThemeName) == 0)
|
||||
if(str_comp(r.front().m_Name, aThemeName) == 0 || (!r.front().m_Name[0] && str_comp(aThemeName, "none") == 0))
|
||||
{
|
||||
char aBuf[512];
|
||||
str_format(aBuf, sizeof(aBuf), "ui/themes/%s", pName);
|
||||
|
|
Loading…
Reference in a new issue