mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-08-04 13:35:38 +00:00
Add dvdidutils.c
Former-commit-id: c4e4352c4f8999f95e32d865ed524d8c7feef83b
This commit is contained in:
parent
2af0d744cc
commit
c1fdbe95ae
27
src/Dolphin/dvd/dvdidutils.c
Normal file
27
src/Dolphin/dvd/dvdidutils.c
Normal file
@ -0,0 +1,27 @@
|
||||
#include <dolphin/DVDPriv.h>
|
||||
#include <dolphin/dvd.h>
|
||||
#include <dolphin/dvd_regs.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
BOOL DVDCompareDiskID(DVDDiskID* id1, DVDDiskID* id2) {
|
||||
|
||||
if (id1->gameName[0] && id2->gameName[0] && strncmp(&id1->gameName[0], &id2->gameName[0], 4)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!id1->company[0] || !id2->company[0] || strncmp(&id1->company[0], &id2->company[0], 2)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (id1->diskNumber != 0xff && id2->diskNumber != 0xff && id1->diskNumber != id2->diskNumber) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (id1->gameVersion != 0xff && id2->gameVersion != 0xff &&
|
||||
id1->gameVersion != id2->gameVersion) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user