mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 07:21:14 +01:00
Fix DEBUG logging (didn't work!). Shuffle around the log levels to make more sense (now NOTICE is the top one and always on), the rest is ERROR, WARNING, INFO, DEBUG. Fix the log levels of a lot of stuff. Use macros instead of numbers for various log level checks.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2700 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
554a930fe9
commit
aa7fe1edee
@ -48,7 +48,7 @@ void ConsoleListener::Open(int width, int height, char *title)
|
||||
SetConsoleTitle(title);
|
||||
|
||||
// Set the total letter space
|
||||
COORD co = {width, height};
|
||||
COORD co = {width, 3000}; // Big scrollback.
|
||||
SetConsoleScreenBufferSize(m_hStdOut, co);
|
||||
|
||||
/* Set the window size in number of letters. The height is hard coded here
|
||||
@ -102,7 +102,7 @@ void ConsoleListener::Log(LogTypes::LOG_LEVELS level, const char *text)
|
||||
break;
|
||||
|
||||
case INFO_LEVEL: // cyan
|
||||
color = FOREGROUND_GREEN | FOREGROUND_BLUE;
|
||||
color = FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY;
|
||||
break;
|
||||
|
||||
case DEBUG_LEVEL: // light gray
|
||||
|
@ -18,9 +18,9 @@
|
||||
#ifndef _LOG_H
|
||||
#define _LOG_H
|
||||
|
||||
#define ERROR_LEVEL 1 // Critical errors
|
||||
#define WARNING_LEVEL 2 // Something is suspicious.
|
||||
#define NOTICE_LEVEL 3 // Important information
|
||||
#define NOTICE_LEVEL 1 // VERY important information that is NOT errors. Like startup and OSReports.
|
||||
#define ERROR_LEVEL 2 // Critical errors
|
||||
#define WARNING_LEVEL 3 // Something is suspicious.
|
||||
#define INFO_LEVEL 4 // General information.
|
||||
#define DEBUG_LEVEL 5 // Detailed debugging - might make things slow.
|
||||
|
||||
@ -70,9 +70,9 @@ enum LOG_TYPE {
|
||||
|
||||
// FIXME: should this be removed?
|
||||
enum LOG_LEVELS {
|
||||
LNOTICE = NOTICE_LEVEL,
|
||||
LERROR = ERROR_LEVEL,
|
||||
LWARNING = WARNING_LEVEL,
|
||||
LNOTICE = NOTICE_LEVEL,
|
||||
LINFO = INFO_LEVEL,
|
||||
LDEBUG = DEBUG_LEVEL,
|
||||
};
|
||||
@ -85,10 +85,10 @@ enum LOG_LEVELS {
|
||||
- Debug_run() - run only in debug time
|
||||
*/
|
||||
#if defined LOGGING || defined _DEBUG || defined DEBUGFAST
|
||||
#define LOGLEVEL DEBUG_LEVEL
|
||||
#define MAX_LOGLEVEL DEBUG_LEVEL
|
||||
#else
|
||||
#ifndef LOGLEVEL
|
||||
#define LOGLEVEL NOTICE_LEVEL
|
||||
#ifndef MAX_LOGLEVEL
|
||||
#define MAX_LOGLEVEL WARNING_LEVEL
|
||||
#endif // loglevel
|
||||
#endif // logging
|
||||
|
||||
@ -102,33 +102,33 @@ enum LOG_LEVELS {
|
||||
#include "LogManager.h"
|
||||
|
||||
// Let the compiler optimize this out
|
||||
#define GENERIC_LOG(t, v, ...) {if (v <= LOGLEVEL) LogManager::GetInstance()->Log(v, t, __VA_ARGS__);}
|
||||
#define GENERIC_LOG(t, v, ...) {if (v <= MAX_LOGLEVEL) {LogManager::GetInstance()->Log(v, t, __VA_ARGS__);}}
|
||||
|
||||
#if LOGLEVEL >= ERROR_LEVEL
|
||||
#if MAX_LOGLEVEL >= ERROR_LEVEL
|
||||
#undef ERROR_LOG
|
||||
#define ERROR_LOG(t,...) {GENERIC_LOG(LogTypes::t, LogTypes::LERROR, __VA_ARGS__)}
|
||||
#endif // loglevel ERROR+
|
||||
|
||||
#if LOGLEVEL >= WARNING_LEVEL
|
||||
#if MAX_LOGLEVEL >= WARNING_LEVEL
|
||||
#undef WARN_LOG
|
||||
#define WARN_LOG(t,...) {GENERIC_LOG(LogTypes::t, LogTypes::LWARNING, __VA_ARGS__)}
|
||||
#endif // loglevel WARNING+
|
||||
|
||||
#if LOGLEVEL >= NOTICE_LEVEL
|
||||
#if MAX_LOGLEVEL >= NOTICE_LEVEL
|
||||
#undef NOTICE_LOG
|
||||
#define NOTICE_LOG(t,...) {GENERIC_LOG(LogTypes::t, LogTypes::LNOTICE, __VA_ARGS__)}
|
||||
#endif // loglevel NOTICE+
|
||||
#if LOGLEVEL >= INFO_LEVEL
|
||||
#if MAX_LOGLEVEL >= INFO_LEVEL
|
||||
#undef INFO_LOG
|
||||
#define INFO_LOG(t,...) {GENERIC_LOG(LogTypes::t, LogTypes::LINFO, __VA_ARGS__)}
|
||||
#endif // loglevel INFO+
|
||||
|
||||
#if LOGLEVEL >= DEBUG_LEVEL
|
||||
#if MAX_LOGLEVEL >= DEBUG_LEVEL
|
||||
#undef DEBUG_LOG
|
||||
#define DEBUG_LOG(t,...) {GENERIC_LOG(LogTypes::t, LogTypes::LDEBUG, __VA_ARGS__)}
|
||||
#endif // loglevel DEBUG+
|
||||
|
||||
#if LOGLEVEL >= DEBUG_LEVEL
|
||||
#if MAX_LOGLEVEL >= DEBUG_LEVEL
|
||||
#define _dbg_assert_(_t_, _a_) \
|
||||
if (!(_a_)) {\
|
||||
ERROR_LOG(_t_, "Error...\n\n Line: %d\n File: %s\n Time: %s\n\nIgnore and continue?", \
|
||||
@ -150,7 +150,7 @@ enum LOG_LEVELS {
|
||||
#define _dbg_assert_(_t_, _a_) ;
|
||||
#define _dbg_assert_msg_(_t_, _a_, _desc_, ...) ;
|
||||
#endif // dbg_assert
|
||||
#endif // LOGLEVEL DEBUG
|
||||
#endif // MAX_LOGLEVEL DEBUG
|
||||
|
||||
#define _assert_(_a_) _dbg_assert_(MASTER_LOG, _a_)
|
||||
#ifdef _WIN32
|
||||
|
@ -97,6 +97,13 @@ void LogManager::removeListener(LogTypes::LOG_TYPE type, LogListener *listener)
|
||||
logMutex->Leave();
|
||||
}
|
||||
|
||||
LogContainer::LogContainer(const char* shortName, const char* fullName, bool enable)
|
||||
: m_enable(enable) {
|
||||
strncpy(m_fullName, fullName, 128);
|
||||
strncpy(m_shortName, shortName, 32);
|
||||
m_level = LogTypes::LWARNING;
|
||||
}
|
||||
|
||||
// LogContainer
|
||||
void LogContainer::addListener(LogListener *listener) {
|
||||
bool exists = false;
|
||||
|
@ -90,12 +90,7 @@ private:
|
||||
|
||||
class LogContainer {
|
||||
public:
|
||||
LogContainer(const char* shortName, const char* fullName,
|
||||
bool enable = false) : m_enable(enable) {
|
||||
strncpy(m_fullName, fullName, 128);
|
||||
strncpy(m_shortName, shortName, 32);
|
||||
m_level = LogTypes::LWARNING;
|
||||
}
|
||||
LogContainer(const char* shortName, const char* fullName, bool enable = false);
|
||||
|
||||
const char *getShortName() const { return m_shortName; }
|
||||
const char *getFullName() const { return m_fullName; }
|
||||
@ -111,7 +106,7 @@ public:
|
||||
m_enable = enable;
|
||||
}
|
||||
|
||||
LogTypes::LOG_LEVELS getLevel() {
|
||||
LogTypes::LOG_LEVELS getLevel() const {
|
||||
return m_level;
|
||||
}
|
||||
|
||||
@ -138,7 +133,7 @@ private:
|
||||
static LogManager *m_logManager; // Singleton. Ugh.
|
||||
|
||||
public:
|
||||
static u32 GetMaxLevel() { return LOGLEVEL; }
|
||||
static u32 GetMaxLevel() { return MAX_LOGLEVEL; }
|
||||
|
||||
void Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
|
||||
const char *fmt, ...);
|
||||
|
@ -53,11 +53,11 @@ void Console_Submit(const char *cmd)
|
||||
|
||||
if (addr)
|
||||
{
|
||||
#if LOGLEVEL >= INFO_LEVEL
|
||||
#if MAX_LOGLEVEL >= INFO_LEVEL
|
||||
u32 EA =
|
||||
#endif
|
||||
Memory::CheckDTLB(addr, Memory::FLAG_NO_EXCEPTION);
|
||||
INFO_LOG(CONSOLE, "EA 0x%08x to 0x%08x", addr, EA);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -106,20 +106,20 @@ void PrintCallstack()
|
||||
}
|
||||
}
|
||||
|
||||
void PrintCallstack(LogTypes::LOG_TYPE type)
|
||||
void PrintCallstack(LogTypes::LOG_TYPE type, LogTypes::LOG_LEVELS level)
|
||||
{
|
||||
u32 addr = Memory::ReadUnchecked_U32(PowerPC::ppcState.gpr[1]); // SP
|
||||
|
||||
GENERIC_LOG(type, LogTypes::LWARNING, "== STACK TRACE - SP = %08x ==",
|
||||
GENERIC_LOG(type, level, "== STACK TRACE - SP = %08x ==",
|
||||
PowerPC::ppcState.gpr[1]);
|
||||
|
||||
if (LR == 0) {
|
||||
GENERIC_LOG(type, LogTypes::LWARNING, " LR = 0 - this is bad");
|
||||
GENERIC_LOG(type, level, " LR = 0 - this is bad");
|
||||
}
|
||||
int count = 1;
|
||||
if (g_symbolDB.GetDescription(PowerPC::ppcState.pc) != g_symbolDB.GetDescription(LR))
|
||||
{
|
||||
GENERIC_LOG(type, LogTypes::LINFO, " * %s [ LR = %08x ]",
|
||||
GENERIC_LOG(type, level, " * %s [ LR = %08x ]",
|
||||
g_symbolDB.GetDescription(LR), LR);
|
||||
count++;
|
||||
}
|
||||
@ -131,7 +131,7 @@ void PrintCallstack(LogTypes::LOG_TYPE type)
|
||||
const char *str = g_symbolDB.GetDescription(func);
|
||||
if (!str || strlen(str) == 0 || !strcmp(str, "Invalid"))
|
||||
str = "(unknown)";
|
||||
GENERIC_LOG(type, LogTypes::LINFO, " * %s [ addr = %08x ]", str, func);
|
||||
GENERIC_LOG(type, level, " * %s [ addr = %08x ]", str, func);
|
||||
addr = Memory::ReadUnchecked_U32(addr);
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ struct CallstackEntry
|
||||
|
||||
bool GetCallstack(std::vector<CallstackEntry> &output);
|
||||
void PrintCallstack();
|
||||
void PrintCallstack(LogTypes::LOG_TYPE _Log);
|
||||
void PrintCallstack(LogTypes::LOG_TYPE type, LogTypes::LOG_LEVELS level);
|
||||
void PrintDataBuffer(LogTypes::LOG_TYPE _Log, u8* _pData, size_t _Size, const char* _title);
|
||||
|
||||
} // end of namespace Debugger
|
||||
|
@ -35,7 +35,7 @@ void HLE_OSPanic()
|
||||
GetStringVA(Error);
|
||||
|
||||
PanicAlert("OSPanic: %s", Error.c_str());
|
||||
ERROR_LOG(OSREPORT,"(PC=%08x), OSPanic: %s", LR, Error.c_str());
|
||||
ERROR_LOG(OSREPORT, "(PC=%08x), OSPanic: %s", LR, Error.c_str());
|
||||
|
||||
NPC = LR;
|
||||
}
|
||||
@ -50,7 +50,7 @@ void HLE_OSReport()
|
||||
PC = LR;
|
||||
|
||||
// PanicAlert("(PC=%08x) OSReport: %s", LR, ReportMessage.c_str());
|
||||
ERROR_LOG(OSREPORT,"(PC=%08x) OSReport: %s", LR, ReportMessage.c_str());
|
||||
NOTICE_LOG(OSREPORT, "(PC=%08x) OSReport: %s", LR, ReportMessage.c_str());
|
||||
|
||||
PC = hackPC;
|
||||
}
|
||||
@ -65,7 +65,7 @@ void HLE_vprintf()
|
||||
PC = LR;
|
||||
|
||||
// PanicAlert("(PC=%08x) VPrintf: %s", LR, ReportMessage.c_str());
|
||||
ERROR_LOG(OSREPORT,"(PC=%08x) VPrintf: %s", LR, ReportMessage.c_str());
|
||||
NOTICE_LOG(OSREPORT, "(PC=%08x) VPrintf: %s", LR, ReportMessage.c_str());
|
||||
|
||||
PC = hackPC;
|
||||
}
|
||||
@ -80,7 +80,7 @@ void HLE_printf()
|
||||
PC = LR;
|
||||
|
||||
// PanicAlert("(PC=%08x) Printf: %s ", LR, ReportMessage.c_str());
|
||||
ERROR_LOG(OSREPORT,"(PC=%08x) Printf: %s ", LR, ReportMessage.c_str());
|
||||
NOTICE_LOG(OSREPORT, "(PC=%08x) Printf: %s ", LR, ReportMessage.c_str());
|
||||
|
||||
PC = hackPC;
|
||||
}
|
||||
|
@ -589,7 +589,7 @@ void STACKALIGN GatherPipeBursted()
|
||||
Common::SyncInterlockedExchangeAdd((LONG*)&fifo.CPReadWriteDistance, GPFifo::GATHER_PIPE_SIZE);
|
||||
|
||||
// High watermark overflow handling (hacked way)
|
||||
u32 ct=0;
|
||||
u32 ct = 0;
|
||||
if (fifo.CPReadWriteDistance > fifo.CPHiWatermark)
|
||||
{
|
||||
// we should raise an Ov interrupt for an accurate fifo emulation and let PPC deal with it.
|
||||
@ -608,14 +608,17 @@ void STACKALIGN GatherPipeBursted()
|
||||
// - CPU can write to fifo
|
||||
// - disable Underflow interrupt
|
||||
|
||||
WARN_LOG(COMMANDPROCESSOR, "(GatherPipeBursted): CPHiWatermark reached");
|
||||
INFO_LOG(COMMANDPROCESSOR, "(GatherPipeBursted): CPHiWatermark reached");
|
||||
// Wait for GPU to catch up
|
||||
while (!(fifo.bFF_BPEnable && fifo.bFF_Breakpoint) && fifo.CPReadWriteDistance > fifo.CPLoWatermark)
|
||||
{
|
||||
ct++;
|
||||
Common::SleepCurrentThread(1);
|
||||
}
|
||||
if (ct) {WARN_LOG(COMMANDPROCESSOR, "(GatherPipeBursted): %lu ms for nothing :[", ct);}
|
||||
if (ct) {
|
||||
// This is actually kind of fine. See big comment above.
|
||||
DEBUG_LOG(COMMANDPROCESSOR, "(GatherPipeBursted): waited %lu ms. ", ct);
|
||||
}
|
||||
/**/
|
||||
}
|
||||
// check if we are in sync
|
||||
|
@ -447,7 +447,7 @@ void ExecuteCommand(UDIDMAControlRegister& _DMAControlReg)
|
||||
//=========================================================================================================
|
||||
case 0x12:
|
||||
{
|
||||
#if LOGLEVEL >= 3
|
||||
#if MAX_LOGLEVEL >= INFO_LEVEL
|
||||
u32 offset = dvdMem.Command[1];
|
||||
// u32 sourcelength = dvdMem.Command[2];
|
||||
#endif
|
||||
@ -504,10 +504,10 @@ void ExecuteCommand(UDIDMAControlRegister& _DMAControlReg)
|
||||
//=========================================================================================================
|
||||
case 0xAB:
|
||||
{
|
||||
#if LOGLEVEL >= 4
|
||||
#if MAX_LOGLEVEL >= DEBUG_LEVEL
|
||||
u32 offset = dvdMem.Command[1] << 2;
|
||||
#endif
|
||||
DEBUG_LOG(DVDINTERFACE, "DVD: Trying to seek: offset=%08x", offset);
|
||||
DEBUG_LOG(DVDINTERFACE, "DVD: Seek: offset=%08x (ignoring)", offset);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -537,7 +537,7 @@ void ExecuteCommand(UDIDMAControlRegister& _DMAControlReg)
|
||||
// ugly hack to catch the disable command
|
||||
if (dvdMem.Command[1]!=0)
|
||||
{
|
||||
#if LOGLEVEL >= 4
|
||||
#if MAX_LOGLEVEL >= DEBUG_LEVEL
|
||||
u8 subCommand = (dvdMem.Command[0] & 0x00FF0000) >> 16;
|
||||
#endif
|
||||
|
||||
|
@ -184,7 +184,7 @@ void CEXIIPL::TransferByte(u8& _uByte)
|
||||
m_RTC[i] = pGCTime[i^3];
|
||||
}
|
||||
|
||||
#if LOGLEVEL >= 3
|
||||
#if MAX_LOGLEVEL >= INFO_LEVEL
|
||||
|
||||
if ((m_uAddress & 0xF0000000) == 0xb0000000)
|
||||
{
|
||||
|
@ -241,9 +241,17 @@ void CEXIMemoryCard::TransferByte(u8 &byte)
|
||||
{
|
||||
command = byte; // first byte is command
|
||||
byte = 0xFF; // would be tristate, but we don't care.
|
||||
WARN_LOG(EXPANSIONINTERFACE, "EXI MEMCARD: command %02x", command)
|
||||
|
||||
if(command == cmdClearStatus)
|
||||
switch (command)
|
||||
{
|
||||
case 0x52:
|
||||
INFO_LOG(EXPANSIONINTERFACE, "EXI MEMCARD: command %02x at position 0. seems normal.", command);
|
||||
break;
|
||||
default:
|
||||
WARN_LOG(EXPANSIONINTERFACE, "EXI MEMCARD: command %02x at position 0", command);
|
||||
break;
|
||||
}
|
||||
if (command == cmdClearStatus)
|
||||
{
|
||||
status &= ~MC_STATUS_PROGRAMEERROR;
|
||||
status &= ~MC_STATUS_ERASEERROR;
|
||||
|
@ -65,7 +65,7 @@ namespace Memory
|
||||
// #define NOCHECK
|
||||
|
||||
// Always disable memory checks if the Release build
|
||||
#if LOGLEVEL < 4
|
||||
#if MAX_LOGLEVEL < 4
|
||||
#define NOCHECK
|
||||
#endif
|
||||
|
||||
|
@ -237,14 +237,12 @@ void WriteToHardware(u32 em_address, const T data, u32 effective_address, Memory
|
||||
// ----------------
|
||||
u32 Read_Opcode(const u32 _Address)
|
||||
{
|
||||
#if LOGLEVEL >= 4
|
||||
if (_Address == 0x00000000)
|
||||
{
|
||||
// FIXME use assert?
|
||||
PanicAlert("Program tried to read from [00000000]");
|
||||
PanicAlert("Program tried to read an opcode from [00000000]. It has crashed.");
|
||||
return 0x00000000;
|
||||
}
|
||||
#endif
|
||||
|
||||
u32 _var = 0;
|
||||
ReadFromHardware<u32>(_var, _Address, _Address, FLAG_OPCODE);
|
||||
@ -283,7 +281,7 @@ u16 Read_U16(const u32 _Address)
|
||||
|
||||
u32 Read_U32(const u32 _Address)
|
||||
{
|
||||
/*#if LOGLEVEL >= 4
|
||||
/*#if MAX_LOGLEVEL >= 4
|
||||
if (_Address == 0x00000000)
|
||||
{
|
||||
//PanicAlert("Program tried to read from [00000000]");
|
||||
|
@ -593,12 +593,12 @@ void RunSIBuffer()
|
||||
else
|
||||
outLength++;
|
||||
|
||||
#if LOGLEVEL >= 3
|
||||
#if MAX_LOGLEVEL >= INFO_LEVEL
|
||||
int numOutput =
|
||||
#endif
|
||||
g_Channel[g_ComCSR.CHANNEL].m_pDevice->RunBuffer(g_SIBuffer, inLength);
|
||||
|
||||
INFO_LOG(SERIALINTERFACE, "RunSIBuffer (intLen: %i outLen: %i) (processed: %i)", inLength, outLength, numOutput);
|
||||
INFO_LOG(SERIALINTERFACE, "RunSIBuffer (intLen: %i outLen: %i) (processed: %i)", inLength, outLength, numOutput);
|
||||
|
||||
// Transfer completed
|
||||
GenerateSIInterrupt(INT_TCINT);
|
||||
|
@ -236,9 +236,11 @@ IWII_IPC_HLE_Device* CreateDevice(u32 _DeviceID, const std::string& _rDeviceName
|
||||
0x933e.... with the same .... as in the _CommandAddress. */
|
||||
// ----------------
|
||||
bool AckCommand(u32 _Address)
|
||||
{
|
||||
Debugger::PrintCallstack(LogTypes::WII_IPC_HLE);
|
||||
WARN_LOG(WII_IPC_HLE, "AckCommand: 0%08x (num: %i) PC=0x%08x", _Address, g_AckNumber, PC);
|
||||
{
|
||||
#if MAX_LOG_LEVEL >= DEBUG_LEVEL
|
||||
Debugger::PrintCallstack(LogTypes::WII_IPC_HLE, LogTypes::LDEBUG);
|
||||
#endif
|
||||
INFO_LOG(WII_IPC_HLE, "AckCommand: 0%08x (num: %i) PC=0x%08x", _Address, g_AckNumber, PC);
|
||||
|
||||
std::list<u32>::iterator itr = g_Ack.begin();
|
||||
while (itr != g_Ack.end())
|
||||
|
@ -155,7 +155,7 @@ protected:
|
||||
u32 BufferOffset = BufferVector;
|
||||
Memory::Write_U32(1, _CommandAddress + 0x4);
|
||||
|
||||
for (u32 i=0; i<NumberInBuffer; i++)
|
||||
for (u32 i = 0; i < NumberInBuffer; i++)
|
||||
{
|
||||
u32 InBuffer = Memory::Read_U32(BufferOffset); BufferOffset += 4;
|
||||
u32 InBufferSize = Memory::Read_U32(BufferOffset); BufferOffset += 4;
|
||||
@ -163,7 +163,7 @@ protected:
|
||||
INFO_LOG(WII_IPC_HLE, "%s - IOCtlV InBuffer[%i]:", GetDeviceName().c_str(), i);
|
||||
|
||||
std::string Temp;
|
||||
for (u32 j=0; j<InBufferSize; j++)
|
||||
for (u32 j = 0; j < InBufferSize; j++)
|
||||
{
|
||||
char Buffer[128];
|
||||
sprintf(Buffer, "%02x ", Memory::Read_U8(InBuffer+j));
|
||||
@ -184,7 +184,7 @@ protected:
|
||||
INFO_LOG(WII_IPC_HLE,"%s - IOCtlV OutBuffer[%i]:", GetDeviceName().c_str(), i);
|
||||
INFO_LOG(WII_IPC_HLE, " OutBuffer: 0x%08x (0x%x):", OutBuffer, OutBufferSize);
|
||||
|
||||
#if defined LOGLEVEL && LOGLEVEL > NOTICE_LEVEL
|
||||
#if defined(MAX_LOGLEVEL) && MAX_LOGLEVEL >= INFO_LEVEL
|
||||
DumpCommands(OutBuffer, OutBufferSize, LogTypes::WII_IPC_HLE, LogTypes::LINFO);
|
||||
#endif
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
|
||||
case 0x86:
|
||||
{
|
||||
Memory::Memset(_BufferOut, 0, _BufferOutSize);
|
||||
WARN_LOG(WII_IPC_DVD, "%s executes DVDLowClearCoverInterrupt (Buffer 0x%08x, 0x%x)", GetDeviceName().c_str(), _BufferOut, _BufferOutSize);
|
||||
INFO_LOG(WII_IPC_DVD, "%s executes DVDLowClearCoverInterrupt (Buffer 0x%08x, 0x%x)", GetDeviceName().c_str(), _BufferOut, _BufferOutSize);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -611,7 +611,7 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventRequestConnection(CWII_IPC_HL
|
||||
AddEventToQueue(Event);
|
||||
|
||||
// Log
|
||||
#if LOGLEVEL >= 4
|
||||
#if MAX_LOGLEVEL >= DEBUG_LEVEL
|
||||
static char LinkType[][128] =
|
||||
{
|
||||
{ "HCI_LINK_SCO 0x00 - Voice"},
|
||||
@ -627,7 +627,7 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventRequestConnection(CWII_IPC_HL
|
||||
DEBUG_LOG(WII_IPC_WIIMOTE, " COD[0]: 0x%02x", pEventRequestConnection->uclass[0]);
|
||||
DEBUG_LOG(WII_IPC_WIIMOTE, " COD[1]: 0x%02x", pEventRequestConnection->uclass[1]);
|
||||
DEBUG_LOG(WII_IPC_WIIMOTE, " COD[2]: 0x%02x", pEventRequestConnection->uclass[2]);
|
||||
DEBUG_LOG(WII_IPC_WIIMOTE, " LinkType: %s", LinkType[pEventRequestConnection->LinkType]);
|
||||
// DEBUG_LOG(WII_IPC_WIIMOTE, " LinkType: %s", LinkType[pEventRequestConnection->LinkType]);
|
||||
|
||||
return true;
|
||||
};
|
||||
@ -716,7 +716,7 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventConnectionComplete(bdaddr_t _
|
||||
|
||||
g_GlobalHandle = pConnectionComplete->Connection_Handle;
|
||||
|
||||
#if LOGLEVEL >= 4
|
||||
#if MAX_LOGLEVEL >= DEBUG_LEVEL
|
||||
static char s_szLinkType[][128] =
|
||||
{
|
||||
{ "HCI_LINK_SCO 0x00 - Voice"},
|
||||
@ -1410,7 +1410,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandHostBufferSize(u8* _Input)
|
||||
// ----------------
|
||||
void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWritePageTimeOut(u8* _Input)
|
||||
{
|
||||
#if LOGLEVEL >= 4
|
||||
#if MAX_LOGLEVEL >= DEBUG_LEVEL
|
||||
// command parameters
|
||||
hci_write_page_timeout_cp* pWritePageTimeOut = (hci_write_page_timeout_cp*)_Input;
|
||||
#endif
|
||||
@ -1440,7 +1440,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteScanEnable(u8* _Input)
|
||||
hci_write_scan_enable_rp Reply;
|
||||
Reply.status = 0x00;
|
||||
|
||||
#if LOGLEVEL >= 4
|
||||
#if MAX_LOGLEVEL >= DEBUG_LEVEL
|
||||
static char Scanning[][128] =
|
||||
{
|
||||
{ "HCI_NO_SCAN_ENABLE"},
|
||||
@ -1461,7 +1461,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteScanEnable(u8* _Input)
|
||||
|
||||
void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteInquiryMode(u8* _Input)
|
||||
{
|
||||
#if LOGLEVEL >= 4
|
||||
#if MAX_LOGLEVEL >= 4
|
||||
// command parameters
|
||||
hci_write_inquiry_mode_cp* pInquiryMode = (hci_write_inquiry_mode_cp*)_Input;
|
||||
#endif
|
||||
@ -1470,7 +1470,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteInquiryMode(u8* _Input)
|
||||
hci_write_inquiry_mode_rp Reply;
|
||||
Reply.status = 0x00;
|
||||
|
||||
#if LOGLEVEL >= 4
|
||||
#if MAX_LOGLEVEL >= DEBUG_LEVEL
|
||||
static char InquiryMode[][128] =
|
||||
{
|
||||
{ "Standard Inquiry Result event format (default)" },
|
||||
@ -1487,7 +1487,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteInquiryMode(u8* _Input)
|
||||
|
||||
void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWritePageScanType(u8* _Input)
|
||||
{
|
||||
#if LOGLEVEL >= 4
|
||||
#if MAX_LOGLEVEL >= DEBUG_LEVEL
|
||||
// command parameters
|
||||
hci_write_page_scan_type_cp* pWritePageScanType = (hci_write_page_scan_type_cp*)_Input;
|
||||
#endif
|
||||
@ -1496,7 +1496,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWritePageScanType(u8* _Input)
|
||||
hci_write_page_scan_type_rp Reply;
|
||||
Reply.status = 0x00;
|
||||
|
||||
#if LOGLEVEL >= 4
|
||||
#if MAX_LOGLEVEL >= DEBUG_LEVEL
|
||||
static char PageScanType[][128] =
|
||||
{
|
||||
{ "Mandatory: Standard Scan (default)" },
|
||||
@ -1553,7 +1553,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandInquiry(u8* _Input)
|
||||
|
||||
void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteInquiryScanType(u8* _Input)
|
||||
{
|
||||
#if LOGLEVEL >= 4
|
||||
#if MAX_LOGLEVEL >= DEBUG_LEVEL
|
||||
// command parameters
|
||||
hci_write_inquiry_scan_type_cp* pSetEventFilter = (hci_write_inquiry_scan_type_cp*)_Input;
|
||||
#endif
|
||||
@ -1657,7 +1657,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandAcceptCon(u8* _Input)
|
||||
// command parameters
|
||||
hci_accept_con_cp* pAcceptCon = (hci_accept_con_cp*)_Input;
|
||||
|
||||
#if LOGLEVEL >= 4
|
||||
#if MAX_LOGLEVEL >= DEBUG_LEVEL
|
||||
static char s_szRole[][128] =
|
||||
{
|
||||
{ "Master (0x00)"},
|
||||
|
@ -68,7 +68,7 @@ void CLogWindow::CreateGUIControls()
|
||||
wxStaticBoxSizer* sbLeftOptions = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Options"));
|
||||
|
||||
wxArrayString wxLevels;
|
||||
for (int i = 0; i < LOGLEVEL; ++i)
|
||||
for (int i = 1; i <= MAX_LOGLEVEL; ++i)
|
||||
wxLevels.Add(wxString::Format(wxT("%i"), i));
|
||||
m_verbosity = new wxRadioBox(this, IDM_VERBOSITY, wxT("Verbosity"), wxDefaultPosition, wxDefaultSize, wxLevels, 0, wxRA_SPECIFY_COLS, wxDefaultValidator);
|
||||
sbLeftOptions->Add(m_verbosity);
|
||||
@ -142,7 +142,7 @@ void CLogWindow::SaveSettings()
|
||||
ini.Set("LogWindow", "y", GetPosition().y);
|
||||
ini.Set("LogWindow", "w", GetSize().GetWidth());
|
||||
ini.Set("LogWindow", "h", GetSize().GetHeight());
|
||||
ini.Set("Options", "Verbosity", m_verbosity->GetSelection());
|
||||
ini.Set("Options", "Verbosity", m_verbosity->GetSelection() + 1);
|
||||
ini.Set("Options", "WriteToFile", m_writeFile);
|
||||
ini.Set("Options", "WriteToConsole", m_writeConsole);
|
||||
for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; ++i)
|
||||
@ -161,7 +161,7 @@ void CLogWindow::LoadSettings()
|
||||
ini.Get("LogWindow", "h", &h, GetSize().GetHeight());
|
||||
SetSize(x, y, w, h);
|
||||
ini.Get("Options", "Verbosity", &verbosity, 0);
|
||||
m_verbosity->SetSelection(verbosity);
|
||||
m_verbosity->SetSelection(verbosity - 1);
|
||||
ini.Get("Options", "WriteToFile", &m_writeFile, true);
|
||||
m_writeFileCB->SetValue(m_writeFile);
|
||||
ini.Get("Options", "WriteToConsole", &m_writeConsole, true);
|
||||
@ -185,6 +185,7 @@ void CLogWindow::LoadSettings()
|
||||
m_logManager->addListener((LogTypes::LOG_TYPE)i, m_console);
|
||||
else
|
||||
m_logManager->removeListener((LogTypes::LOG_TYPE)i, m_console);
|
||||
m_logManager->setLogLevel((LogTypes::LOG_TYPE)i, (LogTypes::LOG_LEVELS)(verbosity));
|
||||
}
|
||||
UpdateChecks();
|
||||
}
|
||||
@ -270,13 +271,12 @@ void CLogWindow::OnOptionsCheck(wxCommandEvent& event)
|
||||
{
|
||||
case IDM_VERBOSITY:
|
||||
{
|
||||
// get selection
|
||||
int v = m_verbosity->GetSelection();
|
||||
|
||||
for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; i++)
|
||||
{
|
||||
m_logManager->setLogLevel((LogTypes::LOG_TYPE)i, (LogTypes::LOG_LEVELS)v);
|
||||
}
|
||||
// get selection
|
||||
int v = m_verbosity->GetSelection() + 1;
|
||||
for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; i++)
|
||||
{
|
||||
m_logManager->setLogLevel((LogTypes::LOG_TYPE)i, (LogTypes::LOG_LEVELS)v);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -480,6 +480,7 @@ void TextureMngr::CopyRenderTargetToTexture(u32 address, bool bFromZBuffer, bool
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, entry.texture);
|
||||
// for some reason mario sunshine errors here...
|
||||
// Beyond Good and Evil does too, occasionally.
|
||||
GLenum err = GL_NO_ERROR;
|
||||
GL_REPORT_ERROR();
|
||||
if (err == GL_NO_ERROR)
|
||||
|
@ -377,7 +377,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\PluginSpecs;..\..\..\Externals\SDL\include;..\..\Core\Common\Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\WiiUse\inc"
|
||||
PreprocessorDefinitions="DEBUGFAST;WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGIN_WIIMOTE_TEST_EXPORTS;_SECURE_SCL=0"
|
||||
PreprocessorDefinitions="DEBUGFAST;WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGIN_WIIMOTE_TEST_EXPORTS;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
|
||||
RuntimeLibrary="0"
|
||||
WarningLevel="3"
|
||||
WarnAsError="false"
|
||||
@ -458,7 +458,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\PluginSpecs;..\..\..\Externals\SDL\include;..\..\Core\Common\Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\WiiUse\inc"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGIN_WIIMOTE_TEST_EXPORTS;DEBUGFAST;_SECURE_SCL=0"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGIN_WIIMOTE_TEST_EXPORTS;DEBUGFAST;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
|
||||
RuntimeLibrary="0"
|
||||
WarningLevel="3"
|
||||
WarnAsError="false"
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Version="9,00"
|
||||
Name="Plugin_nJoy_SDL"
|
||||
ProjectGUID="{521498BE-6089-4780-8223-E67C22F4E068}"
|
||||
RootNamespace="Plugin_nJoy_SDL"
|
||||
@ -441,7 +441,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\PluginSpecs;..\..\..\Externals\SDL\Include;..\..\Core\Common\Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;DEBUGFAST;_WINDOWS;_USRDLL;PLUGIN_NJOY_SDL_EXPORTS;_SECURE_SCL=0"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;DEBUGFAST;_WINDOWS;_USRDLL;PLUGIN_NJOY_SDL_EXPORTS;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
|
Loading…
x
Reference in New Issue
Block a user