static int iso_get_serial(database_state_handle_t *db_state, database_info_handle_t *db, const char *name, char* serial) { int rv; int32_t offset = 0; const char* system_name = NULL; if ((rv = detect_system(name, offset, &system_name)) < 0) return rv; if (string_is_equal(system_name, "psp")) { if (detect_psp_game(name, serial) == 0) return 0; RARCH_LOG("Found disk label '%s'\n", serial); } else if (string_is_equal(system_name, "ps1")) { if (detect_ps1_game(name, serial) == 0) return 0; RARCH_LOG("Found disk label '%s'\n", serial); } return 0; }
static int iso_get_serial(database_state_handle_t *db_state, database_info_handle_t *db, const char *name, char* serial) { int32_t offset = 0; const char* system_name = NULL; int rv = detect_system(name, offset, &system_name); if (rv < 0) return rv; if (string_is_equal(system_name, "psp")) { if (detect_psp_game(name, serial) == 0) return 0; RARCH_LOG("%s '%s'\n", msg_hash_to_str(MSG_FOUND_DISK_LABEL), serial); } else if (string_is_equal(system_name, "ps1")) { if (detect_ps1_game(name, serial) == 0) return 0; RARCH_LOG("%s '%s'\n", msg_hash_to_str(MSG_FOUND_DISK_LABEL), serial); } return 0; }
static int intfstream_get_serial(intfstream_t *fd, char *serial) { const char *system_name = NULL; /* Check if the system was not auto-detected. */ if (detect_system(fd, &system_name) < 0) { /* Attempt to read an ASCII serial, like Wii. */ if (detect_serial_ascii_game(fd, serial)) { /* ASCII serial (Wii) was detected. */ RARCH_LOG("%s '%s'\n", msg_hash_to_str(MSG_FOUND_DISK_LABEL), serial); return 0; } /* Any other non-system specific detection methods? */ return 0; } if (string_is_equal(system_name, "psp")) { if (detect_psp_game(fd, serial) == 0) return 0; RARCH_LOG("%s '%s'\n", msg_hash_to_str(MSG_FOUND_DISK_LABEL), serial); } else if (string_is_equal(system_name, "ps1")) { if (detect_ps1_game(fd, serial) == 0) return 0; RARCH_LOG("%s '%s'\n", msg_hash_to_str(MSG_FOUND_DISK_LABEL), serial); } else if (string_is_equal(system_name, "gc")) { if (detect_gc_game(fd, serial) == 0) return 0; RARCH_LOG("%s '%s'\n", msg_hash_to_str(MSG_FOUND_DISK_LABEL), serial); } else { return 0; } return 1; }