Reduce Windows debugger crashes on shutdown

This commit is contained in:
Henrik Rydgård 2024-10-29 11:19:32 +01:00
parent fdab5cb7bd
commit 14bb7a6062
3 changed files with 5 additions and 4 deletions

View File

@ -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.

View File

@ -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];

View File

@ -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;