mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Add check that makes PPSSPP work on Xbox through the debugger
Not sure why needed, seems maybe some different event order during window creation...
This commit is contained in:
parent
42ae18eea5
commit
e1daccddfd
2 changed files with 6 additions and 5 deletions
|
@ -41,7 +41,7 @@ public:
|
|||
weight,
|
||||
DWRITE_FONT_STYLE_NORMAL,
|
||||
DWRITE_FONT_STRETCH_NORMAL,
|
||||
MulDiv(height, (int)(96.0f * (1.0f / dpiScale)), 72),
|
||||
MulDiv(height, (int)(96.0f * (1.0f / dpiScale)), 72.0f),
|
||||
L"",
|
||||
&textFmt
|
||||
);
|
||||
|
@ -233,8 +233,8 @@ void TextDrawerUWP::MeasureString(const char *str, size_t len, float *w, float *
|
|||
layout->Release();
|
||||
|
||||
entry = new TextMeasureEntry();
|
||||
entry->width = metrics.width + 1;
|
||||
entry->height = metrics.height + 1;
|
||||
entry->width = metrics.width + 1.0f;
|
||||
entry->height = metrics.height + 1.0f;
|
||||
sizeCache_[key] = std::unique_ptr<TextMeasureEntry>(entry);
|
||||
}
|
||||
|
||||
|
|
|
@ -260,11 +260,12 @@ void App::OnWindowSizeChanged(CoreWindow^ sender, WindowSizeChangedEventArgs^ ar
|
|||
float scale = m_deviceResources->GetDpi() / 96.0f;
|
||||
|
||||
m_deviceResources->SetLogicalSize(Size(width, height));
|
||||
m_main->CreateWindowSizeDependentResources();
|
||||
if (m_main) {
|
||||
m_main->CreateWindowSizeDependentResources();
|
||||
}
|
||||
|
||||
PSP_CoreParameter().pixelWidth = (int)(width * scale);
|
||||
PSP_CoreParameter().pixelHeight = (int)(height * scale);
|
||||
|
||||
if (UpdateScreenScale((int)width, (int)height)) {
|
||||
NativeMessageReceived("gpu_resized", "");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue