Merge pull request #19840 from hrydgard/sdl-2.24-buildfix

Buildfix for new SDL.
This commit is contained in:
Henrik Rydgård
2025-01-09 21:31:00 +01:00
committed by GitHub
+9 -5
View File
@@ -5,13 +5,15 @@
#include <map>
#include "Common/Render/Text/draw_text.h"
#if defined(USE_SDL2_TTF)
#include "SDL2/SDL.h"
#include "SDL2/SDL_ttf.h"
#if defined(USE_SDL2_TTF_FONTCONFIG)
#include <fontconfig/fontconfig.h>
#endif
// SDL2_ttf's TTF_Font is a typedef of _TTF_Font.
struct _TTF_Font;
class TextDrawerSDL : public TextDrawer {
public:
TextDrawerSDL(Draw::DrawContext *draw);
@@ -32,9 +34,9 @@ private:
uint32_t CheckMissingGlyph(std::string_view text);
int FindFallbackFonts(uint32_t missingGlyph, int ptSize);
std::map<uint32_t, _TTF_Font *> fontMap_;
std::map<uint32_t, TTF_Font *> fontMap_;
std::vector<_TTF_Font *> fallbackFonts_;
std::vector<TTF_Font *> fallbackFonts_;
std::vector<std::pair<std::string, int>> fallbackFontPaths_; // path and font face index
std::map<int, int> glyphFallbackFontIndex_;
@@ -43,3 +45,5 @@ private:
FcConfig *config;
#endif
};
#endif