Files
Henrik Rydgård b2faec0533 Windows: Restore the GDI-based text drawer, use it if RenderDoc is attached
The D2D-based text renderer requires a D3D11 context, which confuses
RenderDoc (it doesn't permit multiple 3D APIs in the same process).

So, let's restore the old GDI renderer and use it if RenderDoc is attached.

See #21638
2026-05-20 10:25:29 +02:00

32 lines
957 B
C++

#pragma once
#include "ppsspp_config.h"
#include <map>
#include "Common/Render/Text/draw_text.h"
#if defined(_WIN32) && !defined(USING_QT_UI) && !PPSSPP_PLATFORM(UWP)
struct TextDrawerContext;
// Internal struct but all details in .cpp file (pimpl to avoid pulling in excessive headers here)
class TextDrawerFontContext;
class TextDrawerWin32 : public TextDrawer {
public:
TextDrawerWin32(Draw::DrawContext *draw);
~TextDrawerWin32();
void SetOrCreateFont(const FontStyle &style) override;
bool DrawStringBitmap(std::vector<uint8_t> &bitmapData, TextStringEntry &entry, Draw::DataFormat texFormat, std::string_view str, int align, bool fullColor) override;
protected:
void MeasureStringInternal(std::string_view str, float *w, float *h) override;
bool SupportsColorEmoji() const override { return false; }
void ClearFonts() override;
TextDrawerContext *ctx_;
std::map<FontStyle, std::unique_ptr<TextDrawerFontContext>> fontMap_;
};
#endif