We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41c345f commit d1246e7Copy full SHA for d1246e7
SampleBase/src/Emscripten/SampleAppEmscripten.cpp
@@ -28,6 +28,7 @@
28
#include "ImGuiImplEmscripten.hpp"
29
#include <emscripten.h>
30
#include <emscripten/html5.h>
31
+#include "imgui.h"
32
33
namespace Diligent
34
{
@@ -49,6 +50,11 @@ class SampleAppEmscripten : public SampleApp
49
50
51
const auto& SCDesc = m_pSwapChain->GetDesc();
52
m_pImGui = ImGuiImplEmscripten::Create(ImGuiDiligentCreateInfo{m_pDevice, SCDesc});
53
+
54
+ auto& io = ImGui::GetIO();
55
+ auto DevicePixelRatio = static_cast<float>(emscripten_get_device_pixel_ratio());
56
+ io.DisplayFramebufferScale = ImVec2{DevicePixelRatio, DevicePixelRatio};
57
58
InitializeSample();
59
}
60
catch (...)
0 commit comments