mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix some type-conversion warnings.
This commit is contained in:
parent
8964ebcfd9
commit
217bdc275e
7 changed files with 27 additions and 27 deletions
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue