Skip to content

Commit

Permalink
Merge pull request #92 from jpfeltracco/jpfeltracco/scaling_fix
Browse files Browse the repository at this point in the history
Fix glviewport scaling on high dpi
  • Loading branch information
mahi97 authored Sep 2, 2019
2 parents 8b52868 + b075b81 commit f7ce034
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sslworld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,8 @@ void SSLWorld::step(dReal dt)

if (customDT > 0)
dt = customDT;
g->initScene(m_parent->width(),m_parent->height(),0,0.7,1);//true,0.7,0.7,0.7,0.8);
const auto ratio = m_parent->devicePixelRatio();
g->initScene(m_parent->width()*ratio,m_parent->height()*ratio,0,0.7,1);
for (int kk=0;kk<5;kk++)
{
const dReal* ballvel = dBodyGetLinearVel(ball->body);
Expand Down

0 comments on commit f7ce034

Please sign in to comment.