Skip to content

Commit

Permalink
actually fix KR for real this time
Browse files Browse the repository at this point in the history
  • Loading branch information
patataofcourse committed Dec 13, 2023
1 parent db16fcd commit 0e037f2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
Binary file removed img/UniversalUpdater.png
Binary file not shown.
12 changes: 6 additions & 6 deletions include/Megamix/Region.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ extern u8 region;
namespace Region {

enum {
JP,
US,
EU,
KR,
UNK,
KR_CTR = 5 // in the SDK, KR is 5 instead of 3
JP = 0,
US = 1,
EU = 2,
KR = 3,
KR_CTR = 5, // in the SDK, KR is 5 instead of 3
UNK
};

u8 FromCode(u32 code);
Expand Down
5 changes: 3 additions & 2 deletions src/Megamix/Hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ namespace Megamix::Hooks {
}
}

u32 getRegion() {
u32 getRegionCTR() {
//TODO: handle JP region / JP langpack
if (region == Region::KR)
return Region::KR_CTR;
return region;
Expand Down Expand Up @@ -135,7 +136,7 @@ namespace Megamix::Hooks {
rtInitHook(&regionFSHook, Region::RegionFSHookFunc(), (u32)getRegionMegamix);
rtEnableHook(&regionFSHook);
}
rtInitHook(&regionOtherHook, Region::RegionOtherHookFunc(), (u32)getRegion);
rtInitHook(&regionOtherHook, Region::RegionOtherHookFunc(), (u32)getRegionCTR);
rtEnableHook(&regionOtherHook);
}

Expand Down
3 changes: 2 additions & 1 deletion src/Megamix/Region.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,9 @@ namespace Region {
switch (region) {
case US:
case EU:
case KR:
return 0x28c070;
case KR:
return 0x28c048;
default: // this function doesn't exist in JP afaik
return 0;

Expand Down

0 comments on commit 0e037f2

Please sign in to comment.