mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Add sceDisplaySetMode error code base on JPCSP
This commit is contained in:
parent
b0e97a0d4c
commit
d2f7a9974f
1 changed files with 11 additions and 1 deletions
|
@ -101,6 +101,7 @@ static int numVBlanksSinceFlip;
|
||||||
static u64 frameStartTicks;
|
static u64 frameStartTicks;
|
||||||
const int hCountPerVblank = 286;
|
const int hCountPerVblank = 286;
|
||||||
|
|
||||||
|
const int PSP_DISPLAY_MODE_LCD = 0;
|
||||||
|
|
||||||
std::vector<WaitVBlankInfo> vblankWaitingThreads;
|
std::vector<WaitVBlankInfo> vblankWaitingThreads;
|
||||||
// Key is the callback id it was for, or if no callback, the thread id.
|
// Key is the callback id it was for, or if no callback, the thread id.
|
||||||
|
@ -637,8 +638,17 @@ u32 sceDisplayIsVblank() {
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 sceDisplaySetMode(int displayMode, int displayWidth, int displayHeight) {
|
u32 sceDisplaySetMode(int displayMode, int displayWidth, int displayHeight) {
|
||||||
DEBUG_LOG(SCEDISPLAY,"sceDisplaySetMode(%i, %i, %i)", displayMode, displayWidth, displayHeight);
|
if (displayWidth <= 0 || displayHeight <= 0 || (displayWidth & 0x7) != 0) {
|
||||||
|
WARN_LOG(SCEDISPLAY, "sceDisplaySetMode INVALID SIZE (%i, %i, %i)", displayMode, displayWidth, displayHeight);
|
||||||
|
return SCE_KERNEL_ERROR_INVALID_SIZE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (displayMode != PSP_DISPLAY_MODE_LCD) {
|
||||||
|
WARN_LOG(SCEDISPLAY, "sceDisplaySetMode INVALID MODE(%i, %i, %i)", displayMode, displayWidth, displayHeight);
|
||||||
|
return SCE_KERNEL_ERROR_INVALID_MODE;
|
||||||
|
}
|
||||||
|
|
||||||
|
DEBUG_LOG(SCEDISPLAY,"sceDisplaySetMode(%i, %i, %i)", displayMode, displayWidth, displayHeight);
|
||||||
if (!hasSetMode) {
|
if (!hasSetMode) {
|
||||||
gpu->InitClear();
|
gpu->InitClear();
|
||||||
hasSetMode = true;
|
hasSetMode = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue