From a15c9945a74650f923514a258cc1a1c4807e31e6 Mon Sep 17 00:00:00 2001 From: yellows8 Date: Mon, 22 Oct 2018 13:37:25 -0400 Subject: [PATCH] Updated comments regarding requirements for using video-recording, etc. Changed appletInitializeGamePlayRecording to (void) since the sysmodule only supports a fixed size. --- nx/include/switch/services/applet.h | 6 +++--- nx/source/services/applet.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nx/include/switch/services/applet.h b/nx/include/switch/services/applet.h index 5bf7f16f..203dcb12 100644 --- a/nx/include/switch/services/applet.h +++ b/nx/include/switch/services/applet.h @@ -63,11 +63,11 @@ Result appletIsGamePlayRecordingSupported(bool *flag); /// See also \ref appletInitializeGamePlayRecording. Result appletSetGamePlayRecordingState(bool state); -/// This is currently not usable. -/// Initializes video recording. When size is 0, the default size of 0x6000000 is used. +/// Initializes video recording. This allocates a 0x6000000-byte buffer for the TransferMemory, cleanup is handled automatically during app exit in \ref appletExit. /// Only available with AppletType_*Application on 3.0.0+, hence errors from this can be ignored. /// Video recording is only fully available system-side with 4.0.0+. -Result appletInitializeGamePlayRecording(size_t size); +/// Only usable when running under a title which supports video recording. +Result appletInitializeGamePlayRecording(void); /** * @brief Blocks the usage of the home button. diff --git a/nx/source/services/applet.c b/nx/source/services/applet.c index 59562335..dffc4b12 100644 --- a/nx/source/services/applet.c +++ b/nx/source/services/applet.c @@ -852,8 +852,9 @@ Result appletSetGamePlayRecordingState(bool state) { return rc; } -Result appletInitializeGamePlayRecording(size_t size) { +Result appletInitializeGamePlayRecording(void) { Result rc=0; + size_t size = 0x6000000; g_appletRecordingInitialized = 0; @@ -863,7 +864,6 @@ Result appletInitializeGamePlayRecording(size_t size) { if (!kernelAbove300()) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); - if (size==0) size = 0x6000000; rc = tmemCreate(&g_appletRecordingTmem, size, Perm_None); if (R_FAILED(rc)) return rc;