Skip to content

Commit

Permalink
style: fix clang-tidy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas7770 committed Nov 28, 2023
1 parent 3b73b54 commit 7915a4f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion core/src/cubos/core/io/glfw_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ glm::ivec2 GLFWWindow::framebufferSize() const
float GLFWWindow::contentScale() const
{
#ifdef WITH_GLFW
float xscale, yscale;
float xscale;
float yscale;
glfwGetWindowContentScale(mHandle, &xscale, &yscale);
// xscale and yscale should be the same, so only return one
return xscale;
Expand Down
10 changes: 5 additions & 5 deletions engine/src/cubos/engine/imgui/imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,17 +322,17 @@ void cubos::engine::imguiInitialize(io::Window window, float dpiScale)
bd->time = window->time();

// DPI scaling
if (dpiScale < 1.0f)
if (dpiScale < 1.0F)
{
// Smaller sizes are possible but may cause crashes.
// Anything <= 0.0f is invalid.
dpiScale = 1.0f;
dpiScale = 1.0F;
}
ImGui::GetStyle().ScaleAllSizes(dpiScale);
ImFontConfig font_cfg;
ImFontConfig fontCfg;
// Default font size is 13; scale that
font_cfg.SizePixels = 13.0f * dpiScale;
io.Fonts->AddFontDefault(&font_cfg);
fontCfg.SizePixels = 13.0F * dpiScale;
io.Fonts->AddFontDefault(&fontCfg);

createDeviceObjects();

Expand Down

0 comments on commit 7915a4f

Please sign in to comment.