Skip to content

Commit

Permalink
Remove a few compiler warnings due to type conversions.
Browse files Browse the repository at this point in the history
Many of those internal types need a cleanup later to consolidate them a bit more.
  • Loading branch information
kblaschke committed Oct 14, 2023
1 parent ceca33a commit 8461bb9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/libprojectM/ProjectM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,16 +487,16 @@ auto ProjectM::GetRenderContext() -> RenderContext
RenderContext ctx{};
ctx.viewportSizeX = m_windowWidth;
ctx.viewportSizeY = m_windowHeight;
ctx.time = m_timeKeeper->GetRunningTime();
ctx.progress = m_timeKeeper->PresetProgressA();
ctx.fps = m_targetFps;
ctx.time = static_cast<float>(m_timeKeeper->GetRunningTime());
ctx.progress = static_cast<float>(m_timeKeeper->PresetProgressA());
ctx.fps = static_cast<float>(m_targetFps);
ctx.frame = m_frameCount;
ctx.aspectX = (m_windowHeight > m_windowWidth) ? static_cast<float>(m_windowWidth) / static_cast<float>(m_windowHeight) : 1.0f;
ctx.aspectY = (m_windowWidth > m_windowHeight) ? static_cast<float>(m_windowHeight) / static_cast<float>(m_windowWidth) : 1.0f;
ctx.invAspectX = 1.0f / ctx.aspectX;
ctx.invAspectY = 1.0f / ctx.aspectY;
ctx.perPixelMeshX = m_meshX;
ctx.perPixelMeshY = m_meshY;
ctx.perPixelMeshX = static_cast<int>(m_meshX);
ctx.perPixelMeshY = static_cast<int>(m_meshY);
ctx.textureManager = m_textureManager.get();

return ctx;
Expand Down

0 comments on commit 8461bb9

Please sign in to comment.