SDL: Vite: return system installed memory

From 656eb7df35efcd7382a5634366ed8cd9b23633d3 Mon Sep 17 00:00:00 2001
From: Ivan Epifanov <[EMAIL REDACTED]>
Date: Wed, 23 Jun 2021 14:35:36 +0300
Subject: [PATCH] Vite: return system installed memory

---
 src/cpuinfo/SDL_cpuinfo.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/cpuinfo/SDL_cpuinfo.c b/src/cpuinfo/SDL_cpuinfo.c
index 1668e701cd..9d602cf196 100644
--- a/src/cpuinfo/SDL_cpuinfo.c
+++ b/src/cpuinfo/SDL_cpuinfo.c
@@ -1025,6 +1025,13 @@ SDL_GetSystemRAM(void)
             }
         }
 #endif
+#ifdef __VITA__
+        if (SDL_SystemRAM <= 0) {
+            /* Vita has 512MiB on SoC, that's split into 256MiB(+109MiB in extended memory mode) for app
+               +26MiB of physically continuous memory, +112MiB of CDRAM(VRAM) + system reserved memory. */
+            SDL_SystemRAM = 536870912;
+        }
+#endif
 #endif
     }
     return SDL_SystemRAM;