Skip to content

Commit

Permalink
Fix wrong landscape resolution on Korean client (Unity 2019)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kimjio committed Jun 20, 2022
1 parent b7158aa commit 85ced3f
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 11 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 2.1.4

- Fix wrong landscape resolution on Korean client (Unity 2019)

## 2.1.3

- Fix detecting package on NativeBridge

## 2.1.2

- Fix crash on Korean client

## 2.1.1

- Fix update url

## 2.1.0

- Riru Support
Expand Down
4 changes: 2 additions & 2 deletions module.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ ext {
moduleName = "UmamusumeLocalify"
moduleAuthor = "Kimjio"
moduleDescription = "umamusume-localify"
moduleVersion = "2.1.3"
moduleVersionCode = 6
moduleVersion = "2.1.4"
moduleVersionCode = 7
moduleUpdateJson = "https://raw.githubusercontent.com/Kimjio/umamusume-localify-android/main/update"

// Riru
Expand Down
11 changes: 10 additions & 1 deletion module/src/main/cpp/il2cpp_hook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,17 @@ int (*get_system_height)(Il2CppObject *thisObj);
void *set_resolution_orig = nullptr;

void set_resolution_hook(int width, int height, bool fullscreen) {
int systemWidth = get_system_width(display_main);
int systemHeight = get_system_height(display_main);
// Unity 2019 not invert width, height on landscape
if (width > height && systemWidth < systemHeight) {
reinterpret_cast<decltype(set_resolution_hook) *>(set_resolution_orig)(
systemHeight, systemWidth,
fullscreen);
return;
}
reinterpret_cast<decltype(set_resolution_hook) *>(set_resolution_orig)(
get_system_width(display_main), get_system_height(display_main),
systemWidth, systemHeight,
fullscreen);
}

Expand Down
8 changes: 4 additions & 4 deletions update-riru.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "2.1.3",
"versionCode": 6,
"zipUrl": "https://github.com/Kimjio/umamusume-localify-android/releases/latest/download/riru-umamusume-localify-2.1.3-release.zip",
"changelog": "https://raw.githubusercontent.com/Kimjio/umamusume-localify-android/CHANGELOG.md"
"version": "2.1.4",
"versionCode": 7,
"zipUrl": "https://github.com/Kimjio/umamusume-localify-android/releases/latest/download/riru-umamusume-localify-2.1.4-release.zip",
"changelog": "https://raw.githubusercontent.com/Kimjio/umamusume-localify-android/main/CHANGELOG.md"
}
8 changes: 4 additions & 4 deletions update-zygisk.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "2.1.3",
"versionCode": 6,
"zipUrl": "https://github.com/Kimjio/umamusume-localify-android/releases/latest/download/zygisk-umamusume-localify-2.1.3-release.zip",
"changelog": "https://raw.githubusercontent.com/Kimjio/umamusume-localify-android/CHANGELOG.md"
"version": "2.1.4",
"versionCode": 7,
"zipUrl": "https://github.com/Kimjio/umamusume-localify-android/releases/latest/download/zygisk-umamusume-localify-2.1.4-release.zip",
"changelog": "https://raw.githubusercontent.com/Kimjio/umamusume-localify-android/main/CHANGELOG.md"
}

0 comments on commit 85ced3f

Please sign in to comment.