This commit is contained in:
mordentral
2016-02-24 09:01:22 -05:00
parent ef76bb7d19
commit 450b58839d
4 changed files with 35 additions and 9 deletions

View File

@@ -7,7 +7,7 @@ public class AdvancedSessions : ModuleRules
{ {
PrivateIncludePaths.AddRange(new string[] { "AdvancedSessions/Private"/*, "OnlineSubsystemSteam/Private"*/ }); PrivateIncludePaths.AddRange(new string[] { "AdvancedSessions/Private"/*, "OnlineSubsystemSteam/Private"*/ });
PublicIncludePaths.AddRange(new string[] { "AdvancedSessions/Public" }); PublicIncludePaths.AddRange(new string[] { "AdvancedSessions/Public" });
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "OnlineSubsystem","CoreUObject", "OnlineSubsystemUtils", "Networking", "Sockets", "Steamworks"/*, "OnlineSubsystemSteam"*/ }); PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "OnlineSubsystem","CoreUObject", "OnlineSubsystemUtils", "Networking", "Sockets", "Steamworks", /*"Voice", "OnlineSubsystemSteam"*/ });
PrivateDependencyModuleNames.AddRange(new string[] { "OnlineSubsystem", "Sockets", "Networking"/*, "Steamworks", "OnlineSubsystemSteam"*/ }); PrivateDependencyModuleNames.AddRange(new string[] { "OnlineSubsystem", "Sockets", "Networking","OnlineSubsystemUtils", /*"Voice", "Steamworks", "OnlineSubsystemSteam"*/ });
} }
} }

View File

@@ -1,8 +1,29 @@
// Fill out your copyright notice in the Description page of Project Settings. // Fill out your copyright notice in the Description page of Project Settings.
#include "OnlineSubSystemHeader.h" #include "OnlineSubSystemHeader.h"
#include "AdvancedFriendsLibrary.h" #include "AdvancedFriendsLibrary.h"
// This is taken directly from UE4 - OnlineSubsystemSteamPrivatePCH.h as a fix for the array_count macro
// @todo Steam: Steam headers trigger secure-C-runtime warnings in Visual C++. Rather than mess with _CRT_SECURE_NO_WARNINGS, we'll just
// disable the warnings locally. Remove when this is fixed in the SDK
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable:4996)
#endif
#pragma push_macro("ARRAY_COUNT")
#undef ARRAY_COUNT
#include <steam/steam_api.h> #include <steam/steam_api.h>
#pragma pop_macro("ARRAY_COUNT")
// @todo Steam: See above
#ifdef _MSC_VER
#pragma warning(pop)
#endif
//General Log //General Log
DEFINE_LOG_CATEGORY(AdvancedFriendsLog); DEFINE_LOG_CATEGORY(AdvancedFriendsLog);
@@ -102,7 +123,7 @@ UTexture2D * UAdvancedFriendsLibrary::GetSteamFriendAvatar(APlayerController *Pl
if (Width > 0 && Height > 0) if (Width > 0 && Height > 0)
{ {
//Creating the buffer "oAvatarRGBA" and then filling it with the RGBA Stream from the Steam Avatar //Creating the buffer "oAvatarRGBA" and then filling it with the RGBA Stream from the Steam Avatar
BYTE *oAvatarRGBA = new BYTE[Width * Height * 4]; uint8 *oAvatarRGBA = new uint8[Width * Height * 4];
//Filling the buffer with the RGBA Stream from the Steam Avatar and creating a UTextur2D to parse the RGBA Steam in //Filling the buffer with the RGBA Stream from the Steam Avatar and creating a UTextur2D to parse the RGBA Steam in
@@ -121,7 +142,6 @@ UTexture2D * UAdvancedFriendsLibrary::GetSteamFriendAvatar(APlayerController *Pl
UTexture2D* Avatar = UTexture2D::CreateTransient(Width, Height, PF_R8G8B8A8); UTexture2D* Avatar = UTexture2D::CreateTransient(Width, Height, PF_R8G8B8A8);
//MAGIC!
uint8* MipData = (uint8*)Avatar->PlatformData->Mips[0].BulkData.Lock(LOCK_READ_WRITE); uint8* MipData = (uint8*)Avatar->PlatformData->Mips[0].BulkData.Lock(LOCK_READ_WRITE);
FMemory::Memcpy(MipData, (void*)oAvatarRGBA, Height * Width * 4); FMemory::Memcpy(MipData, (void*)oAvatarRGBA, Height * Width * 4);
Avatar->PlatformData->Mips[0].BulkData.Unlock(); Avatar->PlatformData->Mips[0].BulkData.Unlock();

View File

@@ -13,6 +13,12 @@
#include "OnlineSubsystemUtilsClasses.h" #include "OnlineSubsystemUtilsClasses.h"
#include "BlueprintDataDefinitions.h" #include "BlueprintDataDefinitions.h"
/*#include "VoiceEngineImpl.h"
#include "VoiceInterfaceImpl.h"
#include "Voice.h""
*/
// Found this in the steam controller, seems like a nice thought since steam is throwing errors // Found this in the steam controller, seems like a nice thought since steam is throwing errors
// Disable crazy warnings that claim that standard C library is "deprecated". // Disable crazy warnings that claim that standard C library is "deprecated".
#ifdef _MSC_VER #ifdef _MSC_VER