Skip to content

Commit

Permalink
Merge pull request #18168 from hrydgard/linux-tex-format-fix
Browse files Browse the repository at this point in the history
SDL ttf rendering: Try two 4444 tex formats to find one that works.
  • Loading branch information
hrydgard authored Sep 18, 2023
2 parents 2488a1a + 8f88442 commit 1d26a27
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Common/Render/Text/draw_text_sdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,10 @@ void TextDrawerSDL::DrawString(DrawBuffer &target, const char *str, float x, flo
entry->lastUsedFrame = frameCount_;
} else {
DataFormat texFormat = Draw::DataFormat::R4G4B4A4_UNORM_PACK16;
if ((draw_->GetDataFormatSupport(texFormat) & Draw::FMT_TEXTURE) == 0) {
// This is always supported in Vulkan. The other format is the common OpenGL one.
texFormat = Draw::DataFormat::B4G4R4A4_UNORM_PACK16;
}

entry = new TextStringEntry();

Expand Down

0 comments on commit 1d26a27

Please sign in to comment.