mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-01 16:24:12 +01:00
[util] Improve logging of configuration options
This commit is contained in:
parent
4439f94955
commit
d4947261c6
@ -13,6 +13,7 @@ namespace dxvk {
|
||||
|
||||
m_config = Config::getUserConfig();
|
||||
m_config.merge(Config::getAppConfig(env::getExeName()));
|
||||
m_config.logOptions();
|
||||
|
||||
g_vrInstance.initInstanceExtensions();
|
||||
|
||||
|
@ -13,7 +13,7 @@ namespace dxvk {
|
||||
const static std::unordered_map<std::string, Config> g_appDefaults = {{
|
||||
/* Assassin's Creed Syndicate - amdags issues */
|
||||
{ "ACS.exe", {{
|
||||
{ "dxgi.customVendorId", "10DE" },
|
||||
{ "dxgi.customVendorId", "10de" },
|
||||
}} },
|
||||
/* Dishonored 2 */
|
||||
{ "Dishonored2.exe", {{
|
||||
@ -22,7 +22,7 @@ namespace dxvk {
|
||||
/* Dragon Quest 2 - keeps searching for NVAPI */
|
||||
{ "DRAGON QUEST XI.exe", {{
|
||||
{ "dxgi.customVendorId", "1002" },
|
||||
{ "dxgi.customDeviceId", "E366" },
|
||||
{ "dxgi.customDeviceId", "e366" },
|
||||
}} },
|
||||
/* F1 2015 */
|
||||
{ "F1_2015.exe", {{
|
||||
@ -43,12 +43,12 @@ namespace dxvk {
|
||||
/* Grand Theft Auto V */
|
||||
{ "GTA5.exe", {{
|
||||
{ "dxgi.customVendorId", "1002" },
|
||||
{ "dxgi.customDeviceId", "E366" },
|
||||
{ "dxgi.customDeviceId", "e366" },
|
||||
}} },
|
||||
/* Batman: Arkham Knight */
|
||||
{ "BatmanAK.exe", {{
|
||||
{ "dxgi.customVendorId", "1002" },
|
||||
{ "dxgi.customDeviceId", "E366" },
|
||||
{ "dxgi.customDeviceId", "e366" },
|
||||
}} },
|
||||
/* Mafia 3 */
|
||||
{ "mafia3.exe", {{
|
||||
@ -188,8 +188,13 @@ namespace dxvk {
|
||||
|
||||
Config Config::getAppConfig(const std::string& appName) {
|
||||
auto appConfig = g_appDefaults.find(appName);
|
||||
if (appConfig != g_appDefaults.end())
|
||||
if (appConfig != g_appDefaults.end()) {
|
||||
// Inform the user that we loaded a default config
|
||||
Logger::info(str::format("Found built-in config: ", appName));
|
||||
|
||||
return appConfig->second;
|
||||
}
|
||||
|
||||
return Config();
|
||||
}
|
||||
|
||||
@ -222,4 +227,14 @@ namespace dxvk {
|
||||
return config;
|
||||
}
|
||||
|
||||
|
||||
void Config::logOptions() const {
|
||||
if (!m_options.empty()) {
|
||||
Logger::info("Effective configuration:");
|
||||
|
||||
for (auto& pair : m_options)
|
||||
Logger::info(str::format(" ", pair.first, " = ", pair.second));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -65,6 +65,14 @@ namespace dxvk {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Logs option values
|
||||
*
|
||||
* Prints the effective configuration
|
||||
* to the log for debugging purposes.
|
||||
*/
|
||||
void logOptions() const;
|
||||
|
||||
/**
|
||||
* \brief Retrieves default options for an app
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user