2020-02-15 23:36:20 +01:00
|
|
|
|
#include "stdafx.h"
|
2015-09-13 09:26:01 +02:00
|
|
|
|
#include "Emu/System.h"
|
2016-03-21 20:43:03 +01:00
|
|
|
|
#include "Emu/Cell/PPUModule.h"
|
2020-09-11 16:02:25 +02:00
|
|
|
|
#include "cellSysutil.h"
|
2015-07-30 02:10:36 +02:00
|
|
|
|
|
2018-08-25 14:39:00 +02:00
|
|
|
|
LOG_CHANNEL(cellSysutilMisc);
|
2015-07-30 02:10:36 +02:00
|
|
|
|
|
|
|
|
|
|
s32 cellSysutilGetLicenseArea()
|
|
|
|
|
|
{
|
2016-01-12 22:57:16 +01:00
|
|
|
|
cellSysutilMisc.warning("cellSysutilGetLicenseArea()");
|
2015-09-13 09:26:01 +02:00
|
|
|
|
|
2020-09-11 16:02:25 +02:00
|
|
|
|
switch (const char region = Emu.GetTitleID().size() >= 3u ? Emu.GetTitleID().at(2) : '\0')
|
2015-09-13 09:26:01 +02:00
|
|
|
|
{
|
|
|
|
|
|
case 'J': return CELL_SYSUTIL_LICENSE_AREA_J;
|
|
|
|
|
|
case 'U': return CELL_SYSUTIL_LICENSE_AREA_A;
|
|
|
|
|
|
case 'E': return CELL_SYSUTIL_LICENSE_AREA_E;
|
|
|
|
|
|
case 'H': return CELL_SYSUTIL_LICENSE_AREA_H;
|
|
|
|
|
|
case 'K': return CELL_SYSUTIL_LICENSE_AREA_K;
|
|
|
|
|
|
case 'A': return CELL_SYSUTIL_LICENSE_AREA_C;
|
2020-09-11 16:02:25 +02:00
|
|
|
|
default: cellSysutilMisc.todo("Unknown license area: %s", Emu.GetTitleID()); return CELL_SYSUTIL_LICENSE_AREA_OTHER;
|
2015-09-13 09:26:01 +02:00
|
|
|
|
}
|
2015-07-30 02:10:36 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2016-03-21 20:43:03 +01:00
|
|
|
|
DECLARE(ppu_module_manager::cellSysutilMisc)("cellSysutilMisc", []()
|
2015-07-30 02:10:36 +02:00
|
|
|
|
{
|
|
|
|
|
|
REG_FUNC(cellSysutilMisc, cellSysutilGetLicenseArea);
|
|
|
|
|
|
});
|