diff --git a/Core/Dialog/SavedataParam.cpp b/Core/Dialog/SavedataParam.cpp index e510f28026..078fc7d0c3 100644 --- a/Core/Dialog/SavedataParam.cpp +++ b/Core/Dialog/SavedataParam.cpp @@ -413,7 +413,7 @@ u32 SavedataParam::SetPspParam(SceUtilitySavedataParam *param) memcpy(saveDataList[realCount].saveDetail,savedetail.c_str(),savedetail.size()); saveDataList[realCount].saveDetail[savedetail.size()] = 0; } - delete sfoParam; + delete [] sfoParam; } DEBUG_LOG(HLE,"%s Exist",fileDataPath.c_str()); @@ -504,7 +504,7 @@ u32 SavedataParam::SetPspParam(SceUtilitySavedataParam *param) memcpy(saveDataList[0].saveDetail,savedetail.c_str(),savedetail.size()); saveDataList[0].saveDetail[savedetail.size()] = 0; } - delete sfoParam; + delete [] sfoParam; } DEBUG_LOG(HLE,"%s Exist",fileDataPath.c_str()); diff --git a/Core/HLE/sceFont.cpp b/Core/HLE/sceFont.cpp index 664a6699d5..d2caefb3ad 100644 --- a/Core/HLE/sceFont.cpp +++ b/Core/HLE/sceFont.cpp @@ -235,32 +235,32 @@ int sceFontGetFontInfo(u32 fontHandle, u32 fontInfoPtr) memset (&fi, 0, sizeof(fi)); if (Memory::IsValidAddress(fontInfoPtr)) { - fi.BPP =4; + fi.BPP = 4; fi.charMapLength = 255; // fi.fontStyle =1; fi.maxGlyphAdvanceXF = 2.0; - fi.maxGlyphAdvanceXI =2; + fi.maxGlyphAdvanceXI = 2; fi.maxGlyphAdvanceYF = 2.0; fi.maxGlyphAdvanceYI = 32 << 6; - fi.maxGlyphAscenderF =32 << 6; + fi.maxGlyphAscenderF = 32 << 6; fi.maxGlyphAscenderI = 32 << 6; - fi.maxGlyphBaseYF= 0.0; - fi.maxGlyphBaseYI=0.0; - fi.maxGlyphDescenderF =0; - fi.maxGlyphDescenderI =0; + fi.maxGlyphBaseYF = 0.0; + fi.maxGlyphBaseYI = 0; + fi.maxGlyphDescenderF = 0; + fi.maxGlyphDescenderI = 0; fi.maxGlyphHeight = 32; - fi.maxGlyphHeightF= 32; + fi.maxGlyphHeightF = 32; fi.maxGlyphHeightI = 32; - fi.maxGlyphLeftXF= 0; + fi.maxGlyphLeftXF = 0; fi.maxGlyphLeftXI = 0; - fi.maxGlyphTopYF =0; + fi.maxGlyphTopYF = 0; fi.maxGlyphTopYI = 0; - fi.maxGlyphWidth =32; + fi.maxGlyphWidth = 32; fi.maxGlyphWidthF = 32; - fi.maxGlyphWidthI= 32; + fi.maxGlyphWidthI = 32; fi.minGlyphCenterXF = 16; - fi.minGlyphCenterXI= 16; - fi.shadowMapLength=0; + fi.minGlyphCenterXI = 16; + fi.shadowMapLength = 0; Memory::WriteStruct(fontInfoPtr, &fi); } diff --git a/Core/HLE/sceKernelMsgPipe.cpp b/Core/HLE/sceKernelMsgPipe.cpp index ca8fa76a73..1521d5f188 100644 --- a/Core/HLE/sceKernelMsgPipe.cpp +++ b/Core/HLE/sceKernelMsgPipe.cpp @@ -98,7 +98,7 @@ struct MsgPipe : public KernelObject if (sendWaitingThreads.empty()) return; MsgPipeWaitingThread *thread = &sendWaitingThreads.front(); - if (nmp.freeSize >= thread->bufSize) + if ((u32) nmp.freeSize >= thread->bufSize) { // Put all the data to the buffer memcpy(buffer + (nmp.bufSize - nmp.freeSize), Memory::GetPointer(thread->bufAddr), thread->bufSize); @@ -126,7 +126,7 @@ struct MsgPipe : public KernelObject if (receiveWaitingThreads.empty()) return; MsgPipeWaitingThread *thread = &receiveWaitingThreads.front(); - if (nmp.bufSize - nmp.freeSize >= thread->bufSize) + if ((u32) nmp.bufSize - (u32) nmp.freeSize >= thread->bufSize) { // Get the needed data from the buffer Memory::Memcpy(thread->bufAddr, buffer, thread->bufSize); @@ -271,7 +271,7 @@ void __KernelSendMsgPipe(MsgPipe *m, u32 sendBufAddr, u32 sendSize, int waitMode } else { - if (sendSize <= m->nmp.freeSize) + if (sendSize <= (u32) m->nmp.freeSize) { memcpy(m->buffer + (m->nmp.bufSize - m->nmp.freeSize), Memory::GetPointer(sendBufAddr), sendSize); m->nmp.freeSize -= sendSize; @@ -445,7 +445,7 @@ void __KernelReceiveMsgPipe(MsgPipe *m, u32 receiveBufAddr, u32 receiveSize, int else { // Enough data in the buffer: copy just the needed amount of data - if (receiveSize <= m->nmp.bufSize - m->nmp.freeSize) + if (receiveSize <= (u32) m->nmp.bufSize - (u32) m->nmp.freeSize) { Memory::Memcpy(receiveBufAddr, m->buffer, receiveSize); m->nmp.freeSize += receiveSize; diff --git a/Core/HLE/sceRtc.cpp b/Core/HLE/sceRtc.cpp index 40df086d01..33f28ecb58 100644 --- a/Core/HLE/sceRtc.cpp +++ b/Core/HLE/sceRtc.cpp @@ -459,7 +459,7 @@ int sceRtcGetTime_t(u32 datePtr, u32 timePtr) ScePspDateTime pt; Memory::ReadStruct(datePtr, &pt); pt.year-=1969; - u64 result = __RtcPspTimeToTicks(pt)/1000000ULL; + u32 result = (u32) (__RtcPspTimeToTicks(pt)/1000000ULL); Memory::Write_U32(result, timePtr); } else diff --git a/Core/HW/SasAudio.cpp b/Core/HW/SasAudio.cpp index b4ad23d2ef..d8025e7196 100644 --- a/Core/HW/SasAudio.cpp +++ b/Core/HW/SasAudio.cpp @@ -215,7 +215,7 @@ void SasInstance::Mix(u32 outAddr) { // Figure out number of samples to read. int curSample = voice.samplePos / PSP_SAS_PITCH_BASE; int lastSample = (voice.samplePos + grainSize * voice.pitch) / PSP_SAS_PITCH_BASE; - u32 numSamples = lastSample - curSample; + int numSamples = lastSample - curSample; if (numSamples > grainSize * 4) { ERROR_LOG(SAS, "numSamples too large, clamping: %i vs %i", numSamples, grainSize * 4); numSamples = grainSize * 4; diff --git a/Core/MIPS/MIPSIntVFPU.cpp b/Core/MIPS/MIPSIntVFPU.cpp index a3e3b2d902..f24dd2cc4e 100644 --- a/Core/MIPS/MIPSIntVFPU.cpp +++ b/Core/MIPS/MIPSIntVFPU.cpp @@ -1496,7 +1496,7 @@ namespace MIPSInt int n = GetNumVectorElements(sz); for (int i = 0; i < n ; i++) { float a = s[i] - t[i]; - d[i] = (0.0 < a) - (a < 0.0); + d[i] = (float) ((0.0 < a) - (a < 0.0)); } ApplyPrefixD(d, sz); WriteVector(d, sz, vd); diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index ec3868b027..90152ccf2b 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -114,13 +114,13 @@ namespace MainWindow void SetZoom(float zoom) { if (zoom < 5) - g_Config.iWindowZoom = zoom; + g_Config.iWindowZoom = (int) zoom; RECT rc, rcOuter; - GetWindowRectAtZoom(zoom, rc, rcOuter); + GetWindowRectAtZoom((int) zoom, rc, rcOuter); MoveWindow(hwndMain, rcOuter.left, rcOuter.top, rcOuter.right - rcOuter.left, rcOuter.bottom - rcOuter.top, TRUE); MoveWindow(hwndDisplay, 0, 0, rc.right - rc.left, rc.bottom - rc.top, TRUE); - PSP_CoreParameter().pixelWidth = 480 * zoom; - PSP_CoreParameter().pixelHeight = 272 * zoom; + PSP_CoreParameter().pixelWidth = (int) (480 * zoom); + PSP_CoreParameter().pixelHeight = (int) (272 * zoom); GL_Resized(); }