mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
Allow use of Logger window without entire debug suite via the -l command line option, make the options actually viewable in the logger and a very little bit of a cleanup in nJoy Test
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1633 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
62fff80925
commit
2852d1b84f
@ -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));
|
||||
|
@ -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)
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user