mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-12 22:56:52 +01:00
IPCHLE: clean up spelling.
This commit is contained in:
parent
063ab30e3d
commit
58e9b65f9b
@ -158,7 +158,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
||||
MMIO::ComplexWrite<u32>([](u32, u32 val) {
|
||||
ctrl.ppc(val);
|
||||
if (ctrl.X1)
|
||||
WII_IPC_HLE_Interface::EnqRequest(ppc_msg);
|
||||
WII_IPC_HLE_Interface::EnqueueRequest(ppc_msg);
|
||||
WII_IPC_HLE_Interface::Update();
|
||||
CoreTiming::ScheduleEvent_Threadsafe(0, updateInterrupts, 0);
|
||||
})
|
||||
|
@ -77,21 +77,18 @@ typedef std::deque<u32> ipc_msg_queue;
|
||||
static ipc_msg_queue request_queue; // ppc -> arm
|
||||
static ipc_msg_queue reply_queue; // arm -> ppc
|
||||
|
||||
static int enque_reply;
|
||||
static int enque_request;
|
||||
static int event_enqueue_reply;
|
||||
static int event_enqueue_request;
|
||||
|
||||
static u64 last_reply_time;
|
||||
|
||||
// NOTE: Only call this if you have correctly handled
|
||||
// CommandAddress+0 and CommandAddress+8.
|
||||
// Please search for examples of this being called elsewhere.
|
||||
void EnqueReplyCallback(u64 userdata, int)
|
||||
static void EnqueueReplyCallback(u64 userdata, int)
|
||||
{
|
||||
reply_queue.push_back((u32)userdata);
|
||||
Update();
|
||||
}
|
||||
|
||||
void EnqueRequestCallback(u64 userdata, int)
|
||||
static void EnqueueRequestCallback(u64 userdata, int)
|
||||
{
|
||||
request_queue.push_back((u32)userdata);
|
||||
Update();
|
||||
@ -139,14 +136,14 @@ void Init()
|
||||
g_DeviceMap[i] = new CWII_IPC_HLE_Device_stub(i, "/dev/usb/oh1"); i++;
|
||||
g_DeviceMap[i] = new IWII_IPC_HLE_Device(i, "_Unimplemented_Device_"); i++;
|
||||
|
||||
enque_reply = CoreTiming::RegisterEvent("IPCReply", EnqueReplyCallback);
|
||||
enque_request = CoreTiming::RegisterEvent("IPCRequest", EnqueRequestCallback);
|
||||
event_enqueue_reply = CoreTiming::RegisterEvent("IPCReply", EnqueueReplyCallback);
|
||||
event_enqueue_request = CoreTiming::RegisterEvent("IPCRequest", EnqueueRequestCallback);
|
||||
}
|
||||
|
||||
void Reset(bool _bHard)
|
||||
{
|
||||
CoreTiming::RemoveAllEvents(enque_reply);
|
||||
CoreTiming::RemoveAllEvents(enque_request);
|
||||
CoreTiming::RemoveAllEvents(event_enqueue_reply);
|
||||
CoreTiming::RemoveAllEvents(event_enqueue_request);
|
||||
|
||||
for (IWII_IPC_HLE_Device*& dev : g_FdMap)
|
||||
{
|
||||
@ -555,28 +552,28 @@ void ExecuteCommand(u32 _Address)
|
||||
last_reply_time = CoreTiming::GetTicks() + reply_delay;
|
||||
|
||||
// Generate a reply to the IPC command
|
||||
EnqReply(_Address, reply_delay);
|
||||
EnqueueReply(_Address, reply_delay);
|
||||
}
|
||||
}
|
||||
|
||||
// Happens AS SOON AS IPC gets a new pointer!
|
||||
void EnqRequest(u32 _Address)
|
||||
void EnqueueRequest(u32 address)
|
||||
{
|
||||
CoreTiming::ScheduleEvent(1000, enque_request, _Address);
|
||||
CoreTiming::ScheduleEvent(1000, event_enqueue_request, address);
|
||||
}
|
||||
|
||||
// Called when IOS module has some reply
|
||||
// NOTE: Only call this if you have correctly handled
|
||||
// CommandAddress+0 and CommandAddress+8.
|
||||
// Please search for examples of this being called elsewhere.
|
||||
void EnqReply(u32 _Address, int cycles_in_future)
|
||||
void EnqueueReply(u32 address, int cycles_in_future)
|
||||
{
|
||||
CoreTiming::ScheduleEvent(cycles_in_future, enque_reply, _Address);
|
||||
CoreTiming::ScheduleEvent(cycles_in_future, event_enqueue_reply, address);
|
||||
}
|
||||
|
||||
void EnqReply_Threadsafe(u32 _Address, int cycles_in_future)
|
||||
void EnqueueReply_Threadsafe(u32 address, int cycles_in_future)
|
||||
{
|
||||
CoreTiming::ScheduleEvent_Threadsafe(cycles_in_future, enque_reply, _Address);
|
||||
CoreTiming::ScheduleEvent_Threadsafe(cycles_in_future, event_enqueue_reply, address);
|
||||
}
|
||||
|
||||
// This is called every IPC_HLE_PERIOD from SystemTimers.cpp
|
||||
|
@ -62,8 +62,8 @@ void UpdateDevices();
|
||||
|
||||
void ExecuteCommand(u32 _Address);
|
||||
|
||||
void EnqRequest(u32 _Address);
|
||||
void EnqReply(u32 _Address, int cycles_in_future = 0);
|
||||
void EnqReply_Threadsafe(u32 _Address, int cycles_in_future = 0);
|
||||
void EnqueueRequest(u32 address);
|
||||
void EnqueueReply(u32 address, int cycles_in_future = 0);
|
||||
void EnqueueReply_Threadsafe(u32 address, int cycles_in_future = 0);
|
||||
|
||||
} // end of namespace WII_IPC_HLE_Interface
|
||||
|
@ -998,7 +998,7 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
|
||||
Memory::Write_U32(IPC_CMD_IOCTLV, _CommandAddress + 8);
|
||||
|
||||
// Generate a reply to the IPC command
|
||||
WII_IPC_HLE_Interface::EnqReply(_CommandAddress, 0);
|
||||
WII_IPC_HLE_Interface::EnqueueReply(_CommandAddress, 0);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ void CWII_IPC_HLE_Device_hid::checkUsbUpdates(CWII_IPC_HLE_Device_hid* hid)
|
||||
// Return value
|
||||
Memory::Write_U32(0, hid->deviceCommandAddress + 4);
|
||||
|
||||
WII_IPC_HLE_Interface::EnqReply_Threadsafe(hid->deviceCommandAddress);
|
||||
WII_IPC_HLE_Interface::EnqueueReply_Threadsafe(hid->deviceCommandAddress);
|
||||
hid->deviceCommandAddress = 0;
|
||||
}
|
||||
}
|
||||
@ -65,7 +65,7 @@ void CWII_IPC_HLE_Device_hid::handleUsbUpdates(struct libusb_transfer *transfer)
|
||||
// Return value
|
||||
Memory::Write_U32(ret, replyAddress + 4);
|
||||
|
||||
WII_IPC_HLE_Interface::EnqReply_Threadsafe(replyAddress);
|
||||
WII_IPC_HLE_Interface::EnqueueReply_Threadsafe(replyAddress);
|
||||
//DEBUG_LOG(WII_IPC_HID, "OMG OMG OMG I GOT A CALLBACK, IMMA BE FAMOUS %d %d %d", transfer->actual_length, transfer->length, transfer->status);
|
||||
}
|
||||
|
||||
@ -249,7 +249,7 @@ bool CWII_IPC_HLE_Device_hid::IOCtl(u32 _CommandAddress)
|
||||
|
||||
// Return value
|
||||
Memory::Write_U32(-1, deviceCommandAddress + 4);
|
||||
WII_IPC_HLE_Interface::EnqReply(deviceCommandAddress);
|
||||
WII_IPC_HLE_Interface::EnqueueReply(deviceCommandAddress);
|
||||
deviceCommandAddress = 0;
|
||||
}
|
||||
DEBUG_LOG(WII_IPC_HID, "HID::IOCtl(Shutdown) (BufferIn: (%08x, %i), BufferOut: (%08x, %i)",
|
||||
|
@ -22,7 +22,7 @@ void CWII_IPC_HLE_Device_sdio_slot0::EnqueueReply(u32 CommandAddress, u32 Return
|
||||
|
||||
Memory::Write_U32(ReturnValue, CommandAddress + 4);
|
||||
|
||||
WII_IPC_HLE_Interface::EnqReply(CommandAddress);
|
||||
WII_IPC_HLE_Interface::EnqueueReply(CommandAddress);
|
||||
}
|
||||
|
||||
CWII_IPC_HLE_Device_sdio_slot0::CWII_IPC_HLE_Device_sdio_slot0(u32 _DeviceID, const std::string& _rDeviceName)
|
||||
|
@ -24,7 +24,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::EnqueueReply(u32 CommandAddress)
|
||||
// The original hardware overwrites the command type with the async reply type.
|
||||
Memory::Write_U32(IPC_REP_ASYNC, CommandAddress);
|
||||
|
||||
WII_IPC_HLE_Interface::EnqReply(CommandAddress);
|
||||
WII_IPC_HLE_Interface::EnqueueReply(CommandAddress);
|
||||
}
|
||||
|
||||
// The device class
|
||||
|
@ -632,7 +632,7 @@ void WiiSockMan::EnqueueReply(u32 CommandAddress, s32 ReturnValue, IPCCommandTyp
|
||||
// Return value
|
||||
Memory::Write_U32(ReturnValue, CommandAddress + 4);
|
||||
|
||||
WII_IPC_HLE_Interface::EnqReply(CommandAddress);
|
||||
WII_IPC_HLE_Interface::EnqueueReply(CommandAddress);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user