summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Common/Src/MemoryUtil.h6
-rw-r--r--Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_stm.h16
2 files changed, 17 insertions, 5 deletions
diff --git a/Source/Core/Common/Src/MemoryUtil.h b/Source/Core/Common/Src/MemoryUtil.h
index 29bd911c9d..7f568d3701 100644
--- a/Source/Core/Common/Src/MemoryUtil.h
+++ b/Source/Core/Common/Src/MemoryUtil.h
@@ -22,10 +22,8 @@ void* AllocateExecutableMemory(size_t size, bool low = true);
void* AllocateMemoryPages(size_t size);
void FreeMemoryPages(void* ptr, size_t size);
void WriteProtectMemory(void* ptr, size_t size, bool executable = false);
-void UnWriteProtectMemory(void* ptr, size_t size, bool allowExecute);
-
-
-inline int GetPageSize() {return 4096;}
+void UnWriteProtectMemory(void* ptr, size_t size, bool allowExecute = false);
+inline int GetPageSize() { return 4096; }
#endif
diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_stm.h b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_stm.h
index a50ce13e98..0842e14fb2 100644
--- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_stm.h
+++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_stm.h
@@ -54,11 +54,18 @@ public:
virtual bool Open(u32 _CommandAddress, u32 _Mode)
{
- ERROR_LOG(WII_IPC_SD, "STM: Open");
+ ERROR_LOG(WII_IPC_SD, "STM immediate: Open");
Memory::Write_U32(GetDeviceID(), _CommandAddress+4);
return true;
}
+ virtual bool Close(u32 _CommandAddress)
+ {
+ ERROR_LOG(WII_IPC_SD, "STM immediate: Close");
+ Memory::Write_U32(0, _CommandAddress+4);
+ return true;
+ }
+
virtual bool IOCtl(u32 _CommandAddress)
{
u32 Parameter = Memory::Read_U32(_CommandAddress +0x0C);
@@ -141,6 +148,13 @@ public:
return true;
}
+ virtual bool Close(u32 _CommandAddress)
+ {
+ INFO_LOG(WII_IPC_SD, "STM eventhook: Close");
+ Memory::Write_U32(0, _CommandAddress+4);
+ return true;
+ }
+
virtual bool IOCtl(u32 _CommandAddress)
{
u32 Parameter = Memory::Read_U32(_CommandAddress +0x0C);