diff options
| -rw-r--r-- | gui/Plugin.c | 6 | ||||
| -rw-r--r-- | libpcsxcore/cdrom.c | 15 |
2 files changed, 21 insertions, 0 deletions
diff --git a/gui/Plugin.c b/gui/Plugin.c index 22b6f2cf..e510aed1 100644 --- a/gui/Plugin.c +++ b/gui/Plugin.c @@ -35,6 +35,8 @@ void OnFile_Exit(); +extern void LidInterrupt();
+
unsigned long gpuDisp; int StatesC = 0; @@ -255,9 +257,13 @@ void PADhandleKey(int key) { break; case XK_F9: SetCdOpenCaseTime(-1); +
+ LidInterrupt();
break; case XK_F10: SetCdOpenCaseTime(0); +
+ LidInterrupt();
break; case XK_Escape: // TODO diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index 8ecb1d64..9771a60c 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -1147,3 +1147,18 @@ int cdrFreeze(gzFile f, int Mode) { return 0; } +
+
+
+
+
+void LidInterrupt()
+{
+ // generate interrupt if none active - open or close
+ if( cdr.Irq == 0 || cdr.Irq == 0xff )
+ {
+ cdr.Ctrl |= 0x80;
+ cdr.Stat = NoIntr;
+ AddIrqQueue(CdlNop, 0x800);
+ }
+}
|
