| 1 |
/* This program is a horrible hack to make the libglide3 library
|
| 2 |
** symlinked to the proper library for voodoo 3 or 5
|
| 3 |
*/
|
| 4 |
|
| 5 |
#include <stdio.h>
|
| 6 |
#include <unistd.h>
|
| 7 |
#include <stdlib.h>
|
| 8 |
|
| 9 |
#include <kudzu/kudzu.h>
|
| 10 |
|
| 11 |
char *oldpath = GLIDELIB;
|
| 12 |
|
| 13 |
int main(int argc, char **argv) {
|
| 14 |
struct device **devicelist;
|
| 15 |
struct pciDevice *videodev;
|
| 16 |
|
| 17 |
devicelist = probeDevices(CLASS_VIDEO, BUS_PCI, PROBE_ALL);
|
| 18 |
if (!devicelist || !devicelist[0])
|
| 19 |
exit(0);
|
| 20 |
|
| 21 |
videodev = (struct pciDevice *)devicelist[0];
|
| 22 |
|
| 23 |
switch (videodev->vendorId) {
|
| 24 |
case 0x121a:
|
| 25 |
switch (videodev->deviceId) {
|
| 26 |
case 0x0003:
|
| 27 |
case 0x0004:
|
| 28 |
case 0x0005:
|
| 29 |
unlink(oldpath);
|
| 30 |
symlink("glide3/libglide3-v3.so",oldpath);
|
| 31 |
break;
|
| 32 |
case 0x0009:
|
| 33 |
unlink(oldpath);
|
| 34 |
symlink("glide3/libglide3-v5.so",oldpath);
|
| 35 |
break;
|
| 36 |
default:
|
| 37 |
break;
|
| 38 |
}
|
| 39 |
break;
|
| 40 |
default:
|
| 41 |
break;
|
| 42 |
}
|
| 43 |
exit(0);
|
| 44 |
}
|