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 cue_get_serial(database_state_handle_t *db_state, database_info_handle_t *db, const char *name, char* serial) { int rv; char track_path[PATH_MAX_LENGTH]; int32_t offset = 0; const char* system_name = NULL; rv = find_first_data_track(name, &offset, track_path, PATH_MAX_LENGTH); if (rv < 0) { RARCH_LOG("Could not find valid data track: %s\n", strerror(-rv)); return rv; } RARCH_LOG("Reading 1st data track...\n"); if ((rv = detect_system(track_path, offset, &system_name)) < 0) return rv; RARCH_LOG("Detected %s media\n", system_name); if (strcmp(system_name, "ps1") == 0) { if (detect_ps1_game(track_path, serial) == 0) return 0; RARCH_LOG("Found disk label '%s'\n", 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; }