mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-19 23:05:38 +00:00
PostProcessing: Fix assertion on some shader/texture formats
This commit is contained in:
parent
63bc3883ea
commit
958b033a66
|
@ -284,9 +284,10 @@ std::unique_ptr<MemoryCard> MemoryCard::Open(std::string_view filename)
|
|||
mc->m_filename = filename;
|
||||
if (!mc->LoadFromFile())
|
||||
{
|
||||
Log_InfoPrintf("Memory card at '%s' could not be read, formatting.", mc->m_filename.c_str());
|
||||
Host::AddFormattedOSDMessage(5.0f, TRANSLATE("OSDMessage", "Memory card at '%s' could not be read, formatting."),
|
||||
mc->m_filename.c_str());
|
||||
Log_InfoFmt("Memory card at '{}' could not be read, formatting.", mc->m_filename);
|
||||
Host::AddIconOSDMessage(fmt::format("memory_card_{}", filename), ICON_FA_SD_CARD,
|
||||
fmt::format(TRANSLATE_FS("OSDMessage", "Memory card '{}' could not be read, formatting."),
|
||||
Path::GetFileName(filename), Host::OSD_INFO_DURATION));
|
||||
mc->Format();
|
||||
}
|
||||
|
||||
|
|
|
@ -4698,8 +4698,10 @@ void System::ToggleSoftwareRendering()
|
|||
|
||||
const GPURenderer new_renderer = g_gpu->IsHardwareRenderer() ? GPURenderer::Software : g_settings.gpu_renderer;
|
||||
|
||||
Host::AddKeyedFormattedOSDMessage("SoftwareRendering", 5.0f, TRANSLATE("OSDMessage", "Switching to %s renderer..."),
|
||||
Settings::GetRendererDisplayName(new_renderer));
|
||||
Host::AddIconOSDMessage("SoftwareRendering", ICON_FA_PAINT_ROLLER,
|
||||
fmt::format(TRANSLATE_FS("OSDMessage", "Switching to {} renderer..."),
|
||||
Settings::GetRendererDisplayName(new_renderer)),
|
||||
Host::OSD_QUICK_DURATION);
|
||||
RecreateGPU(new_renderer);
|
||||
ResetPerformanceCounters();
|
||||
}
|
||||
|
|
|
@ -33,6 +33,8 @@ const char* GPUTexture::GetFormatName(Format format)
|
|||
"R8", // R8
|
||||
"D16", // D16
|
||||
"R16", // R16
|
||||
"R16I", // R16I
|
||||
"R16U", // R16U
|
||||
"R16F", // R16F
|
||||
"R32I", // R32I
|
||||
"R32U", // R32U
|
||||
|
|
Loading…
Reference in a new issue