aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/psxgpu
diff options
context:
space:
mode:
Diffstat (limited to 'libpsn00b/psxgpu')
-rw-r--r--libpsn00b/psxgpu/common.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libpsn00b/psxgpu/common.c b/libpsn00b/psxgpu/common.c
index 537f672..e354261 100644
--- a/libpsn00b/psxgpu/common.c
+++ b/libpsn00b/psxgpu/common.c
@@ -321,3 +321,18 @@ void DrawOTag2(const uint32_t *ot) {
DMA_BCR(DMA_GPU) = 0;
DMA_CHCR(DMA_GPU) = 0x01000401;
}
+
+/* Queue pause/resume API */
+
+int IsIdleGPU(int timeout) {
+ if (timeout <= 0)
+ timeout = 1;
+
+ for (; timeout; timeout--) {
+ if (GPU_GP1 & (1 << 26))
+ return 0;
+ }
+
+ //_sdk_log("IsIdleGPU() timeout\n");
+ return -1;
+}