mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-25 13:45:58 +01:00
do while
This commit is contained in:
parent
aeeecc8129
commit
377a2e441b
1 changed files with 12 additions and 10 deletions
|
@ -1723,17 +1723,19 @@ void CHyprOpenGLImpl::createBGTextureForMonitor(CMonitor* pMonitor) {
|
||||||
texName += "2K.png";
|
texName += "2K.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// goto is banned? ok have a do while.
|
||||||
std::string texPath = "/usr/share/hyprland/" + texName;
|
std::string texPath = "/usr/share/hyprland/" + texName;
|
||||||
if (std::filesystem::exists(texPath))
|
do {
|
||||||
goto hastex;
|
if (std::filesystem::exists(texPath))
|
||||||
texPath = "/usr/local/share/hyprland/" + texName;
|
break;
|
||||||
if (std::filesystem::exists(texPath))
|
texPath = "/usr/local/share/hyprland/" + texName;
|
||||||
goto hastex;
|
if (std::filesystem::exists(texPath))
|
||||||
texPath = "assets/" + texName;
|
break;
|
||||||
if (std::filesystem::exists(texPath))
|
texPath = "assets/" + texName;
|
||||||
goto hastex;
|
if (std::filesystem::exists(texPath))
|
||||||
texPath = "";
|
break;
|
||||||
hastex:
|
texPath = "";
|
||||||
|
} while (false);
|
||||||
|
|
||||||
PTEX->m_vSize = textureSize;
|
PTEX->m_vSize = textureSize;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue