mirror of https://github.com/bjornbytes/lovr.git
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:
parent
e0decf5327
commit
b938a839e0
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue