mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-10-30 07:11:05 +00:00
config: some final adjustments to config types
This commit is contained in:
parent
361cf21681
commit
f1a82ac97e
4 changed files with 34 additions and 5 deletions
|
|
@ -15,7 +15,12 @@ void Config::Load()
|
|||
auto toml = toml::parse_file(configPath.string());
|
||||
|
||||
for (auto def : Definitions)
|
||||
{
|
||||
def->ReadValue(toml);
|
||||
#if _DEBUG
|
||||
printf("%s\n", def->GetDefinition().c_str());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
catch (toml::parse_error& err)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ public:
|
|||
CONFIG_DEFINE("Audio", bool, WerehogBattleMusic, true);
|
||||
|
||||
CONFIG_DEFINE_ENUM("Video", EGraphicsAPI, GraphicsAPI, EGraphicsAPI::D3D12);
|
||||
CONFIG_DEFINE("Video", int32_t, WindowX, -1);
|
||||
CONFIG_DEFINE("Video", int32_t, WindowY, -1);
|
||||
CONFIG_DEFINE("Video", size_t, WindowWidth, 1280);
|
||||
CONFIG_DEFINE("Video", size_t, WindowHeight, 720);
|
||||
|
||||
|
|
@ -36,12 +38,12 @@ public:
|
|||
|
||||
CONFIG_DEFINE("Video", bool, Fullscreen, false);
|
||||
CONFIG_DEFINE("Video", bool, VSync, true);
|
||||
CONFIG_DEFINE("Video", size_t, BufferCount, 3);
|
||||
CONFIG_DEFINE("Video", bool, TripleBuffering, true);
|
||||
CONFIG_DEFINE("Video", int32_t, FPS, 60);
|
||||
CONFIG_DEFINE("Video", float, Brightness, 0.5f);
|
||||
CONFIG_DEFINE("Video", size_t, MSAA, 4);
|
||||
CONFIG_DEFINE("Video", size_t, AnisotropicFiltering, 16);
|
||||
CONFIG_DEFINE("Video", int32_t, ShadowResolution, 4096);
|
||||
CONFIG_DEFINE_ENUM("Video", EShadowResolution, ShadowResolution, EShadowResolution::x4096);
|
||||
CONFIG_DEFINE_ENUM("Video", EGITextureFiltering, GITextureFiltering, EGITextureFiltering::Bicubic);
|
||||
CONFIG_DEFINE("Video", bool, AlphaToCoverage, false);
|
||||
CONFIG_DEFINE("Video", bool, Xbox360ColourCorrection, false);
|
||||
|
|
|
|||
|
|
@ -234,6 +234,26 @@ CONFIG_DEFINE_ENUM_TEMPLATE(EGraphicsAPI)
|
|||
{ "Vulkan", EGraphicsAPI::Vulkan }
|
||||
};
|
||||
|
||||
enum class EShadowResolution : int32_t
|
||||
{
|
||||
Original = -1,
|
||||
x512 = 512,
|
||||
x1024 = 1024,
|
||||
x2048 = 2048,
|
||||
x4096 = 4096,
|
||||
x8192 = 8192
|
||||
};
|
||||
|
||||
CONFIG_DEFINE_ENUM_TEMPLATE(EShadowResolution)
|
||||
{
|
||||
{ "Original", EShadowResolution::Original },
|
||||
{ "512", EShadowResolution::x512 },
|
||||
{ "1024", EShadowResolution::x1024 },
|
||||
{ "2048", EShadowResolution::x2048 },
|
||||
{ "4096", EShadowResolution::x4096 },
|
||||
{ "8192", EShadowResolution::x8192 },
|
||||
};
|
||||
|
||||
enum class EGITextureFiltering : uint32_t
|
||||
{
|
||||
Linear,
|
||||
|
|
|
|||
|
|
@ -581,7 +581,7 @@ static void CreateHostDevice()
|
|||
g_copyCommandList = g_device->createCommandList(RenderCommandListType::COPY);
|
||||
g_copyCommandFence = g_device->createCommandFence();
|
||||
|
||||
g_swapChain = g_queue->createSwapChain(Window::s_windowHandle, 2, RenderFormat::R8G8B8A8_UNORM);
|
||||
g_swapChain = g_queue->createSwapChain(Window::s_windowHandle, Config::TripleBuffering ? 3 : 2, RenderFormat::R8G8B8A8_UNORM);
|
||||
|
||||
for (auto& acquireSemaphore : g_acquireSemaphores)
|
||||
acquireSemaphore = g_device->createCommandSemaphore();
|
||||
|
|
@ -2614,8 +2614,10 @@ void IndexBufferLengthMidAsmHook(PPCRegister& r3)
|
|||
|
||||
void SetShadowResolutionMidAsmHook(PPCRegister& r11)
|
||||
{
|
||||
if (Config::ShadowResolution > 0)
|
||||
r11.u64 = Config::ShadowResolution;
|
||||
auto res = (int32_t)Config::ShadowResolution.Value;
|
||||
|
||||
if (res > 0)
|
||||
r11.u64 = res;
|
||||
}
|
||||
|
||||
void Primitive2DHalfPixelOffsetMidAsmHook(PPCRegister& f13)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue