mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 12:51:42 +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
|
EScoreBehaviour_CheckpointRetain
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum EGraphicsAPI
|
||||||
|
{
|
||||||
|
EGraphicsAPI_D3D12,
|
||||||
|
EGraphicsAPI_Vulkan
|
||||||
|
};
|
||||||
|
|
||||||
enum EMovieScaleMode : uint32_t
|
enum EMovieScaleMode : uint32_t
|
||||||
{
|
{
|
||||||
EMovieScaleMode_Stretch,
|
EMovieScaleMode_Stretch,
|
||||||
|
|
@ -43,12 +49,6 @@ enum EUIScaleMode : uint32_t
|
||||||
EUIScaleMode_Centre
|
EUIScaleMode_Centre
|
||||||
};
|
};
|
||||||
|
|
||||||
enum EGraphicsAPI
|
|
||||||
{
|
|
||||||
GraphicsAPI_D3D12,
|
|
||||||
GraphicsAPI_Vulkan
|
|
||||||
};
|
|
||||||
|
|
||||||
class Config
|
class Config
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
@ -68,7 +68,7 @@ public:
|
||||||
inline static bool WerehogBattleMusic = true;
|
inline static bool WerehogBattleMusic = true;
|
||||||
|
|
||||||
// Video
|
// Video
|
||||||
inline static EGraphicsAPI GraphicsAPI = GraphicsAPI_D3D12;
|
inline static EGraphicsAPI GraphicsAPI = EGraphicsAPI_D3D12;
|
||||||
inline static uint32_t WindowWidth = 1280;
|
inline static uint32_t WindowWidth = 1280;
|
||||||
inline static uint32_t WindowHeight = 720;
|
inline static uint32_t WindowHeight = 720;
|
||||||
inline static float ResolutionScale = 1.0f;
|
inline static float ResolutionScale = 1.0f;
|
||||||
|
|
|
||||||
|
|
@ -545,7 +545,7 @@ static void CreateHostDevice()
|
||||||
|
|
||||||
Window::Init();
|
Window::Init();
|
||||||
|
|
||||||
g_vulkan = Config::GraphicsAPI == GraphicsAPI_Vulkan;
|
g_vulkan = Config::GraphicsAPI == EGraphicsAPI_Vulkan;
|
||||||
|
|
||||||
LoadShaderCache();
|
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.
|
WerehogBattleMusic = true # Determines whether to play the battle theme for enemy encounters as the Werehog.
|
||||||
|
|
||||||
[Video]
|
[Video]
|
||||||
GraphicsAPI = 0 # 0 - D3D12; 1 - Vulkan
|
GraphicsAPI = 0 # 0 - D3D12; 1 - Vulkan.
|
||||||
WindowWidth = 1280
|
WindowWidth = 1280
|
||||||
WindowHeight = 720
|
WindowHeight = 720
|
||||||
ResolutionScale = 1.0
|
ResolutionScale = 1.0
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,8 @@ void Window::Init()
|
||||||
SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE);
|
SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE);
|
||||||
SDL_AddEventWatch(Window_OnSDLEvent, s_window);
|
SDL_AddEventWatch(Window_OnSDLEvent, s_window);
|
||||||
|
|
||||||
|
SetProcessDPIAware();
|
||||||
|
|
||||||
s_window = SDL_CreateWindow(title,
|
s_window = SDL_CreateWindow(title,
|
||||||
SDL_WINDOWPOS_CENTERED,
|
SDL_WINDOWPOS_CENTERED,
|
||||||
SDL_WINDOWPOS_CENTERED,
|
SDL_WINDOWPOS_CENTERED,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue