mirror of
https://github.com/joel16/PSP-Everest.git
synced 2024-11-23 03:29:48 +00:00
consoleidinfo: Use a char array to cut down multiple if/else if statements
This commit is contained in:
parent
8cd3b1509e
commit
460f2bf1d1
@ -53,23 +53,24 @@ namespace ConsoleIdInfo {
|
||||
}
|
||||
|
||||
const char *GetFactoryCodeInfo(u16 factoryCode) {
|
||||
if (factoryCode == 0) {
|
||||
return "Invalid: PSP Kicho & Dencho Program";
|
||||
const char *factory_codes[] {
|
||||
"Invalid: PSP Kicho & Dencho Program",
|
||||
"-",
|
||||
"China manufacture 1 (01g)",
|
||||
"China manufacture 2 (02g, 03g, 04g, 05g, 07g, 09g)",
|
||||
"China manufacture 3 (04g and 11g)"
|
||||
};
|
||||
|
||||
if (factoryCode < 5) {
|
||||
return factory_codes[factoryCode];
|
||||
}
|
||||
else if (factoryCode == 2) {
|
||||
return "China manufacture 1 (01g)";
|
||||
}
|
||||
else if (factoryCode == 3) {
|
||||
return "China manufacture 2 (02g, 03g, 04g, 05g, 07g, 09g)";
|
||||
}
|
||||
else if (factoryCode == 4) {
|
||||
return "China manufacture 3 (04g and 11g)";
|
||||
}
|
||||
else if (factoryCode == 35) {
|
||||
return "Japan Diagnosis Center 1 (Diag/QA PSP)";
|
||||
}
|
||||
else if (factoryCode == 62) {
|
||||
return "Servicing Center 2 (refurbished 01g)";
|
||||
else {
|
||||
if (factoryCode == 35) {
|
||||
return "Japan Diagnosis Center 1 (Diag/QA PSP)";
|
||||
}
|
||||
else if (factoryCode == 62) {
|
||||
return "Servicing Center 2 (refurbished 01g)";
|
||||
}
|
||||
}
|
||||
|
||||
return "-";
|
||||
|
Loading…
Reference in New Issue
Block a user