]> git.sesse.net Git - pistorm/blobdiff - platforms/amiga/rtg/rtg_driver_amiga/pigfx-2.c
Fix P96 2.1E(?) issues
[pistorm] / platforms / amiga / rtg / rtg_driver_amiga / pigfx-2.c
index eb0bb57051d84e525ab51778da2f75ef0f477de8..6ac92290f34287f2d6317fba628a640b65d5f62e 100644 (file)
@@ -7,6 +7,7 @@
 #include <proto/expansion.h>
 #include <proto/dos.h>
 #include <proto/intuition.h>
+#include <proto/input.h>
 #include <exec/types.h>
 #include <exec/memory.h>
 #include <exec/libraries.h>
@@ -14,6 +15,7 @@
 #include <exec/resident.h>
 #include <exec/initializers.h>
 #include <clib/debug_protos.h>
+#include <devices/inputevent.h>
 #include <string.h>
 #include <stdint.h>
 #include "boardinfo.h"
@@ -214,6 +216,17 @@ int __attribute__((used)) FindCard(__REGA0(struct BoardInfo* b)) {
         return 0;
     }
 
+    struct IORequest io;
+    if (OpenDevice((STRPTR)"input.device", 0, &io, 0) == 0)
+    {
+        struct Library *InputBase = (struct Library *)io.io_Device;
+        UWORD qual = PeekQualifier();
+        CloseDevice(&io);
+
+        if (qual & (IEQUALIFIER_LSHIFT | IEQUALIFIER_RSHIFT))
+            return(FALSE);
+    }
+
     struct ExpansionBase *ExpansionBase = NULL;
     struct DOSBase *DOSBase = NULL;
     struct IntuitionBase *IntuitionBase = NULL;
@@ -242,9 +255,9 @@ int __attribute__((used)) InitCard(__REGA0(struct BoardInfo* b)) {
     b->CardBase = (struct CardBase *)_gfxbase;
     b->ExecBase = SysBase;
     b->BoardName = "PiStorm RTG";
-    b->BoardType = BT_MNT_ZZ9000;
-    b->PaletteChipType = PCT_MNT_ZZ9000;
-    b->GraphicsControllerType = GCT_MNT_ZZ9000;
+    b->BoardType = 14;
+    b->PaletteChipType = PCT_S3ViRGE;
+    b->GraphicsControllerType = GCT_S3ViRGE;
 
     b->Flags = BIF_INDISPLAYCHAIN | BIF_GRANTDIRECTACCESS | BIF_HARDWARESPRITE | BIF_FLICKERFIXER;
     b->RGBFormats = 1 | 2 | 512 | 1024 | 2048;