mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -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:
@ -127,10 +127,10 @@ void GetMousePos(float& x, float& y)
|
||||
}
|
||||
// Logging
|
||||
/*
|
||||
Console::ClearScreen();
|
||||
Console::Print("Screen Width:%4.0f Height:%4.0f Ratio:%1.2f\n", WinWidth, WinHeight, Ratio);
|
||||
Console::Print("Picture Width:%4.1f Height:%4.1f YOffset:%4.0f XOffset:%4.0f\n", PictureWidth, PictureHeight, YOffset, XOffset);
|
||||
Console::Print("----------------------------------------------------------------\n");
|
||||
// Console::ClearScreen();
|
||||
INFO_LOG(CONSOLE, "Screen Width:%4.0f Height:%4.0f Ratio:%1.2f\n", WinWidth, WinHeight, Ratio);
|
||||
INFO_LOG(CONSOLE, "Picture Width:%4.1f Height:%4.1f YOffset:%4.0f XOffset:%4.0f\n", PictureWidth, PictureHeight, YOffset, XOffset);
|
||||
INFO_LOG(CONSOLE, "----------------------------------------------------------------\n");
|
||||
*/
|
||||
}
|
||||
// -------------------------------------
|
||||
@ -157,9 +157,9 @@ void GetMousePos(float& x, float& y)
|
||||
|
||||
// Logging
|
||||
/*
|
||||
Console::Print("Crop Ratio:%1.2f IncrWidth:%3.0f IncrHeight:%3.0f\n", Ratio, IncreasedWidth, IncreasedHeight);
|
||||
Console::Print("Picture Width:%4.1f Height:%4.1f YOffset:%4.0f XOffset:%4.0f\n", PictureWidth, PictureHeight, YOffset, XOffset);
|
||||
Console::Print("----------------------------------------------------------------\n");
|
||||
INFO_LOG(CONSOLE, "Crop Ratio:%1.2f IncrWidth:%3.0f IncrHeight:%3.0f\n", Ratio, IncreasedWidth, IncreasedHeight);
|
||||
INFO_LOG(CONSOLE, "Picture Width:%4.1f Height:%4.1f YOffset:%4.0f XOffset:%4.0f\n", PictureWidth, PictureHeight, YOffset, XOffset);
|
||||
INFO_LOG(CONSOLE, "----------------------------------------------------------------\n");
|
||||
*/
|
||||
}
|
||||
// -------------------------------------
|
||||
@ -172,9 +172,9 @@ void GetMousePos(float& x, float& y)
|
||||
// Logging
|
||||
// -------------
|
||||
/*
|
||||
Console::Print("GetCursorPos: %i %i\n", point.x, point.y);
|
||||
Console::Print("GetClientRect: %i %i %i %i\n", Rect.left, Rect.right, Rect.top, Rect.bottom);
|
||||
Console::Print("Position X:%1.2f Y:%1.2f\n", x, y);
|
||||
INFO_LOG(CONSOLE, "GetCursorPos: %i %i\n", point.x, point.y);
|
||||
INFO_LOG(CONSOLE, "GetClientRect: %i %i %i %i\n", Rect.left, Rect.right, Rect.top, Rect.bottom);
|
||||
INFO_LOG(CONSOLE, "Position X:%1.2f Y:%1.2f\n", x, y);
|
||||
*/
|
||||
// ---------------------------
|
||||
|
||||
@ -220,7 +220,7 @@ void GetCalibrationChecksum()
|
||||
sum += nunchuck_calibration[i];
|
||||
u8 Check1 = sum + 0x55;
|
||||
u8 Check2 = sum + 0xaa;
|
||||
Console::Print("0x%02x 0x%02x", Check1, Check2);
|
||||
INFO_LOG(CONSOLE, "0x%02x 0x%02x", Check1, Check2);
|
||||
}
|
||||
// ================
|
||||
|
||||
@ -230,7 +230,7 @@ void GetCalibrationChecksum()
|
||||
// ----------------
|
||||
void LoadRecordedMovements()
|
||||
{
|
||||
Console::Print("LoadRecordedMovements()\n");
|
||||
INFO_LOG(CONSOLE, "LoadRecordedMovements()\n");
|
||||
|
||||
IniFile file;
|
||||
file.Load(FULL_CONFIG_DIR "WiimoteMovement.ini");
|
||||
@ -238,7 +238,7 @@ void LoadRecordedMovements()
|
||||
for(int i = 0; i < RECORDING_ROWS; i++)
|
||||
{
|
||||
// Logging
|
||||
//Console::Print("Recording%i ", i + 1);
|
||||
//INFO_LOG(CONSOLE, "Recording%i ", i + 1);
|
||||
|
||||
// Temporary storage
|
||||
int iTmp;
|
||||
@ -310,10 +310,10 @@ void LoadRecordedMovements()
|
||||
// ---------------------------------
|
||||
// Log results
|
||||
// ---------
|
||||
/*Console::Print("Time:%f\n", Tmp.Time);
|
||||
/*INFO_LOG(CONSOLE, "Time:%f\n", Tmp.Time);
|
||||
std::string TmpIRLog = ArrayToString(Tmp.IR, TmpIRBytes, 0, 30);
|
||||
Console::Print("IR: %s\n", TmpIRLog.c_str());
|
||||
Console::Print("\n");*/
|
||||
INFO_LOG(CONSOLE, "IR: %s\n", TmpIRLog.c_str());
|
||||
INFO_LOG(CONSOLE, "\n");*/
|
||||
}
|
||||
|
||||
// Get HotKey
|
||||
@ -335,7 +335,7 @@ void LoadRecordedMovements()
|
||||
else
|
||||
TmpIRLog = "";
|
||||
|
||||
Console::Print("Size:%i HotKey:%i PlSpeed:%i IR:%s X:%i Y:%i Z:%i\n",
|
||||
INFO_LOG(CONSOLE, "Size:%i HotKey:%i PlSpeed:%i IR:%s X:%i Y:%i Z:%i\n",
|
||||
VRecording.at(i).Recording.size(), VRecording.at(i).HotKeyWiimote, VRecording.at(i).PlaybackSpeed,
|
||||
TmpIRLog.c_str(),
|
||||
VRecording.at(i).Recording.at(0).x, VRecording.at(i).Recording.at(0).y, VRecording.at(i).Recording.at(0).z
|
||||
@ -355,7 +355,7 @@ void UpdateEeprom()
|
||||
g_wm.cal_g.y = g_Eeprom[27] - g_Eeprom[24];
|
||||
g_wm.cal_g.z = g_Eeprom[28] - g_Eeprom[24];
|
||||
|
||||
Console::Print("\nUpdateEeprom: %i %i %i\n",
|
||||
INFO_LOG(CONSOLE, "\nUpdateEeprom: %i %i %i\n",
|
||||
WiiMoteEmu::g_Eeprom[22], WiiMoteEmu::g_Eeprom[23], WiiMoteEmu::g_Eeprom[28]);
|
||||
|
||||
if(g_Config.bNunchuckConnected)
|
||||
@ -373,7 +373,7 @@ void UpdateEeprom()
|
||||
g_nu.jy.min = g_RegExt[0x2c];
|
||||
g_nu.jy.center = g_RegExt[0x2d];
|
||||
|
||||
Console::Print("UpdateNunchuck: %i %i %i %i %i\n\n",
|
||||
INFO_LOG(CONSOLE, "UpdateNunchuck: %i %i %i %i %i\n\n",
|
||||
WiiMoteEmu::g_RegExt[0x2a], WiiMoteEmu::g_RegExt[0x2d],
|
||||
WiiMoteEmu::g_RegExt[0x20], WiiMoteEmu::g_RegExt[0x21], WiiMoteEmu::g_RegExt[0x26]);
|
||||
}
|
||||
@ -396,7 +396,7 @@ void UpdateEeprom()
|
||||
g_cc.Tl.neutral = g_RegExt[0x2c];
|
||||
g_cc.Tr.neutral = g_RegExt[0x2d];
|
||||
|
||||
Console::Print("UpdateCC: %i %i %i %i %i\n\n",
|
||||
INFO_LOG(CONSOLE, "UpdateCC: %i %i %i %i %i\n\n",
|
||||
WiiMoteEmu::g_RegExt[0x2a], WiiMoteEmu::g_RegExt[0x2d],
|
||||
WiiMoteEmu::g_RegExt[0x20], WiiMoteEmu::g_RegExt[0x21], WiiMoteEmu::g_RegExt[0x26]);
|
||||
}
|
||||
@ -460,7 +460,7 @@ void SetDefaultExtensionRegistry()
|
||||
memcpy(g_RegExt + 0xfa, classic_id, sizeof(classic_id));
|
||||
}
|
||||
|
||||
Console::Print("\nSetDefaultExtensionRegistry()\n\n");
|
||||
INFO_LOG(CONSOLE, "\nSetDefaultExtensionRegistry()\n\n");
|
||||
|
||||
UpdateEeprom();
|
||||
}
|
||||
@ -518,7 +518,7 @@ void DoState(void* ptr, int mode)
|
||||
these variables. */
|
||||
void Shutdown(void)
|
||||
{
|
||||
Console::Print("ShutDown\n");
|
||||
INFO_LOG(CONSOLE, "ShutDown\n");
|
||||
|
||||
ResetVariables();
|
||||
|
||||
@ -529,7 +529,7 @@ void Shutdown(void)
|
||||
if (PadMapping[i].enabled && joyinfo.size() > (u32)PadMapping[i].ID)
|
||||
if (joyinfo.at(PadMapping[i].ID).Good)
|
||||
{
|
||||
Console::Print("ShutDown: %i\n", PadState[i].joy);
|
||||
INFO_LOG(CONSOLE, "ShutDown: %i\n", PadState[i].joy);
|
||||
/* SDL_JoystickClose() crashes for some reason so I avoid this for now, SDL_Quit() should
|
||||
close the pads to I think */
|
||||
//if(SDL_JoystickOpened(PadMapping[i].ID)) SDL_JoystickClose(PadState[i].joy);
|
||||
@ -582,7 +582,7 @@ void CheckAckDelay()
|
||||
}
|
||||
AckDelay.at(i).Delay--;
|
||||
|
||||
//Console::Print("%i 0x%04x 0x%02x", i, AckDelay.at(i).ChannelID, AckDelay.at(i).ReportID);
|
||||
//INFO_LOG(CONSOLE, "%i 0x%04x 0x%02x", i, AckDelay.at(i).ChannelID, AckDelay.at(i).ReportID);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -595,7 +595,7 @@ void CheckAckDelay()
|
||||
// ----------------
|
||||
void InterruptChannel(u16 _channelID, const void* _pData, u32 _Size)
|
||||
{
|
||||
//Console::Print("Emu InterruptChannel\n");
|
||||
//INFO_LOG(CONSOLE, "Emu InterruptChannel\n");
|
||||
|
||||
DEBUG_LOG(WII_IPC_WIIMOTE, "=============================================================");
|
||||
DEBUG_LOG(WII_IPC_WIIMOTE, "Wiimote_Input");
|
||||
@ -657,7 +657,7 @@ void InterruptChannel(u16 _channelID, const void* _pData, u32 _Size)
|
||||
|
||||
void ControlChannel(u16 _channelID, const void* _pData, u32 _Size)
|
||||
{
|
||||
//Console::Print("Emu ControlChannel\n");
|
||||
//INFO_LOG(CONSOLE, "Emu ControlChannel\n");
|
||||
|
||||
const u8* data = (const u8*)_pData;
|
||||
// Dump raw data
|
||||
@ -665,7 +665,7 @@ void ControlChannel(u16 _channelID, const void* _pData, u32 _Size)
|
||||
INFO_LOG(WII_IPC_WIIMOTE, "Wiimote_ControlChannel");
|
||||
std::string Temp = ArrayToString(data, 0, _Size);
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
Console::Print("\n%s: ControlChannel: %s\n", Tm().c_str(), Temp.c_str());
|
||||
INFO_LOG(CONSOLE, "\n%s: ControlChannel: %s\n", Tm().c_str(), Temp.c_str());
|
||||
#endif
|
||||
DEBUG_LOG(WII_IPC_WIIMOTE, " Data: %s", Temp.c_str());
|
||||
}
|
||||
@ -724,7 +724,7 @@ void ControlChannel(u16 _channelID, const void* _pData, u32 _Size)
|
||||
void Update()
|
||||
{
|
||||
//LOG(WII_IPC_WIIMOTE, "Wiimote_Update");
|
||||
//Console::Print("Emu Update: %i\n", g_ReportingMode);
|
||||
//INFO_LOG(CONSOLE, "Emu Update: %i\n", g_ReportingMode);
|
||||
|
||||
// Check if the pad state should be updated
|
||||
if ((g_Config.Trigger.Type == g_Config.Trigger.TRIGGER || g_Config.Trigger.Type == g_Config.Trigger.ANALOG1 || g_Config.Trigger.Type == g_Config.Trigger.ANALOG2
|
||||
|
Reference in New Issue
Block a user