diff --git a/Source/Core/DebuggerWX/Src/LogWindow.cpp b/Source/Core/DebuggerWX/Src/LogWindow.cpp index d3c92bdfcd..c16885e4e5 100644 --- a/Source/Core/DebuggerWX/Src/LogWindow.cpp +++ b/Source/Core/DebuggerWX/Src/LogWindow.cpp @@ -70,8 +70,7 @@ CLogWindow::CLogWindow(wxWindow* parent) // I could not find any transparency setting and it would not automatically space correctly m_options->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)); - m_options->SetMinSize(wxSize(m_options->GetSize().GetWidth() - 40, - m_options->GetCount() * 15)); + //m_options->SetMinSize(wxSize(m_options->GetSize().GetWidth() - 40,m_options->GetCount() * 15)); #ifdef _WIN32 for (unsigned int i = 0; i < m_options->GetCount(); ++i) m_options->GetItem(i)->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)); diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp index 4c442d9294..f984408b2c 100644 --- a/Source/Core/DolphinWX/Src/Main.cpp +++ b/Source/Core/DolphinWX/Src/Main.cpp @@ -39,6 +39,7 @@ #include "Frame.h" #include "Config.h" #include "CodeWindow.h" +#include "LogWindow.h" #include "ExtendedTrace.h" #include "BootManager.h" @@ -120,6 +121,7 @@ bool DolphinApp::OnInit() // ============ // Check for debugger bool UseDebugger = false; + bool UseLogger = false; bool LoadElf = false; wxString ElfFile; #if wxUSE_CMDLINE_PARSER @@ -132,6 +134,9 @@ bool DolphinApp::OnInit() { wxCMD_LINE_SWITCH, _T("d"), _T("debugger"), _T("Opens the debugger") }, + { + wxCMD_LINE_SWITCH, _T("l"), _T("logger"), _T("Opens The Logger") + }, { wxCMD_LINE_OPTION, _T("e"), _T("elf"), _T("Loads an elf file"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL @@ -179,6 +184,7 @@ bool DolphinApp::OnInit() } UseDebugger = parser.Found(_T("debugger")); + UseLogger = parser.Found(_T("logger")); LoadElf = parser.Found(_T("elf"), &ElfFile); if( LoadElf && ElfFile == wxEmptyString ) @@ -229,6 +235,15 @@ bool DolphinApp::OnInit() g_pCodeWindow = new CCodeWindow(SConfig::GetInstance().m_LocalCoreStartupParameter, main_frame); g_pCodeWindow->Show(true); } + if(!UseDebugger && UseLogger) + { + #ifdef LOGGING + // We aren't using debugger, just logger + // Should be fine for a local copy + CLogWindow* m_LogWindow = new CLogWindow(main_frame); + m_LogWindow->Show(true); + #endif + } // First check if we have a elf command line if (LoadElf && ElfFile != wxEmptyString) diff --git a/Source/Plugins/Plugin_nJoy_Testing/Src/nJoy.cpp b/Source/Plugins/Plugin_nJoy_Testing/Src/nJoy.cpp index e53cca1013..eb6726e962 100644 --- a/Source/Plugins/Plugin_nJoy_Testing/Src/nJoy.cpp +++ b/Source/Plugins/Plugin_nJoy_Testing/Src/nJoy.cpp @@ -36,7 +36,6 @@ // ŻŻŻŻŻŻŻŻŻ FILE *pFile; -HINSTANCE nJoy_hInst = NULL; CONTROLLER_INFO *joyinfo = 0; CONTROLLER_STATE joystate[4]; CONTROLLER_MAPPING joysticks[4]; @@ -55,7 +54,7 @@ bool g_rumbleEnable = FALSE; // Rumble in windows #ifdef _WIN32 - +HINSTANCE nJoy_hInst = NULL; #ifdef USE_RUMBLE_DINPUT_HACK LPDIRECTINPUT8 g_pDI = NULL; LPDIRECTINPUTDEVICE8 g_pDevice = NULL; @@ -80,7 +79,7 @@ HRESULT SetDeviceForcesXY(); struct ff_effect effect; bool CanRumble = false; #endif - +#ifdef _WIN32 ////////////////////////////////////////////////////////////////////////////////////////// // wxWidgets // ŻŻŻŻŻŻŻŻŻ @@ -98,7 +97,7 @@ WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst); ////////////////////////////////////////////////////////////////////////////////////////// // DllMain // ŻŻŻŻŻŻŻ -#ifdef _WIN32 + BOOL APIENTRY DllMain( HINSTANCE hinstDLL, // DLL module handle DWORD dwReason, // reason called LPVOID lpvReserved) // reserved @@ -285,7 +284,7 @@ void PAD_GetStatus(u8 _numPAD, SPADStatus* _pPADStatus) // Adjust range // The value returned by SDL_JoystickGetAxis is a signed integer (-32768 to 32768) // The value used for the gamecube controller is an unsigned char (0 to 255) - int main_stick_x, main_stick_y, sub_stick_x, sub_stick_y; + int main_stick_x = 0, main_stick_y = 0, sub_stick_x = 0, sub_stick_y = 0; if(joysticks[_numPAD].buttons[CTL_MAIN_X].c_str()[0] == 'A') // Axis { main_stick_x = (joystate[_numPAD].buttons[CTL_MAIN_X]>>8); @@ -678,14 +677,8 @@ int Search_Devices() } if(joyinfo) - { delete [] joyinfo; - joyinfo = new CONTROLLER_INFO [numjoy]; - } - else - { - joyinfo = new CONTROLLER_INFO [numjoy]; - } + joyinfo = new CONTROLLER_INFO [numjoy]; #ifdef _DEBUG fprintf(pFile, "Scanning for devices\n");