mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-04 06:01:56 -07:00
renderer: Add a missing texture asset and a user check
When an asset is missing, instead of a black screen, render an obnoxious, yet standard, missing texture. Additionally, warn the user assets failed to load. Shoutout to Arch for having their assets broken for months. Fix your shit. I am tired of it, and it's negatively impacting users.
This commit is contained in:
@@ -1063,22 +1063,16 @@ void CHyprRenderer::renderSessionLockMissing(PHLMONITOR pMonitor) {
|
||||
|
||||
if (ANY_PRESENT) {
|
||||
// render image2, without instructions. Lock still "alive", unless texture dead
|
||||
if (g_pHyprOpenGL->m_pLockDead2Texture)
|
||||
g_pHyprOpenGL->renderTexture(g_pHyprOpenGL->m_pLockDead2Texture, &monbox, ALPHA);
|
||||
else
|
||||
g_pHyprOpenGL->renderRect(&monbox, CColor(1.0, 0.2, 0.2, ALPHA));
|
||||
g_pHyprOpenGL->renderTexture(g_pHyprOpenGL->m_pLockDead2Texture, &monbox, ALPHA);
|
||||
} else {
|
||||
// render image, with instructions. Lock is gone.
|
||||
if (g_pHyprOpenGL->m_pLockDeadTexture) {
|
||||
g_pHyprOpenGL->renderTexture(g_pHyprOpenGL->m_pLockDeadTexture, &monbox, ALPHA);
|
||||
g_pHyprOpenGL->renderTexture(g_pHyprOpenGL->m_pLockDeadTexture, &monbox, ALPHA);
|
||||
|
||||
// also render text for the tty number
|
||||
if (g_pHyprOpenGL->m_pLockTtyTextTexture) {
|
||||
CBox texbox = {{}, g_pHyprOpenGL->m_pLockTtyTextTexture->m_vSize};
|
||||
g_pHyprOpenGL->renderTexture(g_pHyprOpenGL->m_pLockTtyTextTexture, &texbox, 1.F);
|
||||
}
|
||||
} else
|
||||
g_pHyprOpenGL->renderRect(&monbox, CColor(1.0, 0.2, 0.2, ALPHA));
|
||||
// also render text for the tty number
|
||||
if (g_pHyprOpenGL->m_pLockTtyTextTexture) {
|
||||
CBox texbox = {{}, g_pHyprOpenGL->m_pLockTtyTextTexture->m_vSize};
|
||||
g_pHyprOpenGL->renderTexture(g_pHyprOpenGL->m_pLockTtyTextTexture, &texbox, 1.F);
|
||||
}
|
||||
}
|
||||
|
||||
if (ALPHA < 1.f) /* animate */
|
||||
|
Reference in New Issue
Block a user