mirror of https://github.com/bjornbytes/lovr.git
Merge pull request #281 from alloverse/fix-pixeldensity
fix crash in lovrGraphicsGetPixelDensity
This commit is contained in:
commit
eb97230c0d
|
@ -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