From ad80a78904dfd1e10dfa52ac49723810ab74bf1c Mon Sep 17 00:00:00 2001 From: "kev :)" Date: Sat, 10 Nov 2012 23:04:10 +0000 Subject: [PATCH] Add some impose commands --- Core/FileSystems/ISOFileSystem.cpp | 2 +- Core/HLE/sceImpose.cpp | 28 ++++++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/Core/FileSystems/ISOFileSystem.cpp b/Core/FileSystems/ISOFileSystem.cpp index 2082472475..b1c1c4f2b7 100644 --- a/Core/FileSystems/ISOFileSystem.cpp +++ b/Core/FileSystems/ISOFileSystem.cpp @@ -512,7 +512,7 @@ std::vector ISOFileSystem::GetDirListing(std::string path) { TreeEntry *e = entry->children[i]; - if(!strcmp(e->name, ".") || !strcmp(e->name, "..")) // do not include the relative entries in the list + if(e->name == "." || e->name == "..") // do not include the relative entries in the list continue; PSPFileInfo x; diff --git a/Core/HLE/sceImpose.cpp b/Core/HLE/sceImpose.cpp index d6b0a17182..7e8875206f 100644 --- a/Core/HLE/sceImpose.cpp +++ b/Core/HLE/sceImpose.cpp @@ -19,6 +19,9 @@ #include "FunctionWrappers.h" #include "../MIPS/MIPS.h" +u32 iLanguage = 0; +u32 iButtonValue = 0; + u32 sceImposeGetBatteryIconStatus(u32 chargingPtr, u32 iconStatusPtr) { DEBUG_LOG(HLE,"%i=sceImposeGetBatteryIconStatus(%08x, %08x)", chargingPtr, iconStatusPtr); @@ -29,13 +32,34 @@ u32 sceImposeGetBatteryIconStatus(u32 chargingPtr, u32 iconStatusPtr) return 0; } +u32 sceImposeSetLanguageMode(u32 languageVal, u32 buttonVal) +{ + DEBUG_LOG(HLE,"%i=sceImposeSetLanguageMode(%08x, %08x)", languageVal, buttonVal); + iLanguage = languageVal; + iButtonValue = buttonVal; + return 0; +} + + + + + +u32 sceImposeGetLanguageMode(u32 languagePtr, u32 btnPtr) +{ + DEBUG_LOG(HLE,"%i=sceImposeGetLanguageMode(%08x, %08x)", languagePtr, btnPtr); + if (Memory::IsValidAddress(languagePtr)) + Memory::Write_U32(iLanguage, languagePtr); + if (Memory::IsValidAddress(btnPtr)) + Memory::Write_U32(iButtonValue, btnPtr); + return 0; +} //OSD stuff? home button? const HLEFunction sceImpose[] = { - {0x36aa6e91, 0, "sceImposeSetLanguageMode"}, // Seen + {0x36aa6e91, &WrapU_UU, "sceImposeSetLanguageMode"}, // Seen {0x381bd9e7, 0, "sceImposeHomeButton"}, - {0x24fd7bcf, 0, "sceImposeGetLanguageMode"}, + {0x24fd7bcf, &WrapU_UU, "sceImposeGetLanguageMode"}, {0x8c943191, &WrapU_UU, "sceImposeGetBatteryIconStatus"}, };