Skip to content

Instantly share code, notes, and snippets.

@yuriks
Created September 5, 2015 20:13
Show Gist options
  • Select an option

  • Save yuriks/4c8a986ea0769dd6246b to your computer and use it in GitHub Desktop.

Select an option

Save yuriks/4c8a986ea0769dd6246b to your computer and use it in GitHub Desktop.
commit 7de688601d4702d68099034988ff90f20640a555
Author: Yuri Kunde Schlesner <[email protected]>
Date: Sat Sep 5 16:44:19 2015 -0300
GPU: Fix GPU_Reset function not correctly submitting commandlist
Related to PR #143
diff --git a/libctru/source/gpu/gpu.c b/libctru/source/gpu/gpu.c
index 45f4c4e..1e07095 100644
--- a/libctru/source/gpu/gpu.c
+++ b/libctru/source/gpu/gpu.c
@@ -8,6 +8,7 @@
#include <3ds/gpu/gpu.h>
#include <3ds/gpu/gx.h>
#include <3ds/gpu/shbin.h>
+#include <3ds/services/gsp.h>
u32* gpuCmdBuf;
u32 gpuCmdBufSize;
@@ -215,7 +216,8 @@ void GPU_Reset(u32* gxbuf, u32* gpuBuf, u32 gpuBufSize)
for(i=0;i<gpuResetSequenceLength;i++)GPUCMD_AddSingleParam(gpuResetSequence[i*2],gpuResetSequence[i*2+1]);
GPUCMD_Finalize();
- GPUCMD_Run(gpuBuf);
+ GPUCMD_FlushAndRun(gxbuf);
+ gspWaitForP3D();
GPUCMD_SetBufferOffset(0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment