mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 21:01:37 +00:00
Remove triple buffering from options menu, turn it to an enum.
This commit is contained in:
parent
0f5b71f1d5
commit
e3f7eba9a6
5 changed files with 31 additions and 8 deletions
|
|
@ -51,7 +51,7 @@ public:
|
||||||
});
|
});
|
||||||
|
|
||||||
CONFIG_DEFINE_LOCALISED("Video", bool, VSync, true);
|
CONFIG_DEFINE_LOCALISED("Video", bool, VSync, true);
|
||||||
CONFIG_DEFINE_LOCALISED("Video", bool, TripleBuffering, true);
|
CONFIG_DEFINE_ENUM("Video", ETripleBuffering, TripleBuffering, ETripleBuffering::Auto);
|
||||||
CONFIG_DEFINE_LOCALISED("Video", int32_t, FPS, 60);
|
CONFIG_DEFINE_LOCALISED("Video", int32_t, FPS, 60);
|
||||||
CONFIG_DEFINE_LOCALISED("Video", float, Brightness, 0.5f);
|
CONFIG_DEFINE_LOCALISED("Video", float, Brightness, 0.5f);
|
||||||
CONFIG_DEFINE_ENUM_LOCALISED("Video", EAntiAliasing, AntiAliasing, EAntiAliasing::MSAA4x);
|
CONFIG_DEFINE_ENUM_LOCALISED("Video", EAntiAliasing, AntiAliasing, EAntiAliasing::MSAA4x);
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,20 @@ CONFIG_DEFINE_ENUM_TEMPLATE(EAspectRatio)
|
||||||
{ "16:9", EAspectRatio::Widescreen }
|
{ "16:9", EAspectRatio::Widescreen }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class ETripleBuffering : uint32_t
|
||||||
|
{
|
||||||
|
Auto,
|
||||||
|
On,
|
||||||
|
Off
|
||||||
|
};
|
||||||
|
|
||||||
|
CONFIG_DEFINE_ENUM_TEMPLATE(ETripleBuffering)
|
||||||
|
{
|
||||||
|
{ "Auto", ETripleBuffering::Auto },
|
||||||
|
{ "On", ETripleBuffering::On },
|
||||||
|
{ "Off", ETripleBuffering::Off }
|
||||||
|
};
|
||||||
|
|
||||||
enum class EAntiAliasing : uint32_t
|
enum class EAntiAliasing : uint32_t
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
|
|
|
||||||
|
|
@ -1149,7 +1149,22 @@ static void CreateHostDevice()
|
||||||
g_copyCommandList = g_device->createCommandList(RenderCommandListType::COPY);
|
g_copyCommandList = g_device->createCommandList(RenderCommandListType::COPY);
|
||||||
g_copyCommandFence = g_device->createCommandFence();
|
g_copyCommandFence = g_device->createCommandFence();
|
||||||
|
|
||||||
g_swapChain = g_queue->createSwapChain(Window::s_handle, Config::TripleBuffering ? 3 : 2, BACKBUFFER_FORMAT);
|
uint32_t bufferCount = 2;
|
||||||
|
|
||||||
|
switch (Config::TripleBuffering)
|
||||||
|
{
|
||||||
|
case ETripleBuffering::Auto:
|
||||||
|
bufferCount = g_vulkan ? 2 : 3; // Defaulting to 3 is fine on D3D12 thanks to flip discard model.
|
||||||
|
break;
|
||||||
|
case ETripleBuffering::On:
|
||||||
|
bufferCount = 3;
|
||||||
|
break;
|
||||||
|
case ETripleBuffering::Off:
|
||||||
|
bufferCount = 2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_swapChain = g_queue->createSwapChain(Window::s_handle, bufferCount, BACKBUFFER_FORMAT);
|
||||||
g_swapChain->setVsyncEnabled(Config::VSync);
|
g_swapChain->setVsyncEnabled(Config::VSync);
|
||||||
g_swapChainValid = !g_swapChain->needsResize();
|
g_swapChainValid = !g_swapChain->needsResize();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -222,11 +222,6 @@ CONFIG_DEFINE_LOCALE(VSync)
|
||||||
{ ELanguage::English, { "V-Sync", "[PLACEHOLDER]" } }
|
{ ELanguage::English, { "V-Sync", "[PLACEHOLDER]" } }
|
||||||
};
|
};
|
||||||
|
|
||||||
CONFIG_DEFINE_LOCALE(TripleBuffering)
|
|
||||||
{
|
|
||||||
{ ELanguage::English, { "Triple Buffering", "[PLACEHOLDER]" } }
|
|
||||||
};
|
|
||||||
|
|
||||||
CONFIG_DEFINE_LOCALE(FPS)
|
CONFIG_DEFINE_LOCALE(FPS)
|
||||||
{
|
{
|
||||||
{ ELanguage::English, { "FPS", "[PLACEHOLDER]" } }
|
{ ELanguage::English, { "FPS", "[PLACEHOLDER]" } }
|
||||||
|
|
|
||||||
|
|
@ -877,7 +877,6 @@ static void DrawConfigOptions()
|
||||||
DrawConfigOption(rowCount++, yOffset, &Config::ResolutionScale, true, nullptr, 0.25f, 1.0f, 2.0f);
|
DrawConfigOption(rowCount++, yOffset, &Config::ResolutionScale, true, nullptr, 0.25f, 1.0f, 2.0f);
|
||||||
DrawConfigOption(rowCount++, yOffset, &Config::Fullscreen, true);
|
DrawConfigOption(rowCount++, yOffset, &Config::Fullscreen, true);
|
||||||
DrawConfigOption(rowCount++, yOffset, &Config::VSync, true);
|
DrawConfigOption(rowCount++, yOffset, &Config::VSync, true);
|
||||||
DrawConfigOption(rowCount++, yOffset, &Config::TripleBuffering, true);
|
|
||||||
DrawConfigOption(rowCount++, yOffset, &Config::FPS, true, nullptr, 15, 120, 240);
|
DrawConfigOption(rowCount++, yOffset, &Config::FPS, true, nullptr, 15, 120, 240);
|
||||||
DrawConfigOption(rowCount++, yOffset, &Config::Brightness, true);
|
DrawConfigOption(rowCount++, yOffset, &Config::Brightness, true);
|
||||||
DrawConfigOption(rowCount++, yOffset, &Config::AntiAliasing, true);
|
DrawConfigOption(rowCount++, yOffset, &Config::AntiAliasing, true);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue