Add missing XRRFreeCrtcInfo and XRRFreeScreenResources functions (#46)

This commit is contained in:
Anghelo Carvajal 2024-06-20 17:44:17 -04:00 committed by GitHub
parent e106c18965
commit e52aa9eea1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -251,10 +251,12 @@ namespace RT64 {
if ((crtcInfo != nullptr) && (crtcInfo->mode != 0L)) {
activeModeID = crtcInfo->mode;
}
XRRFreeCrtcInfo(crtcInfo);
}
if (activeModeID == 0L) {
fprintf(stderr, "Unable to find active mode through XRRGetScreenResources and XRRGetCrtcInfo.\n");
XRRFreeScreenResources(screenResources);
return;
}
@ -265,6 +267,8 @@ namespace RT64 {
break;
}
}
XRRFreeScreenResources(screenResources);
# endif
}