fix crash in lovrGraphicsGetPixelDensity

Neither Quest nor Pico check for null on its out-params.
Better to send in dummy params to avoid nulls.
This commit is contained in:
Nevyn Bengtsson 2020-08-05 14:48:58 +02:00
parent e0decf5327
commit b938a839e0
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 {