Skip to content

Commit

Permalink
Fix LCD size in WASM
Browse files Browse the repository at this point in the history
Same issue as on iOS also appears in browsers if scaling is used.
  • Loading branch information
Vogtinator committed Dec 30, 2022
1 parent a76f5a2 commit 6032683
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions qtframebuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ QImage renderFramebuffer()

void paintFramebuffer(QPainter *p)
{
#ifdef IS_IOS_BUILD
#if defined(Q_OS_IOS) || defined(Q_OS_WASM)
// Apparently, this is needed (will be 2 on retina screens)
// TODO: actually make sure Android doesn't need that as well
static const double devicePixelRatio = ((QGuiApplication*)QCoreApplication::instance())->primaryScreen()->devicePixelRatio();
#else
// Has to be 1 on desktop, even on retina (tested on OS X 10.11 with one retina, one non-retina, and both ; same on Win VM)
Expand Down

0 comments on commit 6032683

Please sign in to comment.