allow gcc to check the format of args being passed to MsgAlert and GenericLog. Fixed nearly all warnings that arose from this, as well as some preexisting ones (some were actually crashes and/or bugs...)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6522 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
3e4aa20601
commit
9da4fe086b
|
@ -183,7 +183,7 @@ bool AlsaSound::AlsaInit()
|
||||||
//it is probably a bad idea to try to send more than one buffer of data
|
//it is probably a bad idea to try to send more than one buffer of data
|
||||||
if ((unsigned int)frames_to_deliver > buffer_size)
|
if ((unsigned int)frames_to_deliver > buffer_size)
|
||||||
frames_to_deliver = buffer_size;
|
frames_to_deliver = buffer_size;
|
||||||
NOTICE_LOG(AUDIO, "ALSA gave us a %d sample \"hardware\" buffer with %d periods. Will send %d samples per fragments.\n", buffer_size, periods, frames_to_deliver);
|
NOTICE_LOG(AUDIO, "ALSA gave us a %ld sample \"hardware\" buffer with %d periods. Will send %d samples per fragments.\n", buffer_size, periods, frames_to_deliver);
|
||||||
|
|
||||||
snd_pcm_sw_params_alloca(&swparams);
|
snd_pcm_sw_params_alloca(&swparams);
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ bool WaveFileWriter::Start(const char *filename)
|
||||||
|
|
||||||
// We are now at offset 44
|
// We are now at offset 44
|
||||||
if (ftello(file) != 44)
|
if (ftello(file) != 44)
|
||||||
PanicAlert("wrong offset: %i", ftello(file));
|
PanicAlert("wrong offset: %lli", ftello(file));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,7 +143,7 @@ void* DynamicLibrary::Get(const char* funcname) const
|
||||||
|
|
||||||
if (!library)
|
if (!library)
|
||||||
{
|
{
|
||||||
ERROR_LOG(COMMON, "DL: Get failed %s - Library not loaded");
|
ERROR_LOG(COMMON, "DL: Get failed %s - Library not loaded", funcname);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -337,7 +337,7 @@ u64 GetSize(const char *filename)
|
||||||
// on windows it's actually _stat64 defined in commonFuncs
|
// on windows it's actually _stat64 defined in commonFuncs
|
||||||
struct stat64 buf;
|
struct stat64 buf;
|
||||||
if (stat64(filename, &buf) == 0) {
|
if (stat64(filename, &buf) == 0) {
|
||||||
DEBUG_LOG(COMMON, "GetSize: %s: %ld", filename, buf.st_size);
|
DEBUG_LOG(COMMON, "GetSize: %s: %lld", filename, buf.st_size);
|
||||||
return buf.st_size;
|
return buf.st_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,11 @@ enum LOG_LEVELS {
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
void GenericLog(LOGTYPES_LEVELS level, LOGTYPES_TYPE type,
|
void GenericLog(LOGTYPES_LEVELS level, LOGTYPES_TYPE type,
|
||||||
const char *file, int line, const char *fmt, ...);
|
const char *file, int line, const char *fmt, ...)
|
||||||
|
#ifdef __GNUC__
|
||||||
|
__attribute__((format(printf, 5, 6)))
|
||||||
|
#endif
|
||||||
|
;
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -28,7 +28,11 @@ enum MSG_TYPE
|
||||||
typedef bool (*MsgAlertHandler)(const char* caption, const char* text,
|
typedef bool (*MsgAlertHandler)(const char* caption, const char* text,
|
||||||
bool yes_no, int Style);
|
bool yes_no, int Style);
|
||||||
void RegisterMsgAlertHandler(MsgAlertHandler handler);
|
void RegisterMsgAlertHandler(MsgAlertHandler handler);
|
||||||
extern bool MsgAlert(const char* caption, bool yes_no, int Style, const char* format, ...);
|
extern bool MsgAlert(const char* caption, bool yes_no, int Style, const char* format, ...)
|
||||||
|
#ifdef __GNUC__
|
||||||
|
__attribute__((format(printf, 4, 5)))
|
||||||
|
#endif
|
||||||
|
;
|
||||||
void SetEnableAlert(bool enable);
|
void SetEnableAlert(bool enable);
|
||||||
|
|
||||||
#ifndef GEKKO
|
#ifndef GEKKO
|
||||||
|
|
|
@ -78,7 +78,8 @@ bool Initialize()
|
||||||
}
|
}
|
||||||
|
|
||||||
char pbuf[100];
|
char pbuf[100];
|
||||||
err = clGetPlatformInfo(platforms[0], CL_PLATFORM_VENDOR, sizeof(pbuf), pbuf, NULL);
|
err = clGetPlatformInfo(platforms[0], CL_PLATFORM_VENDOR, sizeof(pbuf),
|
||||||
|
pbuf, NULL);
|
||||||
|
|
||||||
if (err != CL_SUCCESS)
|
if (err != CL_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -95,7 +96,8 @@ bool Initialize()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
cl_context_properties cps[3] = {CL_CONTEXT_PLATFORM, (cl_context_properties)platform, 0};
|
cl_context_properties cps[3] = {CL_CONTEXT_PLATFORM,
|
||||||
|
(cl_context_properties)platform, 0};
|
||||||
|
|
||||||
cl_context_properties* cprops = (NULL == platform) ? NULL : cps;
|
cl_context_properties* cprops = (NULL == platform) ? NULL : cps;
|
||||||
|
|
||||||
|
@ -143,9 +145,10 @@ cl_command_queue GetCommandQueue()
|
||||||
cl_program CompileProgram(const char *Kernel)
|
cl_program CompileProgram(const char *Kernel)
|
||||||
{
|
{
|
||||||
u32 compileStart = Common::Timer::GetTimeMs();
|
u32 compileStart = Common::Timer::GetTimeMs();
|
||||||
int err;
|
cl_int err;
|
||||||
cl_program program;
|
cl_program program;
|
||||||
program = clCreateProgramWithSource(OpenCL::g_context, 1, (const char **) & Kernel, NULL, &err);
|
program = clCreateProgramWithSource(OpenCL::g_context, 1,
|
||||||
|
(const char **) & Kernel, NULL, &err);
|
||||||
if (!program)
|
if (!program)
|
||||||
{
|
{
|
||||||
HandleCLError(err, "Error: Failed to create compute program!");
|
HandleCLError(err, "Error: Failed to create compute program!");
|
||||||
|
@ -156,13 +159,14 @@ cl_program CompileProgram(const char *Kernel)
|
||||||
err = clBuildProgram(program , 0, NULL, NULL, NULL, NULL);
|
err = clBuildProgram(program , 0, NULL, NULL, NULL, NULL);
|
||||||
if(err != CL_SUCCESS) {
|
if(err != CL_SUCCESS) {
|
||||||
char *errors[16384] = {0};
|
char *errors[16384] = {0};
|
||||||
err = clGetProgramBuildInfo(program, OpenCL::device_id, CL_PROGRAM_BUILD_LOG, sizeof(errors),
|
err = clGetProgramBuildInfo(program, OpenCL::device_id,
|
||||||
errors, NULL);
|
CL_PROGRAM_BUILD_LOG, sizeof(*errors), errors, NULL);
|
||||||
ERROR_LOG(COMMON, "Error log:\n%s\n", errors);
|
ERROR_LOG(COMMON, "Error log:\n%s\n", *errors);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
NOTICE_LOG(COMMON, "OpenCL CompileProgram took %.3f seconds", (float)(Common::Timer::GetTimeMs() - compileStart) / 1000.0);
|
NOTICE_LOG(COMMON, "OpenCL CompileProgram took %.3f seconds",
|
||||||
|
(float)(Common::Timer::GetTimeMs() - compileStart) / 1000.0);
|
||||||
return program;
|
return program;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,7 +184,8 @@ cl_kernel CompileKernel(cl_program program, const char *Function)
|
||||||
HandleCLError(err, buffer);
|
HandleCLError(err, buffer);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
NOTICE_LOG(COMMON, "OpenCL CompileKernel took %.3f seconds", (float)(Common::Timer::GetTimeMs() - compileStart) / 1000.0);
|
NOTICE_LOG(COMMON, "OpenCL CompileKernel took %.3f seconds",
|
||||||
|
(float)(Common::Timer::GetTimeMs() - compileStart) / 1000.0);
|
||||||
return kernel;
|
return kernel;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -196,7 +196,7 @@ bool SDCardCreate(u64 disk_size /*in MB*/, char* filename)
|
||||||
disk_size *= 1024 * 1024;
|
disk_size *= 1024 * 1024;
|
||||||
|
|
||||||
if (disk_size < 0x800000 || disk_size > 0x800000000ULL) {
|
if (disk_size < 0x800000 || disk_size > 0x800000000ULL) {
|
||||||
ERROR_LOG(COMMON, "Trying to create SD Card image of size %iMB is out of range (8MB-32GB)", disk_size/(1024*1024));
|
ERROR_LOG(COMMON, "Trying to create SD Card image of size %lliMB is out of range (8MB-32GB)", disk_size/(1024*1024));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ bool SysConf::LoadFromFile(const char *filename)
|
||||||
return false; //most likely: file does not exist
|
return false; //most likely: file does not exist
|
||||||
if (size != SYSCONF_SIZE)
|
if (size != SYSCONF_SIZE)
|
||||||
{
|
{
|
||||||
PanicAlert("Your SYSCONF file is the wrong size - should be 0x%04x (but is 0x%04x)",
|
PanicAlert("Your SYSCONF file is the wrong size - should be 0x%04x (but is 0x%04llx)",
|
||||||
SYSCONF_SIZE, size);
|
SYSCONF_SIZE, size);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,7 +245,7 @@ void LogInfo(const char *format, ...)
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
CharArrayFromFormatV(temp, 512, format, args);
|
CharArrayFromFormatV(temp, 512, format, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
INFO_LOG(ACTIONREPLAY, temp);
|
INFO_LOG(ACTIONREPLAY, "%s", temp);
|
||||||
|
|
||||||
if (logSelf)
|
if (logSelf)
|
||||||
{
|
{
|
||||||
|
@ -798,7 +798,7 @@ bool ZeroCode_MemoryCopy(const u32 val_last, const ARAddr addr, const u32 data)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LogInfo("Bad Value");
|
LogInfo("Bad Value");
|
||||||
PanicAlert("Action Replay Error: Invalid value (&08x) in Memory Copy (%s)", (data & ~0x7FFF), current_code->name.c_str());
|
PanicAlert("Action Replay Error: Invalid value (%08x) in Memory Copy (%s)", (data & ~0x7FFF), current_code->name.c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -689,7 +689,7 @@ bool report_slow(int skipped)
|
||||||
// WARNING - THIS IS EXECUTED FROM VIDEO THREAD
|
// WARNING - THIS IS EXECUTED FROM VIDEO THREAD
|
||||||
void Callback_VideoLog(const TCHAR *_szMessage, int _bDoBreak)
|
void Callback_VideoLog(const TCHAR *_szMessage, int _bDoBreak)
|
||||||
{
|
{
|
||||||
INFO_LOG(VIDEO, _szMessage);
|
INFO_LOG(VIDEO, "%s", _szMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Should be called from GPU thread when a frame is drawn
|
// Should be called from GPU thread when a frame is drawn
|
||||||
|
@ -710,7 +710,7 @@ void Callback_VideoRequestWindowSize(int& x, int& y, int& width, int& height)
|
||||||
// WARNING - THIS MAY BE EXECUTED FROM DSP THREAD
|
// WARNING - THIS MAY BE EXECUTED FROM DSP THREAD
|
||||||
void Callback_DSPLog(const TCHAR* _szMessage, int _v)
|
void Callback_DSPLog(const TCHAR* _szMessage, int _v)
|
||||||
{
|
{
|
||||||
GENERIC_LOG(LogTypes::AUDIO, (LogTypes::LOG_LEVELS)_v, _szMessage);
|
GENERIC_LOG(LogTypes::AUDIO, (LogTypes::LOG_LEVELS)_v, "%s", _szMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -529,8 +529,10 @@ void ExecuteCommand(UDICR& _DICR)
|
||||||
|
|
||||||
if (GCAM)
|
if (GCAM)
|
||||||
{
|
{
|
||||||
ERROR_LOG(DVDINTERFACE, "DVD: %08x, %08x, %08x, DMA=addr:%08x,len:%08x,ctrl:%08x",
|
ERROR_LOG(DVDINTERFACE,
|
||||||
m_DICMDBUF[0], m_DICMDBUF[1], m_DICMDBUF[2], m_DIMAR, m_DILENGTH, m_DICR);
|
"DVD: %08x, %08x, %08x, DMA=addr:%08x,len:%08x,ctrl:%08x",
|
||||||
|
m_DICMDBUF[0].Hex, m_DICMDBUF[1].Hex, m_DICMDBUF[2].Hex,
|
||||||
|
m_DIMAR.Hex, m_DILENGTH.Hex, m_DICR.Hex);
|
||||||
// decrypt command. But we have a zero key, that simplifies things a lot.
|
// decrypt command. But we have a zero key, that simplifies things a lot.
|
||||||
// If you get crazy dvd command errors, make sure 0x80000000 - 0x8000000c is zero'd
|
// If you get crazy dvd command errors, make sure 0x80000000 - 0x8000000c is zero'd
|
||||||
m_DICMDBUF[0].Hex <<= 24;
|
m_DICMDBUF[0].Hex <<= 24;
|
||||||
|
|
|
@ -831,7 +831,7 @@ void Wiimote::InterruptChannel(const u16 _channelID, const void* _pData, u32 _Si
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default :
|
default :
|
||||||
PanicAlert("HidInput: HID_TYPE_DATA - param 0x%02x", hidp->type, hidp->param);
|
PanicAlert("HidInput: HID_TYPE_DATA - param 0x%02x", hidp->param);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -214,13 +214,13 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
|
||||||
const char *pFilename = m_pFileSystem->GetFileName(DVDAddress);
|
const char *pFilename = m_pFileSystem->GetFileName(DVDAddress);
|
||||||
if (pFilename != NULL)
|
if (pFilename != NULL)
|
||||||
{
|
{
|
||||||
INFO_LOG(WII_IPC_DVD, "DVDLowRead: %s (0x%x) - (DVDAddr: 0x%x, Size: 0x%x)",
|
INFO_LOG(WII_IPC_DVD, "DVDLowRead: %s (0x%llx) - (DVDAddr: 0x%llx, Size: 0x%x)",
|
||||||
pFilename, m_pFileSystem->GetFileSize(pFilename), DVDAddress, Size);
|
pFilename, m_pFileSystem->GetFileSize(pFilename), DVDAddress, Size);
|
||||||
FileMon::CheckFile(std::string(pFilename), (int)m_pFileSystem->GetFileSize(pFilename));
|
FileMon::CheckFile(std::string(pFilename), (int)m_pFileSystem->GetFileSize(pFilename));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
INFO_LOG(WII_IPC_DVD, "DVDLowRead: file unkw - (DVDAddr: 0x%x, Size: 0x%x)",
|
INFO_LOG(WII_IPC_DVD, "DVDLowRead: file unkw - (DVDAddr: 0x%llx, Size: 0x%x)",
|
||||||
DVDAddress, Size);
|
DVDAddress, Size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -315,9 +315,9 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 DVDAddress = (u64)(DVDAddress32 << 2);
|
u64 DVDAddress = (u64)DVDAddress32 << 2;
|
||||||
|
|
||||||
INFO_LOG(WII_IPC_DVD, "DVDLowUnencryptedRead: DVDAddr: 0x%08x, Size: 0x%x", DVDAddress, Size);
|
INFO_LOG(WII_IPC_DVD, "DVDLowUnencryptedRead: DVDAddr: 0x%08llx, Size: 0x%x", DVDAddress, Size);
|
||||||
|
|
||||||
if (Size > _BufferOutSize)
|
if (Size > _BufferOutSize)
|
||||||
{
|
{
|
||||||
|
@ -350,12 +350,12 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
|
||||||
const char *pFilename = m_pFileSystem->GetFileName(DVDAddress);
|
const char *pFilename = m_pFileSystem->GetFileName(DVDAddress);
|
||||||
if (pFilename != NULL)
|
if (pFilename != NULL)
|
||||||
{
|
{
|
||||||
INFO_LOG(WII_IPC_DVD, "DVDLowSeek: %s (0x%x) - (DVDAddr: 0x%x)",
|
INFO_LOG(WII_IPC_DVD, "DVDLowSeek: %s (0x%llx) - (DVDAddr: 0x%llx)",
|
||||||
pFilename, m_pFileSystem->GetFileSize(pFilename), DVDAddress);
|
pFilename, m_pFileSystem->GetFileSize(pFilename), DVDAddress);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
INFO_LOG(WII_IPC_DVD, "DVDLowSeek: file unkw - (DVDAddr: 0x%x)",
|
INFO_LOG(WII_IPC_DVD, "DVDLowSeek: file unkw - (DVDAddr: 0x%llx)",
|
||||||
DVDAddress);
|
DVDAddress);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -425,11 +425,11 @@ static int doPopup(lua_State* L, const char* deftype, const char* deficon)
|
||||||
const char* answer = "ok";
|
const char* answer = "ok";
|
||||||
|
|
||||||
if(itype == 1)
|
if(itype == 1)
|
||||||
answer = PanicYesNo(str) ? "yes" : "no";
|
answer = PanicYesNo("%s", str) ? "yes" : "no";
|
||||||
else if(iicon == 1)
|
else if(iicon == 1)
|
||||||
SuccessAlert(str);
|
SuccessAlert("%s", str);
|
||||||
else
|
else
|
||||||
PanicAlert(str);
|
PanicAlert("%s", str);
|
||||||
|
|
||||||
lua_pushstring(L, answer);
|
lua_pushstring(L, answer);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -211,7 +211,7 @@ void sigsegv_handler(int signal, siginfo_t *info, void *raw_context)
|
||||||
u64 bad_address = (u64)fault_memory_ptr;
|
u64 bad_address = (u64)fault_memory_ptr;
|
||||||
u64 memspace_bottom = (u64)Memory::base;
|
u64 memspace_bottom = (u64)Memory::base;
|
||||||
if (bad_address < memspace_bottom) {
|
if (bad_address < memspace_bottom) {
|
||||||
PanicAlert("Exception handler - access below memory space. %08x%08x",
|
PanicAlert("Exception handler - access below memory space. %08llx%08llx",
|
||||||
bad_address >> 32, bad_address);
|
bad_address >> 32, bad_address);
|
||||||
}
|
}
|
||||||
u32 em_address = (u32)(bad_address - memspace_bottom);
|
u32 em_address = (u32)(bad_address - memspace_bottom);
|
||||||
|
|
|
@ -88,7 +88,7 @@ void FPSCRtoFPUSettings(UReg_FPSCR fp)
|
||||||
FPU_ROUND_DOWN
|
FPU_ROUND_DOWN
|
||||||
};
|
};
|
||||||
unsigned short mode;
|
unsigned short mode;
|
||||||
asm ("fstcw %0" : : "m" (mode));
|
asm ("fstcw %0" : "=m" (mode) : );
|
||||||
mode = (mode & ~FPU_ROUND_MASK) | table[fp.RN];
|
mode = (mode & ~FPU_ROUND_MASK) | table[fp.RN];
|
||||||
asm ("fldcw %0" : : "m" (mode));
|
asm ("fldcw %0" : : "m" (mode));
|
||||||
#endif
|
#endif
|
||||||
|
@ -383,7 +383,7 @@ void Interpreter::mtspr(UGeckoInstruction _inst)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPR_WPAR:
|
case SPR_WPAR:
|
||||||
_assert_msg_(POWERPC, m_GPR[_inst.RD] == 0x0C008000, "Gather pipe @ %08x");
|
_assert_msg_(POWERPC, m_GPR[_inst.RD] == 0x0C008000, "Gather pipe @ %08x", PC);
|
||||||
GPFifo::ResetGatherPipe();
|
GPFifo::ResetGatherPipe();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ void RegCache::Lock(int p1, int p2, int p3, int p4)
|
||||||
void RegCache::LockX(int x1, int x2, int x3, int x4)
|
void RegCache::LockX(int x1, int x2, int x3, int x4)
|
||||||
{
|
{
|
||||||
if (xlocks[x1]) {
|
if (xlocks[x1]) {
|
||||||
PanicAlert("RegCache: x %i already locked!");
|
PanicAlert("RegCache: x %i already locked!", x1);
|
||||||
}
|
}
|
||||||
xlocks[x1] = true;
|
xlocks[x1] = true;
|
||||||
if (x2 != 0xFF) xlocks[x2] = true;
|
if (x2 != 0xFF) xlocks[x2] = true;
|
||||||
|
|
|
@ -1325,7 +1325,7 @@ void IRBuilder::WriteToFile(u64 codeHash) {
|
||||||
if (isImm(*inst)) {
|
if (isImm(*inst)) {
|
||||||
fprintf(file, " 0x%08x", GetImmValue(inst));
|
fprintf(file, " 0x%08x", GetImmValue(inst));
|
||||||
} else {
|
} else {
|
||||||
fprintf(file, " %10lu", i - (I - inst));
|
fprintf(file, " %10u", i - (I - inst));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1335,7 +1335,7 @@ void IRBuilder::WriteToFile(u64 codeHash) {
|
||||||
if (isImm(*inst)) {
|
if (isImm(*inst)) {
|
||||||
fprintf(file, " 0x%08x", GetImmValue(inst));
|
fprintf(file, " 0x%08x", GetImmValue(inst));
|
||||||
} else {
|
} else {
|
||||||
fprintf(file, " %10lu", i - (I - inst));
|
fprintf(file, " %10u", i - (I - inst));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,8 +51,8 @@ void BackPatchError(const std::string &text, u8 *codePtr, u32 emAddress) {
|
||||||
#endif
|
#endif
|
||||||
PanicAlert("%s\n\n"
|
PanicAlert("%s\n\n"
|
||||||
"Error encountered accessing emulated address %08x.\n"
|
"Error encountered accessing emulated address %08x.\n"
|
||||||
"Culprit instruction: \n%s\nat %08x%08x",
|
"Culprit instruction: \n%s\nat %#llx",
|
||||||
text.c_str(), emAddress, disbuf, code_addr>>32, code_addr);
|
text.c_str(), emAddress, disbuf, code_addr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -341,7 +341,7 @@ void LoadStateCallback(u64 userdata, int cyclesLate)
|
||||||
if (res != LZO_E_OK)
|
if (res != LZO_E_OK)
|
||||||
{
|
{
|
||||||
// This doesn't seem to happen anymore.
|
// This doesn't seem to happen anymore.
|
||||||
PanicAlert("Internal LZO Error - decompression failed (%d) (%d, %d) \n"
|
PanicAlert("Internal LZO Error - decompression failed (%d) (%li, %li) \n"
|
||||||
"Try loading the state again", res, i, new_len);
|
"Try loading the state again", res, i, new_len);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
delete[] buffer;
|
delete[] buffer;
|
||||||
|
@ -440,7 +440,7 @@ void VerifyStateCallback(u64 userdata, int cyclesLate)
|
||||||
if (res != LZO_E_OK)
|
if (res != LZO_E_OK)
|
||||||
{
|
{
|
||||||
// This doesn't seem to happen anymore.
|
// This doesn't seem to happen anymore.
|
||||||
PanicAlert("Internal LZO Error - decompression failed (%d) (%d, %d) \n"
|
PanicAlert("Internal LZO Error - decompression failed (%d) (%ld, %ld) \n"
|
||||||
"Try verifying the state again", res, i, new_len);
|
"Try verifying the state again", res, i, new_len);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
delete [] buffer;
|
delete [] buffer;
|
||||||
|
|
|
@ -221,7 +221,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
|
||||||
switch (event.GetId())
|
switch (event.GetId())
|
||||||
{
|
{
|
||||||
case IDM_CLEARSYMBOLS:
|
case IDM_CLEARSYMBOLS:
|
||||||
if(!AskYesNo("Do you want to clear the list of symbol names?", "Confirm", wxYES_NO)) return;
|
if(!AskYesNo("Do you want to clear the list of symbol names?")) return;
|
||||||
g_symbolDB.Clear();
|
g_symbolDB.Clear();
|
||||||
Host_NotifyMapLoaded();
|
Host_NotifyMapLoaded();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -145,7 +145,7 @@ void CompressedBlobReader::GetBlock(u64 block_num, u8 *out_ptr)
|
||||||
{
|
{
|
||||||
// this seem to fire wrongly from time to time
|
// this seem to fire wrongly from time to time
|
||||||
// to be sure, don't use compressed isos :P
|
// to be sure, don't use compressed isos :P
|
||||||
PanicAlert("Failure reading block %i - out of data and not at end.", block_num);
|
PanicAlert("Failure reading block %lli - out of data and not at end.", block_num);
|
||||||
}
|
}
|
||||||
inflateEnd(&z);
|
inflateEnd(&z);
|
||||||
if (uncomp_size != header.block_size)
|
if (uncomp_size != header.block_size)
|
||||||
|
|
|
@ -106,11 +106,11 @@ void CheckFile(std::string File, u64 Size)
|
||||||
std::string Str = StringFromFormat("%s kB %s", ThousandSeparate(Size, 7).c_str(), File.c_str());
|
std::string Str = StringFromFormat("%s kB %s", ThousandSeparate(Size, 7).c_str(), File.c_str());
|
||||||
if (ShowSound(File))
|
if (ShowSound(File))
|
||||||
{
|
{
|
||||||
NOTICE_LOG(FILEMON, Str.c_str());
|
NOTICE_LOG(FILEMON, "%s", Str.c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
WARN_LOG(FILEMON, Str.c_str());
|
WARN_LOG(FILEMON, "%s", Str.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the current file
|
// Update the current file
|
||||||
|
|
|
@ -82,7 +82,8 @@ u64 CFileSystemGCWii::ReadFile(const char* _rFullPath, u8* _pBuffer, size_t _Max
|
||||||
if (pFileInfo->m_FileSize > _MaxBufferSize)
|
if (pFileInfo->m_FileSize > _MaxBufferSize)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
DEBUG_LOG(DISCIO, "Filename: %s. Offset: %0x. Size: %0x",_rFullPath, pFileInfo->m_Offset, pFileInfo->m_FileSize);
|
DEBUG_LOG(DISCIO, "Filename: %s. Offset: %llx. Size: %llx",_rFullPath,
|
||||||
|
pFileInfo->m_Offset, pFileInfo->m_FileSize);
|
||||||
|
|
||||||
m_rVolume->Read(pFileInfo->m_Offset, pFileInfo->m_FileSize, _pBuffer);
|
m_rVolume->Read(pFileInfo->m_Offset, pFileInfo->m_FileSize, _pBuffer);
|
||||||
return pFileInfo->m_FileSize;
|
return pFileInfo->m_FileSize;
|
||||||
|
|
|
@ -209,7 +209,7 @@ void CWiiSaveCrypted::ReadBKHDR()
|
||||||
if (_sizeOfFiles + FULL_CERT_SZ != _totalSize)
|
if (_sizeOfFiles + FULL_CERT_SZ != _totalSize)
|
||||||
WARN_LOG(CONSOLE, "Size(%x) + cert(%x) does not equal totalsize(%x)", _sizeOfFiles, FULL_CERT_SZ, _totalSize);
|
WARN_LOG(CONSOLE, "Size(%x) + cert(%x) does not equal totalsize(%x)", _sizeOfFiles, FULL_CERT_SZ, _totalSize);
|
||||||
if (_saveGameTitle != Common::swap64(bkhdr.SaveGameTitle))
|
if (_saveGameTitle != Common::swap64(bkhdr.SaveGameTitle))
|
||||||
WARN_LOG(CONSOLE, "encrypted title (%x) does not match unencrypted title (%x)", _saveGameTitle, Common::swap64(bkhdr.SaveGameTitle));
|
WARN_LOG(CONSOLE, "encrypted title (%llx) does not match unencrypted title (%llx)", _saveGameTitle, Common::swap64(bkhdr.SaveGameTitle));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@ PC_TexFormat GetHiresTex(const char *fileName, unsigned int *pWidth, unsigned in
|
||||||
|
|
||||||
if (temp == NULL)
|
if (temp == NULL)
|
||||||
{
|
{
|
||||||
ERROR_LOG(VIDEO, "Custom texture %s failed to load", textureMap[key].c_str(), width, height);
|
ERROR_LOG(VIDEO, "Custom texture %s failed to load", textureMap[key].c_str());
|
||||||
SOIL_free_image_data(temp);
|
SOIL_free_image_data(temp);
|
||||||
return PC_TEX_FMT_NONE;
|
return PC_TEX_FMT_NONE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,9 +183,10 @@ void PixelShaderManager::SetConstants()
|
||||||
bpmem.indmtx[i].col2.mf * fscale,
|
bpmem.indmtx[i].col2.mf * fscale,
|
||||||
fscale * 4.0f);
|
fscale * 4.0f);
|
||||||
|
|
||||||
PRIM_LOG("indmtx%d: scale=%f, mat=(%f %f %f; %f %f %f)\n", i,
|
PRIM_LOG("indmtx%d: scale=%f, mat=(%f %f %f; %f %f %f)\n",
|
||||||
1024.0f*fscale, bpmem.indmtx[i].col0.ma * fscale, bpmem.indmtx[i].col1.mc * fscale, bpmem.indmtx[i].col2.me * fscale,
|
i, 1024.0f*fscale,
|
||||||
bpmem.indmtx[i].col0.mb * fscale, bpmem.indmtx[i].col1.md * fscale, bpmem.indmtx[i].col2.mf * fscale, fscale);
|
bpmem.indmtx[i].col0.ma * fscale, bpmem.indmtx[i].col1.mc * fscale, bpmem.indmtx[i].col2.me * fscale,
|
||||||
|
bpmem.indmtx[i].col0.mb * fscale, bpmem.indmtx[i].col1.md * fscale, bpmem.indmtx[i].col2.mf * fscale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
s_nIndTexMtxChanged = 0;
|
s_nIndTexMtxChanged = 0;
|
||||||
|
|
|
@ -343,7 +343,7 @@ bool CUCode_AX::AXTask(u32& _uMail)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x0003:
|
case 0x0003:
|
||||||
DEBUG_LOG(DSPHLE, "%08x : AXLIST command 0x0003 ????");
|
DEBUG_LOG(DSPHLE, "%08x : AXLIST command 0x0003 ????", uAddress);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x0004: // AUX?
|
case 0x0004: // AUX?
|
||||||
|
@ -377,7 +377,7 @@ bool CUCode_AX::AXTask(u32& _uMail)
|
||||||
case 0x0009:
|
case 0x0009:
|
||||||
Addr__9 = Memory_Read_U32(uAddress);
|
Addr__9 = Memory_Read_U32(uAddress);
|
||||||
uAddress += 4;
|
uAddress += 4;
|
||||||
DEBUG_LOG(DSPHLE, "%08x : AXLIST 6 address: %08x", Addr__9);
|
DEBUG_LOG(DSPHLE, "%08x : AXLIST 6 address: %08x", uAddress, Addr__9);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AXLIST_COMPRESSORTABLE: // 0xa
|
case AXLIST_COMPRESSORTABLE: // 0xa
|
||||||
|
@ -438,7 +438,7 @@ bool CUCode_AX::AXTask(u32& _uMail)
|
||||||
num += 2;
|
num += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
PanicAlert(szTemp);
|
PanicAlert("%s", szTemp);
|
||||||
// bFirst = false;
|
// bFirst = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ void CUCode_CARD::HandleMail(u32 _uMail)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DEBUG_LOG(DSPHLE, "CUCode_CARD - unknown cmd: %x (size %i)", _uMail);
|
DEBUG_LOG(DSPHLE, "CUCode_CARD - unknown cmd: %x", _uMail);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_rMailHandler.PushMail(DSP_DONE);
|
m_rMailHandler.PushMail(DSP_DONE);
|
||||||
|
|
|
@ -515,8 +515,8 @@ void OpenGL_ReportARBProgramError()
|
||||||
GLint loc = 0;
|
GLint loc = 0;
|
||||||
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &loc);
|
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &loc);
|
||||||
ERROR_LOG(VIDEO, "program error at %d: ", loc);
|
ERROR_LOG(VIDEO, "program error at %d: ", loc);
|
||||||
ERROR_LOG(VIDEO, (char*)pstr);
|
ERROR_LOG(VIDEO, "%s", (char*)pstr);
|
||||||
ERROR_LOG(VIDEO, "");
|
ERROR_LOG(VIDEO, "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -261,7 +261,7 @@ bool PixelShaderCache::CompilePixelShader(FRAGMENTSHADER& ps, const char* pstrpr
|
||||||
if (!cgIsProgram(tempprog)) {
|
if (!cgIsProgram(tempprog)) {
|
||||||
cgDestroyProgram(tempprog);
|
cgDestroyProgram(tempprog);
|
||||||
ERROR_LOG(VIDEO, "Failed to compile ps %s:", cgGetLastListing(g_cgcontext));
|
ERROR_LOG(VIDEO, "Failed to compile ps %s:", cgGetLastListing(g_cgcontext));
|
||||||
ERROR_LOG(VIDEO, pstrprogram);
|
ERROR_LOG(VIDEO, "%s", pstrprogram);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ bool PixelShaderCache::CompilePixelShader(FRAGMENTSHADER& ps, const char* pstrpr
|
||||||
if (cgGetError() != CG_NO_ERROR)
|
if (cgGetError() != CG_NO_ERROR)
|
||||||
{
|
{
|
||||||
WARN_LOG(VIDEO, "Warnings on compile ps %s:", cgGetLastListing(g_cgcontext));
|
WARN_LOG(VIDEO, "Warnings on compile ps %s:", cgGetLastListing(g_cgcontext));
|
||||||
WARN_LOG(VIDEO, pstrprogram);
|
WARN_LOG(VIDEO, "%s", pstrprogram);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This looks evil - we modify the program through the const char * we got from cgGetProgramString!
|
// This looks evil - we modify the program through the const char * we got from cgGetProgramString!
|
||||||
|
@ -304,8 +304,8 @@ bool PixelShaderCache::CompilePixelShader(FRAGMENTSHADER& ps, const char* pstrpr
|
||||||
ERROR_LOG(VIDEO, "Hit limit? %i", native_limit);
|
ERROR_LOG(VIDEO, "Hit limit? %i", native_limit);
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
ERROR_LOG(VIDEO, pstrprogram);
|
ERROR_LOG(VIDEO, "%s", pstrprogram);
|
||||||
ERROR_LOG(VIDEO, pcompiledprog);
|
ERROR_LOG(VIDEO, "%s", pcompiledprog);
|
||||||
}
|
}
|
||||||
|
|
||||||
cgDestroyProgram(tempprog);
|
cgDestroyProgram(tempprog);
|
||||||
|
|
|
@ -247,8 +247,8 @@ Renderer::Renderer()
|
||||||
}
|
}
|
||||||
|
|
||||||
INFO_LOG(VIDEO, "Supported OpenGL Extensions:");
|
INFO_LOG(VIDEO, "Supported OpenGL Extensions:");
|
||||||
INFO_LOG(VIDEO, ptoken); // write to the log file
|
INFO_LOG(VIDEO, "%s", ptoken); // write to the log file
|
||||||
INFO_LOG(VIDEO, "");
|
INFO_LOG(VIDEO, "\n");
|
||||||
|
|
||||||
OSD::AddMessage(StringFromFormat("Video Info: %s, %s, %s",
|
OSD::AddMessage(StringFromFormat("Video Info: %s, %s, %s",
|
||||||
glGetString(GL_VENDOR),
|
glGetString(GL_VENDOR),
|
||||||
|
|
|
@ -169,14 +169,14 @@ bool VertexShaderCache::CompileVertexShader(VERTEXSHADER& vs, const char* pstrpr
|
||||||
}
|
}
|
||||||
cgDestroyProgram(tempprog);
|
cgDestroyProgram(tempprog);
|
||||||
ERROR_LOG(VIDEO, "Failed to load vs %s:", cgGetLastListing(g_cgcontext));
|
ERROR_LOG(VIDEO, "Failed to load vs %s:", cgGetLastListing(g_cgcontext));
|
||||||
ERROR_LOG(VIDEO, pstrprogram);
|
ERROR_LOG(VIDEO, "%s", pstrprogram);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cgGetError() != CG_NO_ERROR)
|
if (cgGetError() != CG_NO_ERROR)
|
||||||
{
|
{
|
||||||
WARN_LOG(VIDEO, "Failed to load vs %s:", cgGetLastListing(g_cgcontext));
|
WARN_LOG(VIDEO, "Failed to load vs %s:", cgGetLastListing(g_cgcontext));
|
||||||
WARN_LOG(VIDEO, pstrprogram);
|
WARN_LOG(VIDEO, "%s", pstrprogram);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This looks evil - we modify the program through the const char * we got from cgGetProgramString!
|
// This looks evil - we modify the program through the const char * we got from cgGetProgramString!
|
||||||
|
@ -194,8 +194,8 @@ bool VertexShaderCache::CompileVertexShader(VERTEXSHADER& vs, const char* pstrpr
|
||||||
glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, (GLsizei)strlen(pcompiledprog), pcompiledprog);
|
glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, (GLsizei)strlen(pcompiledprog), pcompiledprog);
|
||||||
err = GL_REPORT_ERROR();
|
err = GL_REPORT_ERROR();
|
||||||
if (err != GL_NO_ERROR) {
|
if (err != GL_NO_ERROR) {
|
||||||
ERROR_LOG(VIDEO, pstrprogram);
|
ERROR_LOG(VIDEO, "%s", pstrprogram);
|
||||||
ERROR_LOG(VIDEO, pcompiledprog);
|
ERROR_LOG(VIDEO, "%s", pcompiledprog);
|
||||||
}
|
}
|
||||||
|
|
||||||
cgDestroyProgram(tempprog);
|
cgDestroyProgram(tempprog);
|
||||||
|
|
|
@ -439,8 +439,8 @@ void OpenGL_ReportARBProgramError()
|
||||||
GLint loc = 0;
|
GLint loc = 0;
|
||||||
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &loc);
|
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &loc);
|
||||||
ERROR_LOG(VIDEO, "program error at %d: ", loc);
|
ERROR_LOG(VIDEO, "program error at %d: ", loc);
|
||||||
ERROR_LOG(VIDEO, (char*)pstr);
|
ERROR_LOG(VIDEO, "%s", (char*)pstr);
|
||||||
ERROR_LOG(VIDEO, "");
|
ERROR_LOG(VIDEO, "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue