Skip to content

Commit

Permalink
Fix packaging for UE 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
N7Alpha committed May 11, 2024
1 parent f6f4c30 commit c0e326a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#include "LibretroBlueprintFunctionLibrary.h"

#include "Runtime/Launch/Resources/Version.h"
#include "GameFramework/Actor.h"

#include "Engine/Engine.h"
#include "Engine/EngineTypes.h"
#if ENGINE_MAJOR_VERSION == 5 \
&& ENGINE_MINOR_VERSION >= 4
#include "Engine/HitResult.h"
#endif
#include "Camera/CameraComponent.h"
#include "PhysicsEngine/PhysicsSettings.h"
#include "Runtime/Launch/Resources/Version.h"

#if ENGINE_MAJOR_VERSION != 5 \
|| ENGINE_MINOR_VERSION < 1
Expand Down
5 changes: 2 additions & 3 deletions Source/UnrealLibretro/Private/LibretroContext.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#include "LibretroContext.h"
extern "C"
{
Expand All @@ -16,16 +15,16 @@ extern "C"
#include "HAL/FileManager.h"
#include "Misc/Paths.h"
#include "TextureResource.h"
#include "RenderingThread.h"
#include "Runtime/Launch/Resources/Version.h"

#if PLATFORM_APPLE
#include <dispatch/dispatch.h>
#endif

#if PLATFORM_WINDOWS
#include "Windows/AllowWindowsPlatformTypes.h"
#include "Windows/PreWindowsApi.h"
#include <d3d12.h>
#include "Windows/PostWindowsApi.h"
#include "Windows/HideWindowsPlatformTypes.h"
#endif

Expand Down
7 changes: 4 additions & 3 deletions Source/UnrealLibretro/Private/LibretroContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,21 @@ static_assert(RETRO_API_VERSION == 1, "Retro API version changed");
#include "Engine/TextureRenderTarget2D.h"
#include "UObject/WeakObjectPtrTemplates.h"
#include "Containers/CircularQueue.h"
#include "Containers/Queue.h"
#include "RHIResources.h"

#include "LibretroInputDefinitions.h"
#include "RawAudioSoundWave.h"

#if PLATFORM_WINDOWS
#include "Windows/PreWindowsApi.h"
#include "Windows/WindowsHWrapper.h"
#include "Windows/AllowWindowsPlatformTypes.h"
#endif

#include "ThirdParty/OpenGL/GL/glcorearb.h"
#include "GL/extension_definitions.h"

#if PLATFORM_WINDOWS
#include "Windows/PostWindowsApi.h"
#include "Windows/HideWindowsPlatformTypes.h"
#endif

DECLARE_STATS_GROUP(TEXT("UnrealLibretro"), STATGROUP_UnrealLibretro, STATCAT_Advanced);
Expand Down
2 changes: 1 addition & 1 deletion Source/UnrealLibretro/Public/LibretroGameMode.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class UNREALLIBRETRO_API ALibretroGameMode : public AGameModeBase
// @todo There is probably some smarter way of determining this
// This returns true if you launch PIE in "VR Preview" mode
// If you start your packaged game with the flag -vr then this will also be true
static CONSTEXPR auto ShouldStartPlayerInVRPawn = UHeadMountedDisplayFunctionLibrary::IsHeadMountedDisplayEnabled;
static constexpr auto ShouldStartPlayerInVRPawn = UHeadMountedDisplayFunctionLibrary::IsHeadMountedDisplayEnabled;

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Classes)
TSubclassOf<APawn> DefaultVRPawnClass = ALibretroVRPawn::StaticClass();
Expand Down
2 changes: 0 additions & 2 deletions Source/UnrealLibretro/Public/UnrealLibretro.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ static const struct { FString DistributionPath; FString Extension; FString Build

#if PLATFORM_WINDOWS
#include "Windows/AllowWindowsPlatformTypes.h"
#include "Windows/PreWindowsApi.h"

typedef HGLRC(WINAPI* PFN_wglCreateContext)(HDC);
typedef BOOL(WINAPI* PFN_wglDeleteContext)(HGLRC);
Expand Down Expand Up @@ -62,7 +61,6 @@ static void* Win32GLGetProcAddress(const char* procname)
return proc;
}

#include "Windows/PostWindowsApi.h"
#include "Windows/HideWindowsPlatformTypes.h"
#endif

Expand Down

0 comments on commit c0e326a

Please sign in to comment.