diff options
| author | spicyjpeg <thatspicyjpeg@gmail.com> | 2023-04-04 00:46:20 +0200 |
|---|---|---|
| committer | spicyjpeg <thatspicyjpeg@gmail.com> | 2023-04-04 00:46:20 +0200 |
| commit | 8e3a757d4d7d5dfc62f69ce4ede08f1cf79e3461 (patch) | |
| tree | 2cbbfe5b2a1f2ba53a4d070ed142f8fbc9ba49b2 /libpsn00b/psxgpu | |
| parent | 09f321e37fc187affa664d32e36e32c0533a7e8e (diff) | |
| download | psn00bsdk-8e3a757d4d7d5dfc62f69ce4ede08f1cf79e3461.tar.gz | |
Add IsIdleGPU(), tweak psxgpu.h, fix mdec/strvideo
Diffstat (limited to 'libpsn00b/psxgpu')
| -rw-r--r-- | libpsn00b/psxgpu/common.c | 15 |
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; +} |
