Qt: Don't try to load directory as background image

pull/3551/head
Stenzek 2 months ago
parent 4b472dd51b
commit fc29fbab50
No known key found for this signature in database

@ -1407,15 +1407,18 @@ void GameListWidget::reloadThemeSpecificImages()
void GameListWidget::updateBackground(bool reload_image)
{
std::string path = Host::GetBaseStringSettingValue("UI", "GameListBackgroundPath");
if (!Path::IsAbsolute(path))
path = Path::Combine(EmuFolders::DataRoot, path);
if (reload_image)
{
m_background_image = QImage();
if (!path.empty() && m_background_image.load(path.c_str()))
m_background_image.setDevicePixelRatio(devicePixelRatio());
if (std::string path = Host::GetBaseStringSettingValue("UI", "GameListBackgroundPath"); !path.empty())
{
if (!Path::IsAbsolute(path))
path = Path::Combine(EmuFolders::DataRoot, path);
if (m_background_image.load(path.c_str()))
m_background_image.setDevicePixelRatio(devicePixelRatio());
}
}
if (m_background_image.isNull())

Loading…
Cancel
Save