mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
nakee's new logmanager. added a console window for windows builds (prints to parent console on non-win32). also fix some random wxw bugs: main window's position is saved when using debugger, disabling windows from the tools menu are saved settings, some other small fixes
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2675 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -180,7 +180,7 @@ void Config::Save(int Slot)
|
||||
//if(m_frame) m_frame->LogMsg("Saved: %s %i\n", SectionName.c_str(), PadMapping[i].triggertype);
|
||||
}
|
||||
|
||||
Console::Print("%i: Save: %i\n", 0, PadMapping[0].halfpress);
|
||||
INFO_LOG(CONSOLE, "%i: Save: %i\n", 0, PadMapping[0].halfpress);
|
||||
|
||||
file.Save(FULL_CONFIG_DIR "nJoy.ini");
|
||||
}
|
||||
@ -272,6 +272,6 @@ void Config::Load(bool ChangePad, bool ChangeSaveByID)
|
||||
//if(m_frame) m_frame->LogMsg("%i: Enabled: %i\n", i, PadMapping[i].buttons[CTL_X_BUTTON]);
|
||||
}
|
||||
|
||||
Console::Print("%i: Load: %i\n", 0, PadMapping[0].halfpress);
|
||||
INFO_LOG(CONSOLE, "%i: Load: %i\n", 0, PadMapping[0].halfpress);
|
||||
}
|
||||
|
||||
|
@ -605,7 +605,7 @@ void ConfigBox::OnPaint( wxPaintEvent &event )
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
void ConfigBox::CreateGUIControls()
|
||||
{
|
||||
Console::Print("CreateGUIControls()\n");
|
||||
INFO_LOG(CONSOLE, "CreateGUIControls()\n");
|
||||
|
||||
#ifndef _DEBUG
|
||||
SetTitle(wxT("Configure: nJoy v"INPUT_VERSION" Input Plugin"));
|
||||
|
@ -279,7 +279,7 @@ void ConfigBox::DoGetButtons(int GetId)
|
||||
int Axes = SDL_JoystickNumAxes(joy);
|
||||
int Hats = SDL_JoystickNumHats(joy);
|
||||
|
||||
Console::Print("PadID: %i Axes: %i\n", PadID, joyinfo[PadID].NumAxes, joyinfo[PadID].joy);
|
||||
INFO_LOG(CONSOLE, "PadID: %i Axes: %i\n", PadID, joyinfo[PadID].NumAxes, joyinfo[PadID].joy);
|
||||
|
||||
// Get the controller and trigger type
|
||||
int ControllerType = PadMapping[Controller].controllertype;
|
||||
@ -316,7 +316,7 @@ void ConfigBox::DoGetButtons(int GetId)
|
||||
bool Stop = false; // Stop the timer
|
||||
// =======================
|
||||
|
||||
//Console::Print("Before (%i) Id:%i %i IsRunning:%i\n",
|
||||
//INFO_LOG(CONSOLE, "Before (%i) Id:%i %i IsRunning:%i\n",
|
||||
// GetButtonWaitingTimer, GetButtonWaitingID, GetId, m_ButtonMappingTimer->IsRunning());
|
||||
|
||||
// If the Id has changed or the timer is not running we should start one
|
||||
@ -426,7 +426,7 @@ void ConfigBox::DoGetButtons(int GetId)
|
||||
|
||||
// Debugging
|
||||
/*
|
||||
Console::Print("Change: %i %i %i %i '%s' '%s' '%s' '%s'\n",
|
||||
INFO_LOG(CONSOLE, "Change: %i %i %i %i '%s' '%s' '%s' '%s'\n",
|
||||
PadMapping[0].halfpress, PadMapping[1].halfpress, PadMapping[2].halfpress, PadMapping[3].halfpress,
|
||||
m_JoyButtonHalfpress[0]->GetValue().c_str(), m_JoyButtonHalfpress[1]->GetValue().c_str(), m_JoyButtonHalfpress[2]->GetValue().c_str(), m_JoyButtonHalfpress[3]->GetValue().c_str()
|
||||
);*/
|
||||
|
@ -93,10 +93,7 @@ int NumPads = 0, NumGoodPads = 0, LastPad = 0;
|
||||
HWND m_hWnd = NULL, m_hConsole = NULL; // Handle to window
|
||||
#endif
|
||||
SPADInitialize *g_PADInitialize = NULL;
|
||||
|
||||
// TODO: fix this dirty hack to stop missing symbols
|
||||
void __Log(int log, const char *format, ...) {}
|
||||
void __Logv(int log, int v, const char *format, ...) {}
|
||||
PLUGIN_GLOBALS* globals = NULL;
|
||||
|
||||
// Rumble
|
||||
#ifdef _WIN32
|
||||
@ -182,17 +179,22 @@ void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals) {}
|
||||
void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
|
||||
{
|
||||
globals = _pPluginGlobals;
|
||||
LogManager::SetInstance((LogManager *)globals->logManager);
|
||||
}
|
||||
|
||||
|
||||
// Call config dialog
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
void DllConfig(HWND _hParent)
|
||||
{
|
||||
// Debugging
|
||||
#ifdef SHOW_PAD_STATUS
|
||||
Console::Open(100);
|
||||
m_hConsole = Console::GetHwnd();
|
||||
#endif
|
||||
// #ifdef SHOW_PAD_STATUS
|
||||
// Console::Open(100);
|
||||
// m_hConsole = Console::GetHwnd();
|
||||
// #endif
|
||||
|
||||
#ifdef _WIN32
|
||||
// Start the pads so we can use them in the configuration and advanced controls
|
||||
@ -240,11 +242,11 @@ void DllDebugger(HWND _hParent, bool Show) {}
|
||||
void Initialize(void *init)
|
||||
{
|
||||
// Debugging
|
||||
#ifdef SHOW_PAD_STATUS
|
||||
Console::Open(110);
|
||||
m_hConsole = Console::GetHwnd();
|
||||
#endif
|
||||
Console::Print("Initialize: %i\n", SDL_WasInit(0));
|
||||
// #ifdef SHOW_PAD_STATUS
|
||||
// Console::Open(110);
|
||||
// m_hConsole = Console::GetHwnd();
|
||||
// #endif
|
||||
INFO_LOG(CONSOLE, "Initialize: %i\n", SDL_WasInit(0));
|
||||
g_PADInitialize = (SPADInitialize*)init;
|
||||
g_EmulatorRunning = true;
|
||||
|
||||
@ -277,7 +279,7 @@ void Initialize(void *init)
|
||||
Called from: The Dolphin Core, ConfigBox::OnClose() */
|
||||
void Shutdown()
|
||||
{
|
||||
Console::Print("Shutdown: %i\n", SDL_WasInit(0));
|
||||
INFO_LOG(CONSOLE, "Shutdown: %i\n", SDL_WasInit(0));
|
||||
|
||||
// -------------------------------------------
|
||||
// Play back input instead of accepting any user input
|
||||
@ -358,7 +360,7 @@ void PAD_Input(u16 _Key, u8 _UpDown)
|
||||
}
|
||||
|
||||
// Debugging
|
||||
//Console::Print("%i", _Key);
|
||||
//INFO_LOG(CONSOLE, "%i", _Key);
|
||||
}
|
||||
|
||||
|
||||
@ -385,7 +387,7 @@ unsigned int PAD_GetAttachedPads()
|
||||
if (PadMapping[2].enabled) connected |= 4;
|
||||
if (PadMapping[3].enabled) connected |= 8;
|
||||
|
||||
//Console::Print("PAD_GetAttachedPads: %i %i %i %i\n", PadMapping[0].enabled, PadMapping[1].enabled, PadMapping[2].enabled, PadMapping[3].enabled);
|
||||
//INFO_LOG(CONSOLE, "PAD_GetAttachedPads: %i %i %i %i\n", PadMapping[0].enabled, PadMapping[1].enabled, PadMapping[2].enabled, PadMapping[3].enabled);
|
||||
|
||||
return connected;
|
||||
}
|
||||
@ -397,7 +399,7 @@ unsigned int PAD_GetAttachedPads()
|
||||
// Function: Gives the current pad status to the Core
|
||||
void PAD_GetStatus(u8 _numPAD, SPADStatus* _pPADStatus)
|
||||
{
|
||||
//Console::Print("PAD_GetStatus(): %i %i %i\n", _numPAD, PadMapping[_numPAD].enabled, PadState[_numPAD].joy);
|
||||
//INFO_LOG(CONSOLE, "PAD_GetStatus(): %i %i %i\n", _numPAD, PadMapping[_numPAD].enabled, PadState[_numPAD].joy);
|
||||
|
||||
/* Check if the pad is enabled and avaliable, currently we don't disable pads just because they are
|
||||
disconnected */
|
||||
@ -561,10 +563,10 @@ void PAD_GetStatus(u8 _numPAD, SPADStatus* _pPADStatus)
|
||||
// Debugging
|
||||
/*
|
||||
// Show the status of all connected pads
|
||||
if ((LastPad == 0 && _numPAD == 0) || _numPAD < LastPad) Console::ClearScreen();
|
||||
// if ((LastPad == 0 && _numPAD == 0) || _numPAD < LastPad) Console::ClearScreen();
|
||||
LastPad = _numPAD;
|
||||
Console::ClearScreen();
|
||||
Console::Print(
|
||||
// Console::ClearScreen();
|
||||
INFO_LOG(CONSOLE,
|
||||
"Pad | Number:%i Enabled:%i Handle:%i\n"
|
||||
"Trigger | StatusL:%04x StatusR:%04x TriggerL:%04x TriggerR:%04x TriggerValue:%i\n"
|
||||
"Buttons | Overall:%i A:%i X:%i\n"
|
||||
@ -641,7 +643,7 @@ bool ReloadDLL()
|
||||
// Close SDL
|
||||
if (SDL_WasInit(0)) SDL_Quit();
|
||||
// Log message
|
||||
Console::Print("Error: %s\n", StrError.c_str());
|
||||
INFO_LOG(CONSOLE, "Error: %s\n", StrError.c_str());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -57,8 +57,6 @@
|
||||
#include "Setup.h"
|
||||
#include "pluginspecs_pad.h"
|
||||
#include "IniFile.h"
|
||||
#include "ConsoleWindow.h"
|
||||
//#include "Timer.h"
|
||||
|
||||
#include "Config.h" // Local
|
||||
|
||||
|
Reference in New Issue
Block a user