diff options
| author | John Wilbert M. Villamor <lameguy64@gmail.com> | 2020-09-19 20:43:05 +0800 |
|---|---|---|
| committer | John Wilbert M. Villamor <lameguy64@gmail.com> | 2020-09-19 20:43:05 +0800 |
| commit | 9f4891f95070c66ea9f1aba99d72724d4ab24e5a (patch) | |
| tree | 723e3ef2118a3d1a9e6dafa811ed1b8b1bc9196e /libpsn00b/psxcd/psxcd.c | |
| parent | 6762c39551ded059450d17d8bb0cb80642c8aaab (diff) | |
| download | psn00bsdk-9f4891f95070c66ea9f1aba99d72724d4ab24e5a.tar.gz | |
Revised makefiles, added strtok(), command line arguments, SetHeapSize(), moved ISR and callback system to psxetc, moved debug font to psxgpu, fixed CD-ROM library crashing on PSIO, fixed interrupt callback setup to fix crashing on ResetGraph()
Diffstat (limited to 'libpsn00b/psxcd/psxcd.c')
| -rw-r--r-- | libpsn00b/psxcd/psxcd.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libpsn00b/psxcd/psxcd.c b/libpsn00b/psxcd/psxcd.c index 76b6c08..76a8eba 100644 --- a/libpsn00b/psxcd/psxcd.c +++ b/libpsn00b/psxcd/psxcd.c @@ -17,7 +17,7 @@ volatile CdlLOC _cd_last_setloc; volatile unsigned int *_cd_last_read_addr; volatile int _cd_last_sector_count; -extern volatile char _cd_media_changed; +int _cd_media_changed; void _cd_init(void); void _cd_control(unsigned char com, unsigned char *param, int plen); @@ -62,6 +62,12 @@ int CdControl(unsigned char com, unsigned char *param, unsigned char *result) CdControlF(com, param); _cd_wait_ack(); + // Set media changed flag if lid had been opened + if( (CdStatus()&0x10) ) + { + _cd_media_changed = 1; + } + return 1; } |
