// Detect It Easy: detection rule file

// Author: DosX
// E-Mail: collab@kay-software.ru
// GitHub: https://github.com/DosX-dev
// Telegram: @DosX_dev

// https://github.com/libsdl-org/SDL
meta("library", "SDL");

function detect() {
    if (PE.isLibraryPresentExp(/^sdl2/i)) {
        sVersion = "2";
    } else if (PE.isLibraryPresentExp(/^sdl3/i)) {
        sVersion = "3";
    } else if (PE.isLibraryPresentExp(/^sdl/i)) {
        bDetected = true;
    }

    bDetected = bDetected || Boolean(sVersion);

    return result();
}