From 7ef71421b0db9881d400142a25ad12ac5d31bb9c Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Sat, 4 Nov 2023 04:08:51 +0100 Subject: [PATCH] add option to apply wine specific settings --- src/config.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/config.c b/src/config.c index b8209a1..397c923 100644 --- a/src/config.c +++ b/src/config.c @@ -1120,6 +1120,22 @@ static DWORD cfg_get_string(LPCSTR key, LPCSTR default_value, LPSTR out_string, { char buf[MAX_PATH] = { 0 }; + if (g_config.is_wine) + { + char section[MAX_PATH] = { 0 }; + _snprintf(section, sizeof(section) - 1, "%s/wine", g_config.process_file_name); + + if (ini_section_exists(&g_config.ini, section)) + { + DWORD x = ini_get_string(&g_config.ini, section, key, "", out_string, out_size); + + if (x > 0) + return x; + + return ini_get_string(&g_config.ini, "ddraw", key, default_value, out_string, out_size); + } + } + DWORD s = ini_get_string(&g_config.ini, g_config.process_file_name, key, "", out_string, out_size); if (s > 0)