From c021c7741d880c5d6f3d895fba18b83d514744e1 Mon Sep 17 00:00:00 2001 From: illusion98 <37698908+win98and95@users.noreply.github.com> Date: Wed, 14 Aug 2019 09:15:41 -0500 Subject: [PATCH] [Kernel] Add license mask as a config variable --- src/xenia/kernel/xam/xam_content.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/xenia/kernel/xam/xam_content.cc b/src/xenia/kernel/xam/xam_content.cc index 61e4ecdd2..17acc798f 100644 --- a/src/xenia/kernel/xam/xam_content.cc +++ b/src/xenia/kernel/xam/xam_content.cc @@ -14,6 +14,14 @@ #include "xenia/kernel/xenumerator.h" #include "xenia/xbox.h" +DEFINE_int32(license_mask, 0, + "Set license mask for activated content: " + "0 - disable all licenses / " + "1 - enable the first license - usually the full version license " + "in Xbox Live Arcade games / " + "-1 or 0xFFFFFFFF - enable all possible licenses.", + "Content"); + namespace xe { namespace kernel { namespace xam { @@ -49,7 +57,7 @@ dword_result_t XamContentGetLicenseMask(lpdword_t mask_ptr, // Each bit in the mask represents a granted license. Available licenses // seems to vary from game to game, but most appear to use bit 0 to indicate // if the game is purchased or not. - *mask_ptr = 0; + *mask_ptr = static_cast(cvars::license_mask); if (overlapped_ptr) { kernel_state()->CompleteOverlappedImmediate(overlapped_ptr,