diff --git a/src/core/library.c b/src/core/library.c index 1520994be2f..52265144c62 100644 --- a/src/core/library.c +++ b/src/core/library.c @@ -37,6 +37,7 @@ struct mLibrary { #define CONSTRAINTS_ROMONLY \ "CASE WHEN :useSize THEN roms.size = :size ELSE 1 END AND " \ "CASE WHEN :usePlatform THEN roms.platform = :platform ELSE 1 END AND " \ + "CASE WHEN :useModels THEN roms.models & :models ELSE 1 END AND " \ "CASE WHEN :useCrc32 THEN roms.crc32 = :crc32 ELSE 1 END AND " \ "CASE WHEN :useInternalCode THEN roms.internalCode = :internalCode ELSE 1 END" @@ -98,7 +99,9 @@ static void _bindConstraints(sqlite3_stmt* statement, const struct mLibraryEntry } if (constraints->platformModels != M_LIBRARY_MODEL_UNKNOWN) { + useIndex = sqlite3_bind_parameter_index(statement, ":useModels"); index = sqlite3_bind_parameter_index(statement, ":models"); + sqlite3_bind_int(statement, useIndex, 1); sqlite3_bind_int(statement, index, constraints->platformModels); } } @@ -183,8 +186,8 @@ struct mLibrary* mLibraryLoad(const char* path) { goto error; } else if (romsTableVersion < 2) { static const char upgradeRomsTable[] = - " ALTER TABLE roms" - "\nADD COLUMN models INTEGER NULL"; + " ALTER TABLE roms" + "\n ADD COLUMN models INTEGER NULL"; if (sqlite3_exec(library->db, upgradeRomsTable, NULL, NULL, NULL)) { goto error; } diff --git a/src/platform/qt/CMakeLists.txt b/src/platform/qt/CMakeLists.txt index 4b366f7556b..f49b28e40ce 100644 --- a/src/platform/qt/CMakeLists.txt +++ b/src/platform/qt/CMakeLists.txt @@ -525,6 +525,6 @@ if(BUILD_SUITE) add_test(platform-qt-${TEST_NAME} test-qt-${TEST_NAME}) endforeach() else() - message("${QT}Test not found") + message(WARNING "${QT}Test not found") endif() endif()