diff --git a/Source/Core/Common/Src/DynamicLibrary.cpp b/Source/Core/Common/Src/DynamicLibrary.cpp index 07b30cdba7..286bb103c1 100644 --- a/Source/Core/Common/Src/DynamicLibrary.cpp +++ b/Source/Core/Common/Src/DynamicLibrary.cpp @@ -59,7 +59,7 @@ std::string GetLastErrorAsString() bool DynamicLibrary::Load(const char* filename) { if (!filename || strlen(filename) == 0) - { + { LOG(MASTER_LOG, "Missing filename of dynamic library to load"); return false; } @@ -85,7 +85,7 @@ bool DynamicLibrary::Load(const char* filename) LOG(MASTER_LOG, "Error loading DLL %s: %s", filename, dlerror()); #else printf("Error loading DLL %s: %s", filename, dlerror()); - #endif + #endif return false; } #endif diff --git a/Source/Core/Core/Src/HW/DSP.cpp b/Source/Core/Core/Src/HW/DSP.cpp index 35e01eac32..9c695fce5c 100644 --- a/Source/Core/Core/Src/HW/DSP.cpp +++ b/Source/Core/Core/Src/HW/DSP.cpp @@ -166,7 +166,7 @@ struct ARDMA // STATE_TO_SAVE -u8 *g_ARAM = NULL; +u8 *g_ARAM = NULL, *g_MEM2 = NULL; DSPState g_dspState; AudioDMA g_audioDMA; ARDMA g_arDMA; @@ -206,6 +206,7 @@ void Init() { // On the Wii, ARAM is simply mapped to EXRAM. g_ARAM = Memory::GetPointer(0x00000000); + g_MEM2 = Memory::GetPointer(0x10000000); } else { @@ -615,7 +616,9 @@ void Update_ARAM_DMA() // ============================================================= // This is how it works: The game has written sound to RAM, the DSP will read it with // this function. SamplePos in the plugin is double the value given here because it -// works on a nibble level. +// works on a nibble level. In Wii addresses can eather be for MEM1 or MEM2, when it wants +// to read from MEM2 it adds 0x2000000 (in nibble terms) to get up to the MEM2 hardware +// address. But in our case we use a second pointer and adjust the value down to 0x00... // ------------------- u8 ReadARAM(u32 _iAddress) { @@ -624,9 +627,21 @@ u8 ReadARAM(u32 _iAddress) // _dbg_assert_(DSPINTERFACE,(_iAddress) < ARAM_SIZE); if(Core::GetStartupParameter().bWii) { + //LOGV(DSPINTERFACE, 0, "ARAM (r) 0x%08x 0x%08x 0x%08x", WII_MASK, _iAddress, (_iAddress & WII_MASK)); + + // Does this make any sense? if(_iAddress > WII_MASK) - _iAddress = (_iAddress & WII_MASK); - return g_ARAM[_iAddress]; + { + if(_iAddress > WII_MASK) + _iAddress = (_iAddress & WII_MASK); + return g_MEM2[_iAddress]; + } + else + { + if(_iAddress > WII_MASK) + _iAddress = (_iAddress & WII_MASK); + return g_ARAM[_iAddress]; + } } else return g_ARAM[_iAddress & ARAM_MASK]; @@ -636,7 +651,7 @@ u8* GetARAMPtr() { return g_ARAM; } -// =================== + void WriteARAM(u8 _iValue, u32 _iAddress) @@ -650,4 +665,4 @@ void WriteARAM(u8 _iValue, u32 _iAddress) } } // end of namespace DSP - +// =================== diff --git a/Source/Core/DolphinWX/Src/PluginManager.cpp b/Source/Core/DolphinWX/Src/PluginManager.cpp index 39ee6a97cd..ed81d54ce4 100644 --- a/Source/Core/DolphinWX/Src/PluginManager.cpp +++ b/Source/Core/DolphinWX/Src/PluginManager.cpp @@ -112,7 +112,7 @@ void CPluginManager::OpenDebug(void* _Parent, const char *_rFilename) if (Common::CPlugin::Load(_rFilename)) { Common::CPlugin::Debug((HWND)_Parent); - Common::CPlugin::Release(); + //Common::CPlugin::Release(); // this is only if the wx dialog is called with ShowModal() } } diff --git a/Source/Dolphin.sln b/Source/Dolphin.sln index d1bddba3f2..8a239e715e 100644 --- a/Source/Dolphin.sln +++ b/Source/Dolphin.sln @@ -250,7 +250,6 @@ Global {48AD7E0A-25B1-4974-A1E3-03F8C438D34F}.DebugFast|Win32.ActiveCfg = DebugFast|Win32 {48AD7E0A-25B1-4974-A1E3-03F8C438D34F}.DebugFast|Win32.Build.0 = DebugFast|Win32 {48AD7E0A-25B1-4974-A1E3-03F8C438D34F}.DebugFast|x64.ActiveCfg = DebugFast|x64 - {48AD7E0A-25B1-4974-A1E3-03F8C438D34F}.DebugFast|x64.Build.0 = DebugFast|x64 {48AD7E0A-25B1-4974-A1E3-03F8C438D34F}.Release|Win32.ActiveCfg = Release|Win32 {48AD7E0A-25B1-4974-A1E3-03F8C438D34F}.Release|Win32.Build.0 = Release|Win32 {48AD7E0A-25B1-4974-A1E3-03F8C438D34F}.Release|x64.ActiveCfg = Release|x64 @@ -262,7 +261,6 @@ Global {0318BA30-EF48-441A-9E10-DC85EFAE39F0}.DebugFast|Win32.ActiveCfg = DebugFast|Win32 {0318BA30-EF48-441A-9E10-DC85EFAE39F0}.DebugFast|Win32.Build.0 = DebugFast|Win32 {0318BA30-EF48-441A-9E10-DC85EFAE39F0}.DebugFast|x64.ActiveCfg = DebugFast|x64 - {0318BA30-EF48-441A-9E10-DC85EFAE39F0}.DebugFast|x64.Build.0 = DebugFast|x64 {0318BA30-EF48-441A-9E10-DC85EFAE39F0}.Release|Win32.ActiveCfg = Release|Win32 {0318BA30-EF48-441A-9E10-DC85EFAE39F0}.Release|Win32.Build.0 = Release|Win32 {0318BA30-EF48-441A-9E10-DC85EFAE39F0}.Release|x64.ActiveCfg = Release|x64 diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.cpp index e560f9d883..de5b9b161b 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.cpp @@ -138,13 +138,6 @@ CDebugger::CDebugger(wxWindow *parent, wxWindowID id, const wxString &title, //wxEVT_RIGHT_DOWN, wxEVT_MOUSEWHEEL, wxEVT_LEFT_UP, //m_bl95, m_PageBlock, sBlock - /* - for (int i = 0; i < 127; ++i) - { - m_bl0->AppendText(wxString::Format("%02i|68 : 01a70144\n", i)); - m_bl95->AppendText(wxString::Format("%i Mouse\n", i)); - }*/ - m_bl95->Connect(wxID_ANY, wxEVT_SCROLLWIN_THUMBTRACK, wxScrollWinEventHandler(CDebugger::ScrollBlocksCursor), (wxObject*)NULL, this); m_bl95->Connect(wxID_ANY, wxEVT_SCROLLWIN_THUMBRELEASE, @@ -729,7 +722,8 @@ void CDebugger::ChangeMail(wxCommandEvent& event) void CDebugger::ReadDir() { CFileSearch::XStringVector Directories; - Directories.push_back("Logs/Mail"); + //Directories.push_back("Logs/Mail"); + Directories.push_back(FULL_MAIL_LOGS_DIR); CFileSearch::XStringVector Extensions; Extensions.push_back("*.log"); @@ -857,7 +851,7 @@ std::string CDebugger::Readfile_(std::string FileName) // Read file void CDebugger::Readfile(std::string FileName, bool GC) { - int n = CountFiles(FileName); + int n = CountFiles(FileName); // count how many mails we have int curr_n = 0; std::ifstream file; for (int i = 0; i < m_RadioBox[3]->GetCount(); i++) @@ -897,12 +891,13 @@ void CDebugger::Readfile(std::string FileName, bool GC) // ======================================================================================= -// Only allow one selected game at a time +// Read the file to the text window // --------------- void CDebugger::OnGameChange(wxCommandEvent& event) { if(event.GetId() == 2006) { + // Only allow one selected game at a time for (int i = 0; i < m_gc->GetCount(); ++i) if(i != event.GetInt()) m_gc->Check(i, false); for (int i = 0; i < m_wii->GetCount(); ++i) diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Logging.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Logging.cpp index 4a26bc061b..2a5a4b63bd 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Logging.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Logging.cpp @@ -532,7 +532,7 @@ void CUCode_AX::Logging(short* _pBuffer, int _iSize, int a, bool Wii) /**/ AXParamBlock PBs[64]; AXParamBlockWii PBw[NUMBER_OF_PBS]; - int numberOfPBsWii = ReadOutPBsWii(m_addressPBs, PBw, NUMBER_OF_PBS - 1); + int numberOfPBsWii = ReadOutPBsWii(m_addressPBs, PBw, NUMBER_OF_PBS, true); int numberOfPBsGC = ReadOutPBs(m_addressPBs, PBs, 64); diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp index 046e4735c3..7eeaa38039 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp @@ -16,6 +16,7 @@ // http://code.google.com/p/dolphin-emu/ #include "FileUtil.h" // for IsDirectory +#include "StringUtil.h" // for StringFromFormat #include "../Debugger/Debugger.h" #include "../Logging/Console.h" // for aprintf #include @@ -119,7 +120,9 @@ if(m_frame->ScanMails) ci << (saveNext - 1); TmpMailLog += "\n\n"; TmpMailLog += "-----------------------------------------------------------------------\n"; - TmpMailLog += "Current mail: " + gpName + " mail " + ci.str() + "\n\n"; + TmpMailLog += "Current mail: " + gpName + " mail " + ci.str() + "\n"; + if(Wii) + TmpMailLog += "Current CRC: " + StringFromFormat("0x%08x \n\n", _CRC); for (int i = 0; i < sMailTime.size(); i++) { @@ -143,7 +146,7 @@ if(m_frame->ScanMails) { TmpMailLog += Msg; TmpMailLog += "\n"; - LOG_(1, Msg); + LOG_(1, Msg); // also write it to the log } } } diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.h b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.h index b31b921d8c..d63dd50476 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.h +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.h @@ -48,6 +48,7 @@ public: // PBs u32 m_addressPBs; + u32 _CRC; private: enum diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXStructs.h b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXStructs.h index 5a8d5b1c9e..f19ee31af1 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXStructs.h +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXStructs.h @@ -79,7 +79,7 @@ struct PBDpop s16 unknown[12]; }; - struct PBDpopWii_ + struct PBDpopWii_ // new CRC version { s16 unknown[7]; }; @@ -204,7 +204,7 @@ struct AXParamBlockWii /* 106 */ u16 pad[22]; }; -struct AXParamBlockWii_ +struct AXParamBlockWii_ // new CRC version { u16 next_pb_hi; u16 next_pb_lo; diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.cpp index 5d77e3f2d8..0cc3d167d5 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.cpp @@ -54,6 +54,7 @@ CUCode_AXWii::CUCode_AXWii(CMailHandler& _rMailHandler, u32 _CRC) temprbuffer = new int[1024 * 1024]; lCUCode_AX = new CUCode_AX(_rMailHandler); + lCUCode_AX->_CRC = _CRC; _CRC = _CRC; } @@ -86,6 +87,7 @@ void CUCode_AXWii::MixAdd(short* _pBuffer, int _iSize) } else { + //LOG_(0, "else"); AXParamBlockWii_ PBs[NUMBER_OF_PBS]; MixAdd_(_pBuffer, _iSize, PBs); } @@ -99,7 +101,7 @@ void CUCode_AXWii::MixAdd_(short* _pBuffer, int _iSize, ParamBlockType &PBs) //AXParamBlockWii PBs[NUMBER_OF_PBS]; // read out pbs - int numberOfPBs = ReadOutPBsWii(m_addressPBs, PBs, NUMBER_OF_PBS); + int numberOfPBs = ReadOutPBsWii(m_addressPBs, PBs, NUMBER_OF_PBS, false); if (_iSize > 1024 * 1024) _iSize = 1024 * 1024; @@ -194,10 +196,9 @@ void CUCode_AXWii::MixAdd_(short* _pBuffer, int _iSize, ParamBlockType &PBs) //MixAddVoice(pb, templbuffer, temprbuffer, _iSize); MixAddVoice(PBs[i], templbuffer, temprbuffer, _iSize); } - } + } WriteBackPBsWii(m_addressPBs, PBs, numberOfPBs); - // We write the sound to _pBuffer for (int i = 0; i < _iSize; i++) { @@ -350,7 +351,7 @@ bool CUCode_AXWii::AXTask(u32& _uMail) Addr__AXOutSBuffer = Memory_Read_U32(uAddress); uAddress += 10; // uAddress += 12; - DebugLog("%08x : AXLIST OutSBuffer (0x0007) address: %08x", uAddress, Addr__AXOutSBuffer); + SaveLog("%08x : AXLIST OutSBuffer (0x0007) address: %08x", uAddress, Addr__AXOutSBuffer); break; /* case 0x0009: diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX_Voice.h b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX_Voice.h index cd3accb1d8..cfe2da80d3 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX_Voice.h +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX_Voice.h @@ -26,12 +26,11 @@ // ----------- extern bool gSequenced; extern bool gVolume; - - +extern float ratioFactor; template -inline int ReadOutPBsWii(u32 pbs_address, ParamBlockType& _pPBs, int _num) +inline int ReadOutPBsWii(u32 pbs_address, ParamBlockType& _pPBs, int _num, int _deb) //int ReadOutPBsWii(u32 pbs_address, AXParamBlockWii* _pPBs, int _num) { int count = 0; @@ -50,14 +49,13 @@ inline int ReadOutPBsWii(u32 pbs_address, ParamBlockType& _pPBs, int _num) for (int p = 0; p < sizeof(AXParamBlockWii) / 2; p++) { if(p == 6 || p == 7) pDest[p] = pSrc[p]; // control for the u32 - //else if(p == 62 || p == 63 || p == 64 || p == 65 || p == 66 || p == 67) - // pDest[p] = Common::swap16(pSrc[p-1]); else pDest[p] = Common::swap16(pSrc[p]); #if defined(_DEBUG) || defined(DEBUGFAST) gLastBlock = blockAddr + p*2 + 2; // save last block location #endif - } + } + _pPBs[i].mixer_control = Common::swap32(_pPBs[i].mixer_control); blockAddr = (_pPBs[i].next_pb_hi << 16) | _pPBs[i].next_pb_lo; count++; @@ -88,10 +86,8 @@ inline void WriteBackPBsWii(u32 pbs_address, ParamBlockType& _pPBs, int _num) _pPBs[i].mixer_control = Common::swap32(_pPBs[i].mixer_control); for (size_t p = 0; p < sizeof(AXParamBlockWii) / 2; p++) { - if(p == 6 || p == 7) pDest[p] = pSrc[p]; // control for the u32 - //else if(p == 62 || p == 63 || p == 64 || p == 65 || p == 66 || p == 67) - // pDest[p-1] = Common::swap16(pSrc[p]); - else pDest[p] = Common::swap16(pSrc[p]); + if(p == 6 || p == 7) pDest[p] = pSrc[p]; // control for the u32 + else pDest[p] = Common::swap16(pSrc[p]); } // next block @@ -100,18 +96,13 @@ inline void WriteBackPBsWii(u32 pbs_address, ParamBlockType& _pPBs, int _num) } - - - - - template inline void MixAddVoice(ParamBlockType &pb, int *templbuffer, int *temprbuffer, int _iSize) { #ifdef _WIN32 - float ratioFactor = 32000.0f / (float)DSound::DSound_GetSampleRate(); + ratioFactor = 32000.0f / (float)DSound::DSound_GetSampleRate(); #else - float ratioFactor = 32000.0f / 44100.0f; + ratioFactor = 32000.0f / 44100.0f; #endif // DoVoiceHacks(pb); @@ -123,7 +114,7 @@ inline void MixAddVoice(ParamBlockType &pb, int *templbuffer, int *temprbuffer, // ======================================================================================= // Read initial parameters // ------------ - //constants + //constants const u32 ratio = (u32)(((pb.src.ratio_hi << 16) + pb.src.ratio_lo) * ratioFactor); u32 sampleEnd = (pb.audio_addr.end_addr_hi << 16) | pb.audio_addr.end_addr_lo; u32 loopPos = (pb.audio_addr.loop_addr_hi << 16) | pb.audio_addr.loop_addr_lo; @@ -132,7 +123,7 @@ inline void MixAddVoice(ParamBlockType &pb, int *templbuffer, int *temprbuffer, u32 samplePos = (pb.audio_addr.cur_addr_hi << 16) | pb.audio_addr.cur_addr_lo; u32 frac = pb.src.cur_addr_frac; // ============= - + // ======================================================================================= // Handle no-src streams - No src streams have pb.src_type == 2 and have pb.src.ratio_hi = 0 // and pb.src.ratio_lo = 0. We handle that by setting the sampling ratio integer to 1. This @@ -155,6 +146,7 @@ inline void MixAddVoice(ParamBlockType &pb, int *templbuffer, int *temprbuffer, } // ============= + // ======================================================================================= // Games that use looping to play non-looping music streams - SSBM has info in all // pb.adpcm_loop_info parameters but has pb.audio_addr.looping = 0. If we treat these streams @@ -278,7 +270,6 @@ inline void MixAddVoice(ParamBlockType &pb, int *templbuffer, int *temprbuffer, } } // =============== - } // end of the _iSize loop // Update volume @@ -292,6 +283,7 @@ inline void MixAddVoice(ParamBlockType &pb, int *templbuffer, int *temprbuffer, pb.src.cur_addr_frac = (u16)frac; pb.audio_addr.cur_addr_hi = samplePos >> 16; pb.audio_addr.cur_addr_lo = (u16)samplePos; + } // if (pb.running) } diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/main.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/main.cpp index c4f21ba733..fc4d294d51 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/main.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/main.cpp @@ -119,7 +119,6 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle g_hInstance = hinstDLL; return(TRUE); } - #endif @@ -154,7 +153,7 @@ CDebugger* m_frame; void DllDebugger(HWND _hParent) { m_frame = new CDebugger(NULL); - m_frame->ShowModal(); + m_frame->Show(); } // =================== diff --git a/Source/Plugins/Plugin_DSP_LLE/Res/resource.h b/Source/Plugins/Plugin_DSP_LLE/Res/resource.h index af3530a9d2..1d5ffbaf63 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Res/resource.h +++ b/Source/Plugins/Plugin_DSP_LLE/Res/resource.h @@ -16,14 +16,15 @@ #define IDC_HALT 1005 #define IDC_HALT2 1006 #define IDC_INIT 1006 +#define IDC_GROUP 1007 // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 202 #define _APS_NEXT_COMMAND_VALUE 32772 -#define _APS_NEXT_CONTROL_VALUE 1004 +#define _APS_NEXT_CONTROL_VALUE 1008 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/DisAsmDlg.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/DisAsmDlg.cpp index 8b6b4f397f..b34ca5b5e0 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/DisAsmDlg.cpp +++ b/Source/Plugins/Plugin_DSP_LLE/Src/DisAsmDlg.cpp @@ -52,7 +52,7 @@ LRESULT CDisAsmDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lPar { ws.ApplyTo(CWindow(m_hWnd), SW_SHOW); } - + m_DisAsmListViewCtrl.m_hWnd = GetDlgItem(IDC_DISASM_LIST); UIAddChildWindowContainer(m_hWnd); @@ -79,6 +79,8 @@ LRESULT CDisAsmDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lPar UpdateDialog(); + DlgResize_Init(true, false, WS_THICKFRAME); + return(TRUE); } @@ -257,7 +259,7 @@ void CDisAsmDlg::RebuildDisAsmListView() m_DisAsmListViewCtrl.AddItem(Item, ColumnMenmomic, Temp2); m_DisAsmListViewCtrl.AddItem(Item, ColumnOpcode, pOpcode); m_DisAsmListViewCtrl.AddItem(Item, ColumnExt, pExtension); - + if (!_stricmp(pOpcode, "CALL")) { uint32 FunctionAddress = -1; @@ -638,3 +640,28 @@ void CDisAsmDlg::UpdateDialog() // UpdateButtonTexts(); UpdateRegisterFlags(); } + +LRESULT CDisAsmDlg::OnLvnItemchangedDisasmList(int /*idCtrl*/, LPNMHDR pNMHDR, BOOL& /*bHandled*/) +{ + LPNMLISTVIEW pNMLV = reinterpret_cast(pNMHDR); + // TODO: Add your control notification handler code here + + return 0; +} + + +// TODO: make the members adjust with the dialog +LRESULT CDisAsmDlg::OnSize(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& /*bHandled*/) +{ + // we habe to make a group of the items I think + /* + CRect lpRect; + + + int wid = lpRect.right - lpRect.left - 100; + int hei = lpRect.bottom - lpRect.top - 20; + m_DisAsmListViewCtrl.ResizeClient(wid, hei, true); + */ + + return 0; +} diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/DisAsmDlg.h b/Source/Plugins/Plugin_DSP_LLE/Src/DisAsmDlg.h index 8030c0217b..c90914cd3c 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/DisAsmDlg.h +++ b/Source/Plugins/Plugin_DSP_LLE/Src/DisAsmDlg.h @@ -25,7 +25,7 @@ #include "RegisterDlg.h" class CDisAsmDlg - : public CDialogImpl, public CUpdateUI + : public CDialogImpl, public CUpdateUI, public CDialogResize { public: @@ -40,6 +40,10 @@ class CDisAsmDlg BEGIN_UPDATE_UI_MAP(CDisAsmDlg) END_UPDATE_UI_MAP() + BEGIN_DLGRESIZE_MAP(CDisAsmDlg) + DLGRESIZE_CONTROL(IDR_MAINFRAME, DLSZ_SIZE_X | DLSZ_SIZE_Y) + END_DLGRESIZE_MAP() + BEGIN_MSG_MAP(CDisAsmDlg) MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) MESSAGE_HANDLER(WM_DESTROY, OnDestroy) @@ -50,6 +54,10 @@ class CDisAsmDlg NOTIFY_CODE_HANDLER(NM_RETURN, OnDblClick) NOTIFY_CODE_HANDLER(NM_RCLICK, OnRClick) NOTIFY_CODE_HANDLER(NM_CUSTOMDRAW, OnCustomDraw) + NOTIFY_HANDLER(IDC_DISASM_LIST, LVN_ITEMCHANGED, OnLvnItemchangedDisasmList) + MESSAGE_HANDLER(WM_SIZE, OnSize) + CHAIN_MSG_MAP(CDialogResize) + END_MSG_MAP() // Handler prototypes (uncomment arguments if needed): @@ -100,6 +108,8 @@ class CDisAsmDlg CListViewCtrl m_DisAsmListViewCtrl; CRegisterDlg m_RegisterDlg; + //CWindow GroupLeft + CStatic GroupLeft; uint64 m_CachedStepCounter; uint16 m_CachedCR; @@ -147,4 +157,7 @@ class CDisAsmDlg void UpdateDialog(); static int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort); +public: + LRESULT OnLvnItemchangedDisasmList(int /*idCtrl*/, LPNMHDR pNMHDR, BOOL& /*bHandled*/); + LRESULT OnSize(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/); }; diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp index 822ce2dc80..4d9c61332c 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp +++ b/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp @@ -127,23 +127,15 @@ void DllDebugger(HWND _hParent) { #ifdef _WIN32 #if defined (_DEBUG) || defined (DEBUGFAST) - if(bCanWork) - { - g_Dialog.Create(NULL); //_hParent); - g_Dialog.ShowWindow(SW_SHOW); - - // Open the console window - startConsoleWin(155, 100, "Sound Debugging"); // give room for 100 rows - wprintf("DllDebugger > Console opened\n"); - // TODO: Make this adjustable from the Debugging window - MoveWindow(GetConsoleHwnd(), 0,400, 1280,500, true); - } - else - { - // TODO: let us open the debugging window when we open the Dolphin-Debugger, fix the crash - // that currently occurs of you try to do that - MessageBox(0, "Can't open debugging window yet. Please start a game first", "DSP LLE", 0); - } + g_Dialog.Create(NULL); //_hParent); + g_Dialog.ShowWindow(SW_SHOW); + MoveWindow(g_Dialog.m_hWnd, 450,0, 780,530, true); + + // Open the console window + startConsoleWin(155, 100, "Sound Debugging"); // give room for 100 rows + wprintf("DllDebugger > Console opened\n"); + // TODO: Make this adjustable from the Debugging window + MoveWindow(GetConsoleHwnd(), 0,400, 1280,500, true); #else MessageBox(0, "Can't open debugging window in Release build of this plugin.", "DSP LLE", 0); #endif