fix type and some functions that are soon to be replaced

This commit is contained in:
Joshua
2022-02-25 15:06:42 -05:00
parent fded4d065b
commit 09bbe211a8
5 changed files with 55 additions and 31 deletions

View File

@@ -1,22 +1,19 @@
{
"FileVersion" : 3,
"FriendlyName" : "Advanced Sessions",
"Version" : 4.27,
"VersionName": "4.27",
"Description" : "Adds new blueprint functions to handle more advanced session operations.",
"Category" : "Advanced Sessions Plugin",
"CreatedBy" : "Joshua Statzer",
"CreatedByURL" : "N/A",
"Modules" :
[
{
"Name" : "AdvancedSessions",
"Type" : "RunTime",
"LoadingPhase" : "PreDefault"
}
],
"FileVersion": 3,
"FriendlyName": "Advanced Sessions",
"Version": 4,
"VersionName": "5.0",
"Description": "Adds new blueprint functions to handle more advanced session operations.",
"Category": "Advanced Sessions Plugin",
"CreatedBy": "Joshua Statzer",
"CreatedByURL": "N/A",
"Modules": [
{
"Name": "AdvancedSessions",
"Type": "Runtime",
"LoadingPhase": "PreDefault"
}
],
"Plugins": [
{
"Name": "OnlineSubsystem",
@@ -26,5 +23,12 @@
"Name": "OnlineSubsystemUtils",
"Enabled": true
}
]
],
"DocsURL": "",
"MarketplaceURL": "",
"SupportURL": "",
"CanContainContent": false,
"IsBetaVersion": false,
"IsExperimentalVersion": false,
"Installed": false
}

View File

@@ -0,0 +1,8 @@
[FilterPlugin]
; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and
; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively.
;
; Examples:
; /README.txt
; /Extras/...
; /Binaries/ThirdParty/*.dll

View File

@@ -2,8 +2,8 @@
"FileVersion" : 3,
"FriendlyName" : "Advanced Steam Sessions",
"Version" : 4.27,
"VersionName": "4.27",
"Version" : 5.0,
"VersionName": "5.0",
"Description" : "Adds new blueprint functions to handle more advanced session operations in Steam. REQUIRES ADVANCED SESSIONS",
"Category" : "Advanced Sessions Plugin",
"CreatedBy" : "Joshua Statzer",

View File

@@ -0,0 +1,8 @@
[FilterPlugin]
; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and
; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively.
;
; Examples:
; /README.txt
; /Extras/...
; /Binaries/ThirdParty/*.dll

View File

@@ -332,18 +332,22 @@ UTexture2D * UAdvancedSteamFriendsLibrary::GetSteamFriendAvatar(const FBPUniqueN
UTexture2D* Avatar = UTexture2D::CreateTransient(Width, Height, PF_R8G8B8A8);
// Switched to a Memcpy instead of byte by byte transer
uint8* MipData = (uint8*)Avatar->PlatformData->Mips[0].BulkData.Lock(LOCK_READ_WRITE);
FMemory::Memcpy(MipData, (void*)oAvatarRGBA, Height * Width * 4);
Avatar->PlatformData->Mips[0].BulkData.Unlock();
// Original implementation was missing this!!
// the hell man......
delete[] oAvatarRGBA;
if (FTexturePlatformData* PlatformData = Avatar->GetPlatformData())
{
uint8* MipData = (uint8*)PlatformData->Mips[0].BulkData.Lock(LOCK_READ_WRITE);
FMemory::Memcpy(MipData, (void*)oAvatarRGBA, Height * Width * 4);
PlatformData->Mips[0].BulkData.Unlock();
//Setting some Parameters for the Texture and finally returning it
Avatar->PlatformData->SetNumSlices(1);
Avatar->NeverStream = true;
//Avatar->CompressionSettings = TC_EditorIcon;
// Original implementation was missing this!!
// the hell man......
delete[] oAvatarRGBA;
//Setting some Parameters for the Texture and finally returning it
PlatformData->SetNumSlices(1);
Avatar->NeverStream = true;
//Avatar->CompressionSettings = TC_EditorIcon;
}
Avatar->UpdateResource();