mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Add error handling to sceRtcGetDaysInMonth().
This commit is contained in:
parent
21398bfcf8
commit
965eeaf9da
2 changed files with 6 additions and 1 deletions
|
@ -23,6 +23,7 @@
|
|||
enum
|
||||
{
|
||||
SCE_KERNEL_ERROR_OK = 0,
|
||||
SCE_KERNEL_ERROR_INVALID_ARGUMENT = 0x800001ff,
|
||||
SCE_KERNEL_ERROR_ERROR = 0x80020001,
|
||||
SCE_KERNEL_ERROR_NOTIMP = 0x80020002,
|
||||
SCE_KERNEL_ERROR_ILLEGAL_EXPCODE = 0x80020032,
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "HLE.h"
|
||||
#include "../MIPS/MIPS.h"
|
||||
|
||||
#include "sceKernel.h"
|
||||
#include "sceRtc.h"
|
||||
#include "../CoreTiming.h"
|
||||
|
||||
|
@ -87,9 +88,12 @@ u32 sceRtcGetDayOfWeek(u32 year, u32 month, u32 day)
|
|||
|
||||
u32 sceRtcGetDaysInMonth(u32 year, u32 month)
|
||||
{
|
||||
DEBUG_LOG(HLE,"sceRtcGetDaysInMonth()");
|
||||
DEBUG_LOG(HLE,"sceRtcGetDaysInMonth(%d, %d)", year, month);
|
||||
u32 numberOfDays;
|
||||
|
||||
if (year <= 0 || month <= 0 || month > 12)
|
||||
return SCE_KERNEL_ERROR_INVALID_ARGUMENT;
|
||||
|
||||
switch (month)
|
||||
{
|
||||
case 4:
|
||||
|
|
Loading…
Add table
Reference in a new issue