From 199845a9d1d416e7103d4a4e19fc965b3680f85c Mon Sep 17 00:00:00 2001 From: Jake Date: Mon, 5 May 2014 21:58:49 -0500 Subject: [PATCH] Fixed 'Assign_changes' usage for cellpad / padhandler --- rpcs3/Emu/Io/PadHandler.h | 5 ++--- rpcs3/Emu/Io/Windows/WindowsPadHandler.h | 4 +++- rpcs3/Emu/SysCalls/lv2/SC_Pad.cpp | 9 +++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/rpcs3/Emu/Io/PadHandler.h b/rpcs3/Emu/Io/PadHandler.h index e099e2ef37..4d7a97e171 100644 --- a/rpcs3/Emu/Io/PadHandler.h +++ b/rpcs3/Emu/Io/PadHandler.h @@ -215,7 +215,8 @@ public: if(button.m_keyCode != code) continue; - pad.m_port_status |= CELL_PAD_STATUS_ASSIGN_CHANGES; + //This is for reporting when a controller connects/disconnects, shouldn't be here + //pad.m_port_status |= CELL_PAD_STATUS_ASSIGN_CHANGES; if(button.m_pressed && !pressed) { @@ -232,8 +233,6 @@ public: if (stick.m_keyCodeMax != code && stick.m_keyCodeMin != code) continue; - pad.m_port_status |= CELL_PAD_STATUS_ASSIGN_CHANGES; - if (stick.m_keyCodeMax == code) { stick.m_min_pressed = false; //!!! need fix !!! diff --git a/rpcs3/Emu/Io/Windows/WindowsPadHandler.h b/rpcs3/Emu/Io/Windows/WindowsPadHandler.h index 74f8e2ee4f..e67b659c30 100644 --- a/rpcs3/Emu/Io/Windows/WindowsPadHandler.h +++ b/rpcs3/Emu/Io/Windows/WindowsPadHandler.h @@ -33,8 +33,10 @@ public: void LoadSettings() { + //Fixed assign change, default is both sensor and press off m_pads.emplace_back( - CELL_PAD_STATUS_CONNECTED, CELL_PAD_SETTING_PRESS_ON | CELL_PAD_SETTING_SENSOR_OFF, + CELL_PAD_STATUS_CONNECTED | CELL_PAD_STATUS_ASSIGN_CHANGES, + CELL_PAD_SETTING_PRESS_OFF | CELL_PAD_SETTING_SENSOR_OFF, CELL_PAD_CAPABILITY_PS3_CONFORMITY | CELL_PAD_CAPABILITY_PRESS_MODE, CELL_PAD_DEV_TYPE_STANDARD); diff --git a/rpcs3/Emu/SysCalls/lv2/SC_Pad.cpp b/rpcs3/Emu/SysCalls/lv2/SC_Pad.cpp index 62b03c1adf..e7fec43e44 100644 --- a/rpcs3/Emu/SysCalls/lv2/SC_Pad.cpp +++ b/rpcs3/Emu/SysCalls/lv2/SC_Pad.cpp @@ -90,8 +90,6 @@ int cellPadGetData(u32 port_no, u32 data_addr) u16 d1 = 0; u16 d2 = 0; - pad.m_port_status &= ~CELL_PAD_STATUS_ASSIGN_CHANGES; - for(Button& button : pad.m_buttons) { switch(button.m_offset) @@ -191,7 +189,8 @@ int cellPadGetInfo(u32 info_addr) info.now_connect = rinfo.now_connect; info.system_info = rinfo.system_info; - const std::vector& pads = Emu.GetPadManager().GetPads(); + //Can't have this as const, we need to reset Assign Changes Flag here + std::vector& pads = Emu.GetPadManager().GetPads(); for(u32 i=0; i& pads = Emu.GetPadManager().GetPads(); + std::vector& pads = Emu.GetPadManager().GetPads(); for(u32 i=0; i