From 17ba67c8c9aa01dcbdc54d37e737787313a6e045 Mon Sep 17 00:00:00 2001 From: Jhynjhiruu Date: Sun, 21 Jul 2019 10:37:29 +0100 Subject: [PATCH] Remove magic number --- src/core/loader/smdh.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/loader/smdh.cpp b/src/core/loader/smdh.cpp index e66605db95..d2dfe7f785 100644 --- a/src/core/loader/smdh.cpp +++ b/src/core/loader/smdh.cpp @@ -53,10 +53,11 @@ SMDH::GameRegion SMDH::GetRegion() const { return GameRegion::RegionFree; } - if (region_lockout == 0x00000050) { + constexpr u32 taiwan_and_china = (1 << GameRegion::Taiwan) & (1 << GameRegion::China); + if (region_lockout == taiwan_and_china) { return GameRegion::Taiwan; } // hack to fix TWN games that support CHN consoles - + constexpr u32 REGION_COUNT = 7; u32 region = 0; for (; region < REGION_COUNT; ++region) {