From 58bd1299878db7682517cafc07fe2687965008ec Mon Sep 17 00:00:00 2001 From: JosJuice Date: Thu, 16 Mar 2017 10:45:57 +0100 Subject: [PATCH] Simplify GetSysMenuRegion --- Source/Core/DiscIO/Enums.cpp | 45 ++++-------------------------------- 1 file changed, 5 insertions(+), 40 deletions(-) diff --git a/Source/Core/DiscIO/Enums.cpp b/Source/Core/DiscIO/Enums.cpp index c107d68c2d..2ef5b0e344 100644 --- a/Source/Core/DiscIO/Enums.cpp +++ b/Source/Core/DiscIO/Enums.cpp @@ -126,50 +126,15 @@ Country CountrySwitch(u8 country_code) u8 GetSysMenuRegion(u16 title_version) { - switch (title_version) + switch (title_version & 0xf) { - case 128: - case 192: - case 224: - case 256: - case 288: - case 352: - case 384: - case 416: - case 448: - case 480: - case 512: + case 0: return 'J'; - case 97: - case 193: - case 225: - case 257: - case 289: - case 353: - case 385: - case 417: - case 449: - case 481: - case 513: + case 1: return 'E'; - case 130: - case 162: - case 194: - case 226: - case 258: - case 290: - case 354: - case 386: - case 418: - case 450: - case 482: - case 514: + case 2: return 'P'; - case 326: - case 390: - case 454: - case 486: - case 518: + case 6: return 'K'; default: return 'A';