Fix some minor warnings.
This commit is contained in:
parent
bbf714c361
commit
c3839a53e5
8 changed files with 28 additions and 24 deletions
|
@ -230,8 +230,8 @@ void UpdateConfirmCancelKeys() {
|
||||||
};
|
};
|
||||||
|
|
||||||
// If they're not already bound, add them in.
|
// If they're not already bound, add them in.
|
||||||
for(int i = 0; i < ARRAY_SIZE(hardcodedConfirmKeys); i++) {
|
for (size_t i = 0; i < ARRAY_SIZE(hardcodedConfirmKeys); i++) {
|
||||||
if(std::find(confirmKeys.begin(), confirmKeys.end(), hardcodedConfirmKeys[i]) == confirmKeys.end())
|
if (std::find(confirmKeys.begin(), confirmKeys.end(), hardcodedConfirmKeys[i]) == confirmKeys.end())
|
||||||
confirmKeys.push_back(hardcodedConfirmKeys[i]);
|
confirmKeys.push_back(hardcodedConfirmKeys[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,8 +240,8 @@ void UpdateConfirmCancelKeys() {
|
||||||
NKCODE_BACK,
|
NKCODE_BACK,
|
||||||
};
|
};
|
||||||
|
|
||||||
for(int i = 0; i < ARRAY_SIZE(hardcodedCancelKeys); i++) {
|
for (size_t i = 0; i < ARRAY_SIZE(hardcodedCancelKeys); i++) {
|
||||||
if(std::find(cancelKeys.begin(), cancelKeys.end(), hardcodedCancelKeys[i]) == cancelKeys.end())
|
if (std::find(cancelKeys.begin(), cancelKeys.end(), hardcodedCancelKeys[i]) == cancelKeys.end())
|
||||||
cancelKeys.push_back(hardcodedCancelKeys[i]);
|
cancelKeys.push_back(hardcodedCancelKeys[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -700,7 +700,7 @@ void LoadFromIni(IniFile &file) {
|
||||||
}
|
}
|
||||||
|
|
||||||
IniFile::Section *controls = file.GetOrCreateSection("ControlMapping");
|
IniFile::Section *controls = file.GetOrCreateSection("ControlMapping");
|
||||||
for (int i = 0; i < ARRAY_SIZE(psp_button_names); i++) {
|
for (size_t i = 0; i < ARRAY_SIZE(psp_button_names); i++) {
|
||||||
std::string value;
|
std::string value;
|
||||||
controls->Get(psp_button_names[i].name.c_str(), &value, "");
|
controls->Get(psp_button_names[i].name.c_str(), &value, "");
|
||||||
|
|
||||||
|
@ -728,7 +728,7 @@ void LoadFromIni(IniFile &file) {
|
||||||
void SaveToIni(IniFile &file) {
|
void SaveToIni(IniFile &file) {
|
||||||
IniFile::Section *controls = file.GetOrCreateSection("ControlMapping");
|
IniFile::Section *controls = file.GetOrCreateSection("ControlMapping");
|
||||||
|
|
||||||
for (int i = 0; i < ARRAY_SIZE(psp_button_names); i++) {
|
for (size_t i = 0; i < ARRAY_SIZE(psp_button_names); i++) {
|
||||||
std::vector<KeyDef> keys;
|
std::vector<KeyDef> keys;
|
||||||
KeyFromPspButton(psp_button_names[i].key, &keys);
|
KeyFromPspButton(psp_button_names[i].key, &keys);
|
||||||
|
|
||||||
|
|
|
@ -278,13 +278,12 @@ void Config::Save() {
|
||||||
IniFile::Section *recent = iniFile.GetOrCreateSection("Recent");
|
IniFile::Section *recent = iniFile.GetOrCreateSection("Recent");
|
||||||
recent->Set("MaxRecent", iMaxRecent);
|
recent->Set("MaxRecent", iMaxRecent);
|
||||||
|
|
||||||
for (int i = 0; i < iMaxRecent; i++) {
|
for (int i = 0; i < iMaxRecent; i++) {
|
||||||
char keyName[64];
|
char keyName[64];
|
||||||
sprintf(keyName,"FileName%d",i);
|
sprintf(keyName,"FileName%d",i);
|
||||||
if (i < recentIsos.size()) {
|
if (i < (int)recentIsos.size()) {
|
||||||
recent->Set(keyName, recentIsos[i]);
|
recent->Set(keyName, recentIsos[i]);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
recent->Delete(keyName); // delete the nonexisting FileName
|
recent->Delete(keyName); // delete the nonexisting FileName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ struct WaitVBlankInfo
|
||||||
{
|
{
|
||||||
WaitVBlankInfo(u32 tid) : threadID(tid), vcountUnblock(1) {}
|
WaitVBlankInfo(u32 tid) : threadID(tid), vcountUnblock(1) {}
|
||||||
WaitVBlankInfo(u32 tid, int vcount) : threadID(tid), vcountUnblock(vcount) {}
|
WaitVBlankInfo(u32 tid, int vcount) : threadID(tid), vcountUnblock(vcount) {}
|
||||||
u32 threadID;
|
SceUID threadID;
|
||||||
// Number of vcounts to block for.
|
// Number of vcounts to block for.
|
||||||
int vcountUnblock;
|
int vcountUnblock;
|
||||||
|
|
||||||
|
|
|
@ -194,7 +194,7 @@ int sceNetAdhocSetSocketAlert(int id, int flag) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int sceNetAdhocPollSocket(u32 socketStructAddr, int count, int timeout, int nonblock) {
|
int sceNetAdhocPollSocket(u32 socketStructAddr, int count, int timeout, int nonblock) {
|
||||||
ERROR_LOG(SCENET, "UNIMPL sceNetAdhocPollSocket(%08x, %i, %i, %i)", count, timeout, nonblock);
|
ERROR_LOG(SCENET, "UNIMPL sceNetAdhocPollSocket(%08x, %i, %i, %i)", socketStructAddr, count, timeout, nonblock);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -345,7 +345,7 @@ int sceNetAdhocGetPtpStat(int structSize, u32 structAddr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int sceNetAdhocPtpOpen(const char *srcmac, int srcport, const char *dstmac, int dstport, int bufsize, int retryDelay, int retryCount, int unknown) {
|
int sceNetAdhocPtpOpen(const char *srcmac, int srcport, const char *dstmac, int dstport, int bufsize, int retryDelay, int retryCount, int unknown) {
|
||||||
ERROR_LOG(SCENET, "UNIMPL sceNetAdhocPtpOpen(%s : %i, %s : %i, %i, %i, %i)", srcmac, srcport, dstmac, dstport, bufsize, retryDelay, retryCount, unknown);
|
ERROR_LOG(SCENET, "UNIMPL sceNetAdhocPtpOpen(%s : %i, %s : %i, %i, %i, %i, %08x)", srcmac, srcport, dstmac, dstport, bufsize, retryDelay, retryCount, unknown);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -444,7 +444,7 @@ int sceNetAdhocMatchingCreate(int mode, int maxPeers, int port, int bufSize, int
|
||||||
}
|
}
|
||||||
|
|
||||||
int sceNetAdhocMatchingStart(int matchingId, int evthPri, int evthStack, int inthPri, int inthStack, int optLen, u32 optDataAddr) {
|
int sceNetAdhocMatchingStart(int matchingId, int evthPri, int evthStack, int inthPri, int inthStack, int optLen, u32 optDataAddr) {
|
||||||
ERROR_LOG(SCENET, "UNIMPL sceNetAdhocMatchingStart(%i, %i, %i, %i, %i, %i, %i, %i, %08x)", matchingId, evthPri, evthStack, inthPri, inthStack, optLen, optDataAddr);
|
ERROR_LOG(SCENET, "UNIMPL sceNetAdhocMatchingStart(%i, %i, %i, %i, %i, %i, %08x)", matchingId, evthPri, evthStack, inthPri, inthStack, optLen, optDataAddr);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -156,7 +156,7 @@ void Jit::BranchRSRTComp(MIPSOpcode op, Gen::CCFlags cc, bool likely)
|
||||||
{
|
{
|
||||||
case CC_E: skipBranch = rsImm == rtImm; break;
|
case CC_E: skipBranch = rsImm == rtImm; break;
|
||||||
case CC_NE: skipBranch = rsImm != rtImm; break;
|
case CC_NE: skipBranch = rsImm != rtImm; break;
|
||||||
default: _dbg_assert_msg_(JIT, false, "Bad cc flag in BranchRSRTComp().");
|
default: skipBranch = false; _dbg_assert_msg_(JIT, false, "Bad cc flag in BranchRSRTComp().");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skipBranch)
|
if (skipBranch)
|
||||||
|
@ -256,7 +256,7 @@ void Jit::BranchRSZeroComp(MIPSOpcode op, Gen::CCFlags cc, bool andLink, bool li
|
||||||
case CC_GE: skipBranch = imm >= 0; break;
|
case CC_GE: skipBranch = imm >= 0; break;
|
||||||
case CC_L: skipBranch = imm < 0; break;
|
case CC_L: skipBranch = imm < 0; break;
|
||||||
case CC_LE: skipBranch = imm <= 0; break;
|
case CC_LE: skipBranch = imm <= 0; break;
|
||||||
default: _dbg_assert_msg_(JIT, false, "Bad cc flag in BranchRSZeroComp().");
|
default: skipBranch = false; _dbg_assert_msg_(JIT, false, "Bad cc flag in BranchRSZeroComp().");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skipBranch)
|
if (skipBranch)
|
||||||
|
|
|
@ -839,13 +839,8 @@ void TransformDrawEngine::SubmitPrim(void *verts, void *inds, GEPrimitiveType pr
|
||||||
if (!indexGen.PrimCompatible(prevPrim_, prim) || numDrawCalls >= MAX_DEFERRED_DRAW_CALLS)
|
if (!indexGen.PrimCompatible(prevPrim_, prim) || numDrawCalls >= MAX_DEFERRED_DRAW_CALLS)
|
||||||
Flush();
|
Flush();
|
||||||
|
|
||||||
|
// TODO: Is this the right thing to do?
|
||||||
if (prim == GE_PRIM_KEEP_PREVIOUS) {
|
if (prim == GE_PRIM_KEEP_PREVIOUS) {
|
||||||
switch(prevPrim_) {
|
|
||||||
case GE_PRIM_LINE_STRIP:
|
|
||||||
case GE_PRIM_TRIANGLE_STRIP:
|
|
||||||
case GE_PRIM_TRIANGLE_FAN:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
prim = prevPrim_;
|
prim = prevPrim_;
|
||||||
}
|
}
|
||||||
prevPrim_ = prim;
|
prevPrim_ = prim;
|
||||||
|
|
|
@ -39,10 +39,10 @@ void Process(VertexData& vertex)
|
||||||
Vec3<float> L = Vec3<float>(getFloat24(gstate.lpos[3*light]&0xFFFFFF), getFloat24(gstate.lpos[3*light+1]&0xFFFFFF),getFloat24(gstate.lpos[3*light+2]&0xFFFFFF));
|
Vec3<float> L = Vec3<float>(getFloat24(gstate.lpos[3*light]&0xFFFFFF), getFloat24(gstate.lpos[3*light+1]&0xFFFFFF),getFloat24(gstate.lpos[3*light+2]&0xFFFFFF));
|
||||||
float diffuse_factor = Dot(L,vertex.worldnormal) / L.Length() / vertex.worldnormal.Length();
|
float diffuse_factor = Dot(L,vertex.worldnormal) / L.Length() / vertex.worldnormal.Length();
|
||||||
|
|
||||||
if (gstate.getUVLS0() == light)
|
if (gstate.getUVLS0() == (int)light)
|
||||||
vertex.texturecoords.s() = (diffuse_factor + 1.f) / 2.f;
|
vertex.texturecoords.s() = (diffuse_factor + 1.f) / 2.f;
|
||||||
|
|
||||||
if (gstate.getUVLS1() == light)
|
if (gstate.getUVLS1() == (int)light)
|
||||||
vertex.texturecoords.t() = (diffuse_factor + 1.f) / 2.f;
|
vertex.texturecoords.t() = (diffuse_factor + 1.f) / 2.f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -237,6 +237,9 @@ static inline u32 GetPixelColor(int x, int y)
|
||||||
|
|
||||||
case GE_FORMAT_8888:
|
case GE_FORMAT_8888:
|
||||||
return *(u32*)&fb[4*x + 4*y*gstate.FrameBufStride()];
|
return *(u32*)&fb[4*x + 4*y*gstate.FrameBufStride()];
|
||||||
|
|
||||||
|
case GE_FORMAT_INVALID:
|
||||||
|
_dbg_assert_msg_(G3D, false, "Software: invalid framebuf format.");
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -259,6 +262,9 @@ static inline void SetPixelColor(int x, int y, u32 value)
|
||||||
case GE_FORMAT_8888:
|
case GE_FORMAT_8888:
|
||||||
*(u32*)&fb[4*x + 4*y*gstate.FrameBufStride()] = value;
|
*(u32*)&fb[4*x + 4*y*gstate.FrameBufStride()] = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case GE_FORMAT_INVALID:
|
||||||
|
_dbg_assert_msg_(G3D, false, "Software: invalid framebuf format.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -481,6 +487,10 @@ static inline bool ColorTestPassed(Vec3<int> color)
|
||||||
|
|
||||||
case GE_COMP_NOTEQUAL:
|
case GE_COMP_NOTEQUAL:
|
||||||
return c != ref;
|
return c != ref;
|
||||||
|
|
||||||
|
default:
|
||||||
|
ERROR_LOG_REPORT(G3D, "Software: Invalid colortest function: %d", gstate.getColorTestFunction());
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue