diff options
Diffstat (limited to 'src/savage_driver.h')
-rw-r--r-- | src/savage_driver.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/savage_driver.h b/src/savage_driver.h index 9286c1e..74eea5c 100644 --- a/src/savage_driver.h +++ b/src/savage_driver.h @@ -33,7 +33,18 @@ #include <string.h> #include <math.h> +#ifdef PCIACCESS #include <pciaccess.h> +#define VENDOR_ID(p) (p)->vendor_id +#define DEVICE_ID(p) (p)->device_id +#define SUBSYS_ID(p) (p)->subdevice_id +#define CHIP_REVISION(p) (p)->revision +#else +#define VENDOR_ID(p) (p)->vendor +#define DEVICE_ID(p) (p)->chipType +#define SUBSYS_ID(p) (p)->subsysCard +#define CHIP_REVISION(p) (p)->chipRev +#endif #define MODE_24 24 @@ -365,8 +376,12 @@ typedef struct _Savage { int TVSizeY; CloseScreenProcPtr CloseScreen; +#ifdef PCIACCESS struct pci_device * PciInfo; +#else + pciVideoPtr PciInfo; PCITAG PciTag; +#endif int Chipset; int ChipId; int ChipRev; |