mirror of https://github.com/mgba-emu/mgba.git
clean up according to PR comments
This commit is contained in:
parent
f5c90ee34b
commit
f415084807
|
@ -38,6 +38,7 @@ struct mLibrary {
|
||||||
#define CONSTRAINTS_ROMONLY \
|
#define CONSTRAINTS_ROMONLY \
|
||||||
"CASE WHEN :useSize THEN roms.size = :size ELSE 1 END AND " \
|
"CASE WHEN :useSize THEN roms.size = :size ELSE 1 END AND " \
|
||||||
"CASE WHEN :usePlatform THEN roms.platform = :platform 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 :useCrc32 THEN roms.crc32 = :crc32 ELSE 1 END AND " \
|
||||||
"CASE WHEN :useInternalCode THEN roms.internalCode = :internalCode ELSE 1 END"
|
"CASE WHEN :useInternalCode THEN roms.internalCode = :internalCode ELSE 1 END"
|
||||||
|
|
||||||
|
@ -99,7 +100,9 @@ static void _bindConstraints(sqlite3_stmt* statement, const struct mLibraryEntry
|
||||||
}
|
}
|
||||||
|
|
||||||
if (constraints->platformModels != M_LIBRARY_MODEL_UNKNOWN) {
|
if (constraints->platformModels != M_LIBRARY_MODEL_UNKNOWN) {
|
||||||
|
useIndex = sqlite3_bind_parameter_index(statement, ":useModels");
|
||||||
index = sqlite3_bind_parameter_index(statement, ":models");
|
index = sqlite3_bind_parameter_index(statement, ":models");
|
||||||
|
sqlite3_bind_int(statement, useIndex, 1);
|
||||||
sqlite3_bind_int(statement, index, constraints->platformModels);
|
sqlite3_bind_int(statement, index, constraints->platformModels);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -185,7 +188,7 @@ struct mLibrary* mLibraryLoad(const char* path) {
|
||||||
} else if (romsTableVersion < 2) {
|
} else if (romsTableVersion < 2) {
|
||||||
static const char upgradeRomsTable[] =
|
static const char upgradeRomsTable[] =
|
||||||
" ALTER TABLE roms"
|
" ALTER TABLE roms"
|
||||||
"\nADD COLUMN models INTEGER NULL";
|
"\n ADD COLUMN models INTEGER NULL";
|
||||||
if (sqlite3_exec(library->db, upgradeRomsTable, NULL, NULL, NULL)) {
|
if (sqlite3_exec(library->db, upgradeRomsTable, NULL, NULL, NULL)) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
|
@ -574,7 +574,7 @@ if(BUILD_SUITE)
|
||||||
add_test(platform-qt-${TEST_NAME} test-qt-${TEST_NAME})
|
add_test(platform-qt-${TEST_NAME} test-qt-${TEST_NAME})
|
||||||
endforeach()
|
endforeach()
|
||||||
else()
|
else()
|
||||||
message("${QT}Test not found")
|
message(WARNING "${QT}Test not found")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue