mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-26 23:10:38 +00:00
Random UWP text bugfix. Some warning fixes.
This commit is contained in:
parent
fa5ec667ef
commit
510cf1891b
@ -33,7 +33,9 @@ public:
|
||||
Destroy();
|
||||
}
|
||||
|
||||
if (factory == nullptr) return;
|
||||
if (!factory) {
|
||||
return;
|
||||
}
|
||||
|
||||
HRESULT hr = factory->CreateTextFormat(
|
||||
fname.c_str(),
|
||||
@ -45,15 +47,20 @@ public:
|
||||
L"",
|
||||
&textFmt
|
||||
);
|
||||
if (FAILED(hr)) {
|
||||
ERROR_LOG(G3D, "Failed creating font %s", fname.c_str());
|
||||
}
|
||||
}
|
||||
void Destroy() {
|
||||
textFmt->Release();
|
||||
if (textFmt) {
|
||||
textFmt->Release();
|
||||
}
|
||||
textFmt = nullptr;
|
||||
}
|
||||
|
||||
IDWriteFactory4* factory = nullptr;
|
||||
IDWriteFontCollection1* fontCollection = nullptr;
|
||||
IDWriteTextFormat* textFmt = nullptr;
|
||||
IDWriteFactory4 *factory = nullptr;
|
||||
IDWriteFontCollection1 *fontCollection = nullptr;
|
||||
IDWriteTextFormat *textFmt = nullptr;
|
||||
std::wstring fname;
|
||||
int height;
|
||||
DWRITE_FONT_WEIGHT weight;
|
||||
@ -61,8 +68,8 @@ public:
|
||||
};
|
||||
|
||||
struct TextDrawerContext {
|
||||
ID2D1Bitmap1* bitmap;
|
||||
ID2D1Bitmap1* mirror_bmp;
|
||||
ID2D1Bitmap1 *bitmap;
|
||||
ID2D1Bitmap1 *mirror_bmp;
|
||||
};
|
||||
|
||||
TextDrawerUWP::TextDrawerUWP(Draw::DrawContext *draw) : TextDrawer(draw), ctx_(nullptr) {
|
||||
|
@ -23,14 +23,14 @@ public:
|
||||
if (at3pCtx_) {
|
||||
codecOpen_ = true;
|
||||
} else {
|
||||
ERROR_LOG(ME, "Failed to open atrac3+ context! (channels=%d blockAlign=%d ed=%d)", channels, blockAlign, extraDataSize);
|
||||
ERROR_LOG(ME, "Failed to open atrac3+ context! (channels=%d blockAlign=%d ed=%d)", channels, (int)blockAlign, (int)extraDataSize);
|
||||
}
|
||||
} else if (audioType_ == PSP_CODEC_AT3) {
|
||||
at3Ctx_ = atrac3_alloc(channels, &blockAlign_, extraData, (int)extraDataSize);
|
||||
if (at3Ctx_) {
|
||||
codecOpen_ = true;
|
||||
} else {
|
||||
ERROR_LOG(ME, "Failed to open atrac3 context! !channels=%d blockAlign=%d ed=%d)", channels, blockAlign, extraDataSize);
|
||||
ERROR_LOG(ME, "Failed to open atrac3 context! !channels=%d blockAlign=%d ed=%d)", channels, (int)blockAlign, (int)extraDataSize);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 2; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user