diff --git a/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp b/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp index a186c5cbaf..b175bfa982 100644 --- a/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp +++ b/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp @@ -39,7 +39,7 @@ void AudioCommonConfig::Set(IniFile &file) { file.Set("Config", "EnableDTKMusic", m_EnableDTKMusic); file.Set("Config", "EnableThrottle", m_EnableThrottle); file.Set("Config", "Backend", sBackend); - file.Set("Config", "Volume", m_Volume); +// file.Set("Config", "Volume", m_Volume); } // Update according to the values (stream/mixer) diff --git a/Source/Core/Core/Src/HW/WII_IPC.cpp b/Source/Core/Core/Src/HW/WII_IPC.cpp index 424487fdf2..f3d78c7aa4 100644 --- a/Source/Core/Core/Src/HW/WII_IPC.cpp +++ b/Source/Core/Core/Src/HW/WII_IPC.cpp @@ -90,6 +90,8 @@ u32 g_Address = NULL; u32 g_Reply = NULL; u32 g_ReplyHead = NULL; u32 g_ReplyTail = NULL; +u32 g_ReplyNum = NULL; +u32 g_ReplyFifo[REPLY_FIFO_DEPTH] = {0}; u32 g_SensorBarPower = NULL; UIPC_Status g_IPC_Status(NULL); UIPC_Config g_IPC_Config(NULL); @@ -102,6 +104,8 @@ void DoState(PointerWrap &p) p.Do(g_Reply); p.Do(g_ReplyHead); p.Do(g_ReplyTail); + p.Do(g_ReplyNum); + p.DoArray(g_ReplyFifo, REPLY_FIFO_DEPTH); p.Do(g_SensorBarPower); p.Do(g_IPC_Status); p.Do(g_IPC_Config); @@ -116,6 +120,7 @@ void Init() g_Reply = NULL; g_ReplyHead = NULL; g_ReplyTail = NULL; + g_ReplyNum = NULL; g_SensorBarPower = NULL; g_IPC_Status = UIPC_Status(NULL); g_IPC_Config = UIPC_Config(NULL); @@ -259,6 +264,7 @@ void GenerateReply(u32 _Address) void EnqReply(u32 _Address) { +/* // AyuanX: Replies are stored in a FIFO (depth 2), like ping-pong, and 2 is fairly enough // Simple structure of fixed length will do good for DoState // @@ -272,10 +278,23 @@ void EnqReply(u32 _Address) ERROR_LOG(WII_IPC, "Reply FIFO is full, something must be wrong!"); PanicAlert("WII_IPC: Reply FIFO is full, something must be wrong!"); } +*/ + if (g_ReplyNum < REPLY_FIFO_DEPTH) + { + g_ReplyFifo[g_ReplyTail++] = _Address; + g_ReplyTail &= REPLY_FIFO_MASK; + g_ReplyNum++; + } + else + { + ERROR_LOG(WII_IPC, "Reply FIFO is full, something must be wrong!"); + PanicAlert("WII_IPC: Reply FIFO is full, something must be wrong!"); + } } u32 DeqReply() { +/* u32 _Address = (g_ReplyHead) ? g_ReplyHead : g_ReplyTail; if (g_ReplyHead) @@ -283,6 +302,21 @@ u32 DeqReply() else g_ReplyTail = NULL; + return _Address; +*/ + u32 _Address; + + if (g_ReplyNum) + { + _Address = g_ReplyFifo[g_ReplyHead++]; + g_ReplyHead &= REPLY_FIFO_MASK; + g_ReplyNum--; + } + else + { + _Address = NULL; + } + return _Address; } diff --git a/Source/Core/Core/Src/HW/WII_IPC.h b/Source/Core/Core/Src/HW/WII_IPC.h index 5b4947fa96..7f91e20e16 100644 --- a/Source/Core/Core/Src/HW/WII_IPC.h +++ b/Source/Core/Core/Src/HW/WII_IPC.h @@ -23,6 +23,9 @@ class PointerWrap; namespace WII_IPCInterface { +#define REPLY_FIFO_DEPTH (8) +#define REPLY_FIFO_MASK (REPLY_FIFO_DEPTH - 1) + void Init(); void Reset(); void Shutdown(); diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp index bfeca59fc6..fdf06609ca 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp @@ -469,7 +469,7 @@ void Update() INFO_LOG(WII_IPC_HLE, "||-- Acknowledge Command Address: 0x%08x", _Address); ExecuteCommand(_Address); - +/* // AyuanX: Since current HLE time slot is empty, we can piggyback a reply // Besides, this trick makes a Ping-Pong Reply FIFO never get full // I don't know whether original hardware supports this feature or not @@ -481,7 +481,7 @@ void Update() WII_IPCInterface::GenerateReply(_Reply); INFO_LOG(WII_IPC_HLE, "<<-- Reply to Command Address: 0x%08x", _Reply); } - +*/ #if MAX_LOG_LEVEL >= DEBUG_LEVEL Debugger::PrintCallstack(LogTypes::WII_IPC_HLE, LogTypes::LDEBUG); #endif diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp index 911ef740ae..b0ccd48019 100644 --- a/Source/Core/DolphinWX/Src/Frame.cpp +++ b/Source/Core/DolphinWX/Src/Frame.cpp @@ -643,8 +643,9 @@ void CFrame::OnHostMessage(wxCommandEvent& event) #if defined(HAVE_X11) && HAVE_X11 case WM_USER_STOP: main_frame->DoStop(); - } + break; #endif + } } void CFrame::OnCustomHostMessage(int Id) diff --git a/Source/Core/InputCommon/Src/Configuration.cpp b/Source/Core/InputCommon/Src/Configuration.cpp index 79245bfe2f..c48e48d05f 100644 --- a/Source/Core/InputCommon/Src/Configuration.cpp +++ b/Source/Core/InputCommon/Src/Configuration.cpp @@ -232,6 +232,9 @@ std::string VKToString(int keycode) case VK_OEM_COMMA: return ","; case VK_OEM_PERIOD: return "."; + case VK_BROWSER_BACK: return "Nav Bwd"; + case VK_BROWSER_FORWARD: return "Nav Fwd"; + //default: return KeyString = KeyStr; }