Merge pull request #281 from alloverse/fix-pixeldensity

fix crash in lovrGraphicsGetPixelDensity
This commit is contained in:
Bjorn 2020-08-05 11:11:27 -06:00 committed by GitHub
commit eb97230c0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -279,9 +279,9 @@ int lovrGraphicsGetHeight() {
}
float lovrGraphicsGetPixelDensity() {
int width, framebufferWidth;
lovrPlatformGetWindowSize(&width, NULL);
lovrPlatformGetFramebufferSize(&framebufferWidth, NULL);
int width, height, framebufferWidth, framebufferHeight;
lovrPlatformGetWindowSize(&width, &height);
lovrPlatformGetFramebufferSize(&framebufferWidth, &framebufferHeight);
if (width == 0 || framebufferWidth == 0) {
return 0.f;
} else {