diff --git a/Core/System.cpp b/Core/System.cpp index b8cb8f2182..6764e6901c 100644 --- a/Core/System.cpp +++ b/Core/System.cpp @@ -550,6 +550,9 @@ bool PSP_IsQuitting() { } void PSP_Shutdown() { + // Reduce the risk for weird races with the Windows GE debugger. + gpuDebug = nullptr; + Achievements::UnloadGame(); // Do nothing if we never inited. diff --git a/GPU/Common/SoftwareTransformCommon.cpp b/GPU/Common/SoftwareTransformCommon.cpp index 8d1624000c..c2a8b8f1ff 100644 --- a/GPU/Common/SoftwareTransformCommon.cpp +++ b/GPU/Common/SoftwareTransformCommon.cpp @@ -539,9 +539,9 @@ void SoftwareTransform::BuildDrawingParams(int prim, int vertexCount, u32 vertTy // so the operations are exact. bool pixelMapped = true; const u16 *indsIn = (const u16 *)inds; + const float uscale = gstate_c.curTextureWidth; + const float vscale = gstate_c.curTextureHeight; for (int t = 0; t < vertexCount; t += 3) { - float uscale = gstate_c.curTextureWidth; - float vscale = gstate_c.curTextureHeight; struct { int a; int b; } pairs[] = { {0, 1}, {1, 2}, {2, 0} }; for (int i = 0; i < ARRAY_SIZE(pairs); i++) { int a = indsIn[t + pairs[i].a]; diff --git a/GPU/GPU.cpp b/GPU/GPU.cpp index 38af2f75ba..341be4f42d 100644 --- a/GPU/GPU.cpp +++ b/GPU/GPU.cpp @@ -121,8 +121,6 @@ bool GPU_Init(GraphicsContext *ctx, Draw::DrawContext *draw) { #endif void GPU_Shutdown() { - // Reduce the risk for weird races with the Windows GE debugger. - gpuDebug = nullptr; delete gpu; gpu = nullptr;