mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Merge pull request #2745 from AdmiralCurtiss/wiimote-disconnect-message
Display a message on screen when the emulated software disconnects a Wiimote.
This commit is contained in:
commit
1c95cd5ad5
@ -1305,6 +1305,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandDisconnect(u8* _Input)
|
||||
DEBUG_LOG(WII_IPC_WIIMOTE, " Reason: 0x%02x", pDiscon->reason);
|
||||
|
||||
Host_SetWiiMoteConnectionState(0);
|
||||
DisplayDisconnectMessage((pDiscon->con_handle & 0xFF) + 1, pDiscon->reason);
|
||||
|
||||
SendEventCommandStatus(HCI_CMD_DISCONNECT);
|
||||
SendEventDisconnect(pDiscon->con_handle, pDiscon->reason);
|
||||
@ -1874,6 +1875,13 @@ CWII_IPC_HLE_WiiMote* CWII_IPC_HLE_Device_usb_oh1_57e_305::AccessWiiMote(u16 _Co
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void CWII_IPC_HLE_Device_usb_oh1_57e_305::DisplayDisconnectMessage(const int wiimoteNumber, const int reason)
|
||||
{
|
||||
// TODO: If someone wants to be fancy we could also figure out what the values for pDiscon->reason mean
|
||||
// and display things like "Wiimote %i disconnected due to inactivity!" etc.
|
||||
Core::DisplayMessage(StringFromFormat(_trans("Wiimote %i disconnected by emulated software"), wiimoteNumber), 3000);
|
||||
}
|
||||
|
||||
void CWII_IPC_HLE_Device_usb_oh1_57e_305::LOG_LinkKey(const u8* _pLinkKey)
|
||||
{
|
||||
DEBUG_LOG(WII_IPC_WIIMOTE, " link key: "
|
||||
|
@ -265,6 +265,8 @@ private:
|
||||
void CommandVendorSpecific_FC4C(u8* _Input, u32 _Size);
|
||||
void CommandVendorSpecific_FC4F(u8* _Input, u32 _Size);
|
||||
|
||||
static void DisplayDisconnectMessage(const int wiimoteNumber, const int reason);
|
||||
|
||||
// Debugging
|
||||
void LOG_LinkKey(const u8* _pLinkKey);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user