diff --git a/Common/KeyMap.cpp b/Common/KeyMap.cpp index b3b8f8fcf8..758b135fed 100644 --- a/Common/KeyMap.cpp +++ b/Common/KeyMap.cpp @@ -319,6 +319,7 @@ static int KeyMap::SetKeyMapping(KeyMap::Key key, int btn) return KEYMAP_ERROR_KEY_ALREADY_USED; g_Config.iMappingMap[key] = btn; + return btn; } static int KeyMap::RegisterPlatformDefaultKeyMap(std::map *overriding_map) diff --git a/Core/HLE/sceAtrac.cpp b/Core/HLE/sceAtrac.cpp index d6dd79c9e2..80292d3a2e 100644 --- a/Core/HLE/sceAtrac.cpp +++ b/Core/HLE/sceAtrac.cpp @@ -545,7 +545,7 @@ u32 sceAtracDecodeData(int atracID, u32 outAddr, u32 numSamplesAddr, u32 finishF inbytes = std::min(inbytes, (int)atrac->atracBytesPerFrame); if (inbytes > 0) { Atrac3plus_Decoder::atrac3plus_decode(atrac->decoder_context, atrac->data_buf + atrac->decodePos, inbytes, &decodebytes, buf); - INFO_LOG(HLE, "decodebytes: %i outbuf: %08x", decodebytes, buf); + INFO_LOG(HLE, "decodebytes: %i outbuf: %08p", decodebytes, buf); atrac->sampleQueue.push(buf, decodebytes); } } diff --git a/GPU/GLES/VertexShaderGenerator.cpp b/GPU/GLES/VertexShaderGenerator.cpp index 94e457d214..a925e0570c 100644 --- a/GPU/GLES/VertexShaderGenerator.cpp +++ b/GPU/GLES/VertexShaderGenerator.cpp @@ -441,7 +441,7 @@ void GenerateVertexShader(int prim, char *buffer) { bool poweredDiffuse = comp == GE_LIGHTCOMP_BOTHWITHPOWDIFFUSE; if (poweredDiffuse) { - WRITE(p, " mediump float dot%i = pow(dot(toLight, worldnormal), u_matspecular.a);\n", i, i); + WRITE(p, " mediump float dot%i = pow(dot(toLight, worldnormal), u_matspecular.a);\n", i); } else { WRITE(p, " mediump float dot%i = dot(toLight, worldnormal);\n", i); } @@ -457,12 +457,12 @@ void GenerateVertexShader(int prim, char *buffer) { WRITE(p, " lightScale = clamp(1.0 / dot(u_lightatt%i, vec3(1.0, distance, distance*distance)), 0.0, 1.0);\n", i); break; case GE_LIGHTTYPE_SPOT: - WRITE(p, " lowp float angle%i = dot(normalize(u_lightdir%i), toLight);\n", i, i, i); + WRITE(p, " lowp float angle%i = dot(normalize(u_lightdir%i), toLight);\n", i, i); WRITE(p, " if (angle%i >= u_lightangle%i) {\n", i, i); WRITE(p, " lightScale = clamp(1.0 / dot(u_lightatt%i, vec3(1.0, distance, distance*distance)), 0.0, 1.0) * pow(angle%i, u_lightspotCoef%i);\n", i, i, i); WRITE(p, " } else {\n"); WRITE(p, " lightScale = 0.0;\n"); - WRITE(p, " }\n"); + WRITE(p, " }\n"); break; default: // ILLEGAL @@ -471,8 +471,8 @@ void GenerateVertexShader(int prim, char *buffer) { WRITE(p, " diffuse = (u_lightdiffuse%i * %s) * max(dot%i, 0.0);\n", i, diffuseStr, i); if (doSpecular) { - WRITE(p, " halfVec = normalize(toLight + vec3(0.0, 0.0, 1.0));\n", i, i); - WRITE(p, " dot%i = dot(halfVec, worldnormal);\n", i, i); + WRITE(p, " halfVec = normalize(toLight + vec3(0.0, 0.0, 1.0));\n"); + WRITE(p, " dot%i = dot(halfVec, worldnormal);\n", i); WRITE(p, " if (dot%i > 0.0)\n", i); WRITE(p, " lightSum1 += u_lightspecular%i * %s * (pow(dot%i, u_matspecular.a) %s);\n", i, specularStr, i, timesLightScale); } diff --git a/GPU/GeDisasm.cpp b/GPU/GeDisasm.cpp index cda5ff9181..8fa9713388 100644 --- a/GPU/GeDisasm.cpp +++ b/GPU/GeDisasm.cpp @@ -86,7 +86,7 @@ void GeDisassembleOp(u32 pc, u32 op, u32 prev, char *buffer) { if (data != 0) sprintf(buffer, "NOP: %06x", data); else - sprintf(buffer, "NOP", data); + sprintf(buffer, "NOP"); break; case GE_CMD_BASE: diff --git a/GPU/Math3D.h b/GPU/Math3D.h index 354f85adff..b526b731e1 100644 --- a/GPU/Math3D.h +++ b/GPU/Math3D.h @@ -125,7 +125,7 @@ public: { return *((&x) + i); } - const float operator [] (const int i) const + float operator [] (const int i) const { return *((&x) + i); }