Skip to content

Commit

Permalink
feat: 3.16.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
harryphone committed Jan 12, 2023
1 parent 0ebfa8f commit 72d5a33
Show file tree
Hide file tree
Showing 14 changed files with 62 additions and 14 deletions.
4 changes: 4 additions & 0 deletions AntiAddiction/Config/Game.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[/Script/UnrealEd.ProjectPackagingSettings]
+DirectoriesToAlwaysCook=(Path="/AntiAddiction")
+DirectoriesToAlwaysCook=(Path="/AntiAddiction/Images")
+DirectoriesToAlwaysCook=(Path="/AntiAddiction/Styles")
11 changes: 9 additions & 2 deletions LeanCloud/Source/LeanCloud/Private/Android/Java/LeanCloudUE.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@
import cn.leancloud.LeanCloud;
import android.app.Activity;


import android.os.Handler;
import android.os.Looper;

public class LeanCloudUE {
public static void initialize(final Activity activity, String clientID, String clientToken, String serverURL) {
LeanCloud.initialize(activity, clientID, clientToken, serverURL);
Handler mainHandler = new Handler(Looper.getMainLooper());
mainHandler.post(new Runnable() {
@Override
public void run() {
LeanCloud.initialize(activity, clientID, clientToken, serverURL);
}
});
}
}
11 changes: 10 additions & 1 deletion LeanCloud/Source/LeanCloud/Private/Android/LCJNI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@ namespace LCJNI {
}

Class JNI::FindClass(const char* name) const {
jclass Class = FAndroidApplication::FindJavaClass(name);
FString Name = FString(UTF8_TO_TCHAR(name));
jclass Class = NULL;
if (Name.Find(TEXT("java/")) != INDEX_NONE) {
LCDebuger::DisplayLog("Env->FindClass: " + Name);
Class = Env->FindClass(name);
} else {
LCDebuger::DisplayLog("FAndroidApplication::FindJavaClass: " + Name);
Class = FAndroidApplication::FindJavaClass(name);
}

if (Class == NULL) {
LCDebuger::ErrorLog(FString::Printf(TEXT("LCJNI Class: %s not found"), UTF8_TO_TCHAR(name)));
}
Expand Down
2 changes: 1 addition & 1 deletion LeanCloud/Source/LeanCloud/Private/LCUser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ bool FLCUser::IsMobilePhoneVerified() const {
return LCJsonHelper::GetBoolField(ServerData, KeyMobilePhoneVerified);
}

bool FLCUser::isAuthenticated() const {
bool FLCUser::IsAuthenticated() const {
return !GetSessionToken().IsEmpty();
}

Expand Down
2 changes: 1 addition & 1 deletion LeanCloud/Source/LeanCloud/Public/LCUser.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ struct LEANCLOUD_API FLCUser: public FLCObject {
FString GetSessionToken() const;
bool IsAnonymous() const;
bool IsMobilePhoneVerified() const;
bool isAuthenticated() const;
bool IsAuthenticated() const;

protected:
static FString KeyUserName;
Expand Down
6 changes: 3 additions & 3 deletions TapBootstrap/Source/TapBootstrap/Private/TDSUser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ FTDSUser::FTDSUser(TSharedPtr<FJsonObject> InServerData)
{
}

FString FTDSUser::GetAvatar() {
FString FTDSUser::GetAvatar() const {
return TUJsonHelper::GetStringField(ServerData, KeyAvatar);
}

FString FTDSUser::GetNickName() {
FString FTDSUser::GetNickName() const {
return TUJsonHelper::GetStringField(ServerData, KeyNickName);
}

FString FTDSUser::GetShortID() {
FString FTDSUser::GetShortID() const {
return TUJsonHelper::GetStringField(ServerData, KeyShortID);
}

Expand Down
6 changes: 3 additions & 3 deletions TapBootstrap/Source/TapBootstrap/Public/TDSUser.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ struct TAPBOOTSTRAP_API FTDSUser: public FLCUser

FTDSUser(TSharedPtr<FJsonObject> InServerData = nullptr);

FString GetAvatar();
FString GetNickName();
FString GetShortID();
FString GetAvatar() const;
FString GetNickName() const;
FString GetShortID() const;

/**
* Return last login user from cached memory or load from local storage
Expand Down
5 changes: 5 additions & 0 deletions TapCommon/Config/Game.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[/Script/UnrealEd.ProjectPackagingSettings]
+DirectoriesToAlwaysCook=(Path="/TapCommon")
+DirectoriesToAlwaysCook=(Path="/TapCommon/Image")
+DirectoriesToAlwaysCook=(Path="/TapCommon/Sarabun")
+DirectoriesToAlwaysCook=(Path="/TapCommon/Styles")
11 changes: 10 additions & 1 deletion TapCommon/Source/TapCommon/Private/android/TapJNI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@ namespace TapJNI {
}

Class JNI::FindClass(const char* name) const {
jclass Class = FAndroidApplication::FindJavaClass(name);
FString Name = FString(UTF8_TO_TCHAR(name));
jclass Class = NULL;
if (Name.Find(TEXT("java/")) != INDEX_NONE) {
TUDebuger::DisplayLog("Env->FindClass: " + Name);
Class = Env->FindClass(name);
} else {
TUDebuger::DisplayLog("FAndroidApplication::FindJavaClass: " + Name);
Class = FAndroidApplication::FindJavaClass(name);
}

if (Class == NULL) {
TUDebuger::ErrorLog(FString::Printf(TEXT("LCJNI Class: %s not found"), UTF8_TO_TCHAR(name)));
}
Expand Down
2 changes: 1 addition & 1 deletion TapCommon/Source/TapCommon/TapCommon.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public TapCommon(ReadOnlyTargetRules Target) : base(Target)
"SlateCore",
"UMG",
"Json",
"Http",
"HTTP",
"JsonUtilities"
}
);
Expand Down
8 changes: 8 additions & 0 deletions TapCommon/Source/TapCommon/Tools/TUHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,17 @@ UTexture2D* TUHelper::GenerateQrCode(const FString& string)
}
}
UTexture2D* texture = UTexture2D::CreateTransient(size, size, EPixelFormat::PF_B8G8R8A8);
#if ENGINE_MAJOR_VERSION >= 5
void* data = texture->GetPlatformData()->Mips[0].BulkData.Lock(LOCK_READ_WRITE);
#else
void* data = texture->PlatformData->Mips[0].BulkData.Lock(LOCK_READ_WRITE);
#endif
FMemory::Memcpy(data, pixels.GetData(), size * size * 4);
#if ENGINE_MAJOR_VERSION >= 5
texture->GetPlatformData()->Mips[0].BulkData.Unlock();
#else
texture->PlatformData->Mips[0].BulkData.Unlock();
#endif
texture->UpdateResource();
texture->Filter = TextureFilter::TF_Nearest;
return texture;
Expand Down
3 changes: 3 additions & 0 deletions TapLogin/Config/Game.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[/Script/UnrealEd.ProjectPackagingSettings]
+DirectoriesToAlwaysCook=(Path="/TapLogin")
+DirectoriesToAlwaysCook=(Path="/TapLogin/Image")
3 changes: 3 additions & 0 deletions TapSupport/Config/Game.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[/Script/UnrealEd.ProjectPackagingSettings]
+DirectoriesToAlwaysCook=(Path="/TapSupport")
+DirectoriesToAlwaysCook=(Path="/TapSupport/Image")
2 changes: 1 addition & 1 deletion TapSupport/Source/TapSupport/TapSupport.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public TapSupport(ReadOnlyTargetRules Target) : base(Target)
"Json",
"JsonUtilities",
"UMG",
"Http",
"HTTP",
"TapCommon"
// ... add other public dependencies that you statically link with here ...
}
Expand Down

0 comments on commit 72d5a33

Please sign in to comment.