This commit is contained in:
outfoxxed 2023-08-08 00:03:28 -07:00
parent aeeecc8129
commit 377a2e441b
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E

View file

@ -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;
do {
if (std::filesystem::exists(texPath)) if (std::filesystem::exists(texPath))
goto hastex; break;
texPath = "/usr/local/share/hyprland/" + texName; texPath = "/usr/local/share/hyprland/" + texName;
if (std::filesystem::exists(texPath)) if (std::filesystem::exists(texPath))
goto hastex; break;
texPath = "assets/" + texName; texPath = "assets/" + texName;
if (std::filesystem::exists(texPath)) if (std::filesystem::exists(texPath))
goto hastex; break;
texPath = ""; texPath = "";
hastex: } while (false);
PTEX->m_vSize = textureSize; PTEX->m_vSize = textureSize;