Minor - Vsync toggle

New Method :

+ Set Vsync
+ Set Screen Width
+ Set Screen Height
+ Get Hwnd
+ Set Hwnd
+ IsWindowed
+ SetWindowed

New UI For Engine Settings :

+ Add Vsync Toggle to UI
This commit is contained in:
2025-01-10 20:43:36 +01:00
parent 79f266b479
commit bce659e55d
8 changed files with 111 additions and 5 deletions

View File

@@ -695,7 +695,8 @@ IDXGISwapChain* D3DClass::GetSwapChain()
void D3DClass::ResizeSwapChain(int newWidth, int newHeight)
{
Logger::Get().Log("Resizing swap chain", __FILE__, __LINE__);
// log the new width and height
Logger::Get().Log("Resizing swap chain to " + std::to_string(newWidth) + "x" + std::to_string(newHeight), __FILE__, __LINE__);
HRESULT result;
@@ -766,3 +767,8 @@ void D3DClass::DisableAlphaBlending()
return;
}
void D3DClass::SetVsync(bool vsync)
{
m_vsync_enabled = vsync;
}