mirror of
https://github.com/debauchee/barrier.git
synced 2025-07-28 05:48:40 +02:00
Make sure all variables are non zero #5030
This commit is contained in:
parent
a09bfc5f07
commit
c994b0a4f7
1 changed files with 4 additions and 1 deletions
|
@ -29,7 +29,10 @@ size_t DpiHelper::s_primaryHeightCenter = 0;
|
||||||
|
|
||||||
void DpiHelper::calculateDpi(size_t width, size_t height)
|
void DpiHelper::calculateDpi(size_t width, size_t height)
|
||||||
{
|
{
|
||||||
if (s_resolutionWidth == 0 || s_resolutionHeight == 0) {
|
if (s_resolutionWidth == 0 ||
|
||||||
|
s_resolutionHeight == 0 ||
|
||||||
|
s_primaryWidthCenter == 0 ||
|
||||||
|
s_primaryHeightCenter == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue