summaryrefslogtreecommitdiff
path: root/Source/Android/app/src/main/java
diff options
context:
space:
mode:
authorCharles Lombardo <clombardo169@gmail.com>2022-11-22 15:18:45 -0500
committerCharles Lombardo <clombardo169@gmail.com>2022-11-22 15:19:15 -0500
commite67788571a9e6e72f6cf2cb4c239f3dc47960283 (patch)
treef850e07d94b277172e00af645880a861bfddf175 /Source/Android/app/src/main/java
parent8f5a58f8be7e6979e277eb16934b140e4bbf10a4 (diff)
Android: Fix condition where we set grid span too early
Diffstat (limited to 'Source/Android/app/src/main/java')
-rw-r--r--Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/platform/PlatformGamesFragment.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/platform/PlatformGamesFragment.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/platform/PlatformGamesFragment.java
index 527b7d659d..d26476f1a6 100644
--- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/platform/PlatformGamesFragment.java
+++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/platform/PlatformGamesFragment.java
@@ -75,6 +75,11 @@ public final class PlatformGamesFragment extends Fragment implements PlatformGam
@Override
public void onGlobalLayout()
{
+ if (mBinding.getRoot().getMeasuredWidth() == 0)
+ {
+ return;
+ }
+
int columns = mBinding.getRoot().getMeasuredWidth() /
requireContext().getResources().getDimensionPixelSize(R.dimen.card_width);
if (columns == 0)