Skip to content

Commit

Permalink
修复丽塔资源压缩问题,发布2.7.0版本
Browse files Browse the repository at this point in the history
  • Loading branch information
xausky committed Nov 2, 2018
1 parent c990882 commit e636f14
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ android {
applicationId "io.github.xausky.unitymodmanager"
minSdkVersion 21
targetSdkVersion 23
versionCode 261
versionName "2.6.1"
versionCode 270
versionName "2.7.0"
ndk{
abiFilters "armeabi-v7a","x86"
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/cpp/libuabe/BundleFile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ namespace xausky {
}
}
void BundleFile::save(BinaryStream& bundleStream, int32_t maxBlockSize, int32_t bundleFlag, int16_t blocksFlag, int32_t fileFlag){
char uncompressedData[maxBlockSize], compressedData[maxBlockSize];
char uncompressedData[maxBlockSize], compressedData[maxBlockSize + 1024];
bundleStream.WriteStringToNull(fileType);
bundleStream.WriteInt32(fileVersion);
bundleStream.WriteStringToNull(versionPlayer);
Expand All @@ -108,7 +108,7 @@ namespace xausky {
uncompressedSize = file->stream->count();
if(uncompressedSize > 0){
blocksStream.WriteInt32(uncompressedSize);
compressedSize = LZ4_compress_HC(uncompressedData, compressedData, uncompressedSize, maxBlockSize, LZ4HC_CLEVEL_DEFAULT);
compressedSize = LZ4_compress_HC(uncompressedData, compressedData, uncompressedSize, maxBlockSize + 1024, LZ4HC_CLEVEL_DEFAULT);
if(compressedSize <= 0){
DecompressDataException e;
throw e;
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/cpp/libuabe/FolderFile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ namespace xausky {
BinaryStream patchedBundle(targetPath + '/' + filename, true);
BundleFile bundleFile;
bundleFile.open(bundle);
map<string, map<int64_t, BinaryStream *> *> *patch = Utils::MakeBundlePatch(
FolderPathBuffer);
map<string, map<int64_t, BinaryStream *> *> *patch = Utils::MakeBundlePatch(FolderPathBuffer);
bundleFile.patch(*patch);
bundleFile.save(patchedBundle);
Utils::FreeBundlePatch(patch);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public boolean onLongClick(View v) {
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
if(item.getItemId() == R.id.nav_online_mods){
Intent intent = new Intent();
intent.setData(Uri.parse("https://umms.herokuapp.com/index"));
intent.setData(Uri.parse("https://umms.xausky.cn/"));
intent.setAction(Intent.ACTION_VIEW);
MainActivity.this.startActivity(intent);
return false;
Expand Down

0 comments on commit e636f14

Please sign in to comment.