aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author浅倉麗子2020-05-20 10:58:39 -0400
committer浅倉麗子2020-05-20 10:58:39 -0400
commitf29877957b63279670209a440683e043af48ba93 (patch)
tree71278e5f3f730677b45709ed0de69ad4b48a5d39
parentUse specific NID for syscall library (diff)
downloadsharpscale-f29877957b63279670209a440683e043af48ba93.tar.gz
Print memory budget info on config app startup
-rw-r--r--config-app/CMakeLists.txt2
-rw-r--r--config-app/main.c11
2 files changed, 12 insertions, 1 deletions
diff --git a/config-app/CMakeLists.txt b/config-app/CMakeLists.txt
index 1c46a59..873693c 100644
--- a/config-app/CMakeLists.txt
+++ b/config-app/CMakeLists.txt
@@ -53,6 +53,6 @@ dolce_create_vpk(${PROJECT_NAME}.vpk
AKRK00005
"${SELF}"
NAME "Sharpscale Config Menu"
- VERSION 01.03
+ VERSION 01.04
FILE icon0.png sce_sys/icon0.png
)
diff --git a/config-app/main.c b/config-app/main.c
index c4209f4..24bc61e 100644
--- a/config-app/main.c
+++ b/config-app/main.c
@@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+#include <psp2/appmgr.h>
#include <psp2/ctrl.h>
#include <psp2/kernel/clib.h>
#include <psp2/kernel/sysmem.h>
@@ -40,6 +41,16 @@ static int text_yellow(int a) {
}
int main(int argc, char **argv) { (void)argc; (void)argv;
+
+ SceAppMgrBudgetInfo info = {0};
+ info.size = sizeof(info);
+ if (0 == sceAppMgrGetBudgetInfo(&info)) {
+ sceClibPrintf("Free LPDDR2: %d KB\n", info.freeLPDDR2 / 1024);
+ sceClibPrintf("Budget LPDDR2: %d KB\n", info.budgetLPDDR2 / 1024);
+ } else {
+ sceClibPrintf("Failed to retrieve application memory budget\n");
+ }
+
SceUID memid = sceKernelAllocMemBlock(
"SharpscaleConfigMemBlock",
SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE,