mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-10-30 07:11:05 +00:00
High DPI window fixes
This commit is contained in:
parent
b39bc1e065
commit
a272c6d32a
4 changed files with 11 additions and 9 deletions
|
|
@ -29,6 +29,12 @@ enum EScoreBehaviour : uint32_t
|
|||
EScoreBehaviour_CheckpointRetain
|
||||
};
|
||||
|
||||
enum EGraphicsAPI
|
||||
{
|
||||
EGraphicsAPI_D3D12,
|
||||
EGraphicsAPI_Vulkan
|
||||
};
|
||||
|
||||
enum EMovieScaleMode : uint32_t
|
||||
{
|
||||
EMovieScaleMode_Stretch,
|
||||
|
|
@ -43,12 +49,6 @@ enum EUIScaleMode : uint32_t
|
|||
EUIScaleMode_Centre
|
||||
};
|
||||
|
||||
enum EGraphicsAPI
|
||||
{
|
||||
GraphicsAPI_D3D12,
|
||||
GraphicsAPI_Vulkan
|
||||
};
|
||||
|
||||
class Config
|
||||
{
|
||||
public:
|
||||
|
|
@ -68,7 +68,7 @@ public:
|
|||
inline static bool WerehogBattleMusic = true;
|
||||
|
||||
// Video
|
||||
inline static EGraphicsAPI GraphicsAPI = GraphicsAPI_D3D12;
|
||||
inline static EGraphicsAPI GraphicsAPI = EGraphicsAPI_D3D12;
|
||||
inline static uint32_t WindowWidth = 1280;
|
||||
inline static uint32_t WindowHeight = 720;
|
||||
inline static float ResolutionScale = 1.0f;
|
||||
|
|
|
|||
|
|
@ -545,7 +545,7 @@ static void CreateHostDevice()
|
|||
|
||||
Window::Init();
|
||||
|
||||
g_vulkan = Config::GraphicsAPI == GraphicsAPI_Vulkan;
|
||||
g_vulkan = Config::GraphicsAPI == EGraphicsAPI_Vulkan;
|
||||
|
||||
LoadShaderCache();
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ UnleashCancel = false # Determines whether Unleash can be cancelled b
|
|||
WerehogBattleMusic = true # Determines whether to play the battle theme for enemy encounters as the Werehog.
|
||||
|
||||
[Video]
|
||||
GraphicsAPI = 0 # 0 - D3D12; 1 - Vulkan
|
||||
GraphicsAPI = 0 # 0 - D3D12; 1 - Vulkan.
|
||||
WindowWidth = 1280
|
||||
WindowHeight = 720
|
||||
ResolutionScale = 1.0
|
||||
|
|
|
|||
|
|
@ -87,6 +87,8 @@ void Window::Init()
|
|||
SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE);
|
||||
SDL_AddEventWatch(Window_OnSDLEvent, s_window);
|
||||
|
||||
SetProcessDPIAware();
|
||||
|
||||
s_window = SDL_CreateWindow(title,
|
||||
SDL_WINDOWPOS_CENTERED,
|
||||
SDL_WINDOWPOS_CENTERED,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue