mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-19 16:31:20 +00:00
Assorted warning fixes
This commit is contained in:
parent
7b3f84aae8
commit
d64f367e1d
@ -91,7 +91,7 @@ size_t CachingFileLoader::ReadAt(s64 absolutePos, size_t bytes, void *data, Flag
|
||||
if (absolutePos >= filesize_) {
|
||||
bytes = 0;
|
||||
} else if (absolutePos + (s64)bytes >= filesize_) {
|
||||
bytes = filesize_ - absolutePos;
|
||||
bytes = (size_t)(filesize_ - absolutePos);
|
||||
}
|
||||
|
||||
size_t readSize = 0;
|
||||
|
@ -155,7 +155,7 @@ size_t RamCachingFileLoader::ReadFromCache(s64 pos, size_t bytes, void *data) {
|
||||
if (pos >= filesize_) {
|
||||
return 0;
|
||||
}
|
||||
bytes = filesize_ - pos;
|
||||
bytes = (size_t)(filesize_ - pos);
|
||||
}
|
||||
|
||||
std::lock_guard<std::mutex> guard(blocksMutex_);
|
||||
|
@ -652,7 +652,7 @@ std::vector<PSPFileInfo> ISOFileSystem::GetDirListing(std::string path) {
|
||||
x.isOnSectorSystem = true;
|
||||
x.startSector = e->startingPosition/2048;
|
||||
x.sectorSize = sectorSize;
|
||||
x.numSectors = (e->size + sectorSize - 1) / sectorSize;
|
||||
x.numSectors = (u32)((e->size + sectorSize - 1) / sectorSize);
|
||||
memset(&x.atime, 0, sizeof(x.atime));
|
||||
memset(&x.mtime, 0, sizeof(x.mtime));
|
||||
memset(&x.ctime, 0, sizeof(x.ctime));
|
||||
|
@ -152,7 +152,7 @@ unsigned int StereoResampler::Mix(short* samples, unsigned int numSamples, bool
|
||||
samples[currentSample + 1] = r1;
|
||||
indexR += 2;
|
||||
}
|
||||
sample_rate_ = sample_rate;
|
||||
sample_rate_ = (float)sample_rate;
|
||||
} else {
|
||||
// Drift prevention mechanism
|
||||
float numLeft = (float)(((indexW - indexR) & INDEX_MASK) / 2);
|
||||
@ -161,7 +161,7 @@ unsigned int StereoResampler::Mix(short* samples, unsigned int numSamples, bool
|
||||
if (offset > MAX_FREQ_SHIFT) offset = MAX_FREQ_SHIFT;
|
||||
if (offset < -MAX_FREQ_SHIFT) offset = -MAX_FREQ_SHIFT;
|
||||
|
||||
sample_rate_ = m_input_sample_rate + offset;
|
||||
sample_rate_ = (float)(m_input_sample_rate + offset);
|
||||
const u32 ratio = (u32)(65536.0 * sample_rate_ / (double)sample_rate);
|
||||
|
||||
// TODO: consider a higher-quality resampling algorithm.
|
||||
@ -248,7 +248,7 @@ void StereoResampler::GetAudioDebugStats(AudioDebugStats *stats) {
|
||||
overrunCount_ = 0;
|
||||
stats->watermark = m_lowwatermark;
|
||||
stats->bufsize = m_bufsize * 2;
|
||||
stats->instantSampleRate = sample_rate_;
|
||||
stats->instantSampleRate = (int)sample_rate_;
|
||||
stats->lastPushSize = lastPushSize_;
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@ namespace MIPSComp
|
||||
} else {
|
||||
fpr.MapRegV(vregs[i], MAP_DIRTY | MAP_NOINIT);
|
||||
fpr.SpillLockV(vregs[i]);
|
||||
MOVI2F(fpr.V(vregs[i]), constantArray[regnum + (abs<<2)], SCRATCHREG1, (bool)negate);
|
||||
MOVI2F(fpr.V(vregs[i]), constantArray[regnum + (abs<<2)], SCRATCHREG1, negate != 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -653,7 +653,7 @@ namespace MIPSComp
|
||||
VectorSize sz = GetVecSize(op);
|
||||
|
||||
// TODO: Force read one of them into regs? probably not.
|
||||
u8 sregs[4], tregs[4], dregs[1];
|
||||
u8 sregs[4], dregs[1];
|
||||
GetVectorRegsPrefixS(sregs, sz, vs);
|
||||
GetVectorRegsPrefixD(dregs, V_Single, vd);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user