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:
Shawn Hoffman
2009-03-18 17:17:58 +00:00
parent 03ba466b5b
commit 2301d072a6
120 changed files with 1758 additions and 1103 deletions

View File

@ -27,7 +27,6 @@
#include "Common.h"
#include "Thread.h"
#include "StringUtil.h"
#include "ConsoleWindow.h"
#include "Timer.h"
#include "pluginspecs_wiimote.h"
@ -129,7 +128,7 @@ void SendData(u16 _channelID, const u8* _pData, u32 _Size)
// Debugging
//std::string Temp = ArrayToString(WriteEvent.m_PayLoad, 28, 0, 30);
//Console::Print("Wiimote Write:\n%s\n", Temp.c_str());
//INFO_LOG(CONSOLE, "Wiimote Write:\n%s\n", Temp.c_str());
}
m_pCriticalSection->Leave();
}
@ -146,7 +145,7 @@ void ReadData()
// Send data to the Wiimote
if (!m_EventWriteQueue.empty())
{
//Console::Print("Writing data to the Wiimote\n");
//INFO_LOG(CONSOLE, "Writing data to the Wiimote\n");
SEvent& rEvent = m_EventWriteQueue.front();
wiiuse_io_write(m_pWiiMote, (byte*)rEvent.m_PayLoad, MAX_PAYLOAD);
m_EventWriteQueue.pop();
@ -194,7 +193,7 @@ void ReadData()
//if(GetAsyncKeyState('V'))
{
std::string Temp = ArrayToString(pBuffer, 20, 0, 30);
Console::Print("Data: %s\n", Temp.c_str());
INFO_LOG(CONSOLE, "Data: %s\n", Temp.c_str());
} */
#endif
}
@ -309,7 +308,7 @@ void SendAcc(u8 _ReportID)
wiiuse_io_write(WiiMoteReal::g_WiiMotesFromWiiUse[0], (byte*)DataAcc, MAX_PAYLOAD);
std::string Temp = ArrayToString(DataAcc, 28, 0, 30);
Console::Print("SendAcc: %s\n", Temp.c_str());
INFO_LOG(CONSOLE, "SendAcc: %s\n", Temp.c_str());
//22 00 00 _reportID 00
}
@ -348,7 +347,7 @@ int Initialize()
g_WiiMotesFromWiiUse = wiiuse_init(MAX_WIIMOTES);
g_NumberOfWiiMotes = wiiuse_find(g_WiiMotesFromWiiUse, MAX_WIIMOTES, 5);
if (g_NumberOfWiiMotes > 0) g_RealWiiMotePresent = true;
Console::Print("Found No of Wiimotes: %i\n", g_NumberOfWiiMotes);
INFO_LOG(CONSOLE, "Found No of Wiimotes: %i\n", g_NumberOfWiiMotes);
// Remove the wiiuse_poll() threshold
wiiuse_set_accel_threshold(g_WiiMotesFromWiiUse[0], 0);
@ -362,7 +361,7 @@ int Initialize()
// I don't seem to need wiiuse_connect() in Windows. But Linux needs it.
#ifndef _WIN32
int Connect = wiiuse_connect(g_WiiMotesFromWiiUse, MAX_WIIMOTES);
Console::Print("Connected: %i\n", Connect);
INFO_LOG(CONSOLE, "Connected: %i\n", Connect);
#endif
// If we are connecting from the config window without a game running we flash the lights
@ -431,13 +430,13 @@ void Shutdown(void)
void InterruptChannel(u16 _channelID, const void* _pData, u32 _Size)
{
//Console::Print("Real InterruptChannel\n");
//INFO_LOG(CONSOLE, "Real InterruptChannel\n");
g_WiiMotes[0]->SendData(_channelID, (const u8*)_pData, _Size);
}
void ControlChannel(u16 _channelID, const void* _pData, u32 _Size)
{
//Console::Print("Real ControlChannel\n");
//INFO_LOG(CONSOLE, "Real ControlChannel\n");
g_WiiMotes[0]->SendData(_channelID, (const u8*)_pData, _Size);
}
@ -447,7 +446,7 @@ void ControlChannel(u16 _channelID, const void* _pData, u32 _Size)
// ---------------
void Update()
{
//Console::Print("Real Update\n");
//INFO_LOG(CONSOLE, "Real Update\n");
for (int i = 0; i < g_NumberOfWiiMotes; i++)
{
g_WiiMotes[i]->Update();