Files
ReshadePluginsCore/libs/UEngine/UETools.hpp

42 lines
1.0 KiB
C++

#pragma once
#include <spdlog/spdlog.h>
#include <atomic>
inline std::atomic_bool g_Console_Enabled { false };
namespace SDK {
class UEngine;
class UObject;
class UWorld;
class UWidget;
class APawn;
class UGameplayStatics;
class UConsole;
class UInputSettings;
class UKismetStringLibrary;
class UGameInstance;
class ULocalPlayer;
class APlayerController;
}
/**
* @brief Gets the current game resolution (not native display) and aspect ratio.
* @param outWidth screen width.
* @param outHeight screen height.
* @param outAspectRatio aspect ratio computed.
*/
void GetResolution(int& outWidth, int& outHeight, float& outAspectRatio);
// Unreal Engine functions
/**
* @brief Gets the current player Pawn from the world.
* @param world Optional UWorld pointer.
* @return Player Pawn or nullptr.
*/
SDK::APawn* GetPawnFromWorld(SDK::UWorld* world = nullptr);
/**
* @brief Reactivate the development console.
* @param logger spdlog.
*/
void ReactivateDevConsole(std::shared_ptr<spdlog::logger> logger);