System: Fix crash with replacement precaching

This commit is contained in:
Stenzek
2024-01-21 22:54:39 +10:00
parent a231fd4f22
commit a7b7ce2720
2 changed files with 12 additions and 1 deletions

View File

@ -127,6 +127,12 @@ static std::tuple<float, float> GetMinMax(std::span<const float> values)
void Host::DisplayLoadingScreen(const char* message, int progress_min /*= -1*/, int progress_max /*= -1*/,
int progress_value /*= -1*/)
{
if (!g_gpu_device)
{
Log_InfoPrintf("%s: %d/%d", message, progress_value, progress_max);
return;
}
const auto& io = ImGui::GetIO();
const float scale = ImGuiManager::GetGlobalScale();
const float width = (400.0f * scale);