mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +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 = Config::getUserConfig();
|
||||||
m_config.merge(Config::getAppConfig(env::getExeName()));
|
m_config.merge(Config::getAppConfig(env::getExeName()));
|
||||||
|
m_config.logOptions();
|
||||||
|
|
||||||
g_vrInstance.initInstanceExtensions();
|
g_vrInstance.initInstanceExtensions();
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ namespace dxvk {
|
|||||||
const static std::unordered_map<std::string, Config> g_appDefaults = {{
|
const static std::unordered_map<std::string, Config> g_appDefaults = {{
|
||||||
/* Assassin's Creed Syndicate - amdags issues */
|
/* Assassin's Creed Syndicate - amdags issues */
|
||||||
{ "ACS.exe", {{
|
{ "ACS.exe", {{
|
||||||
{ "dxgi.customVendorId", "10DE" },
|
{ "dxgi.customVendorId", "10de" },
|
||||||
}} },
|
}} },
|
||||||
/* Dishonored 2 */
|
/* Dishonored 2 */
|
||||||
{ "Dishonored2.exe", {{
|
{ "Dishonored2.exe", {{
|
||||||
@ -22,7 +22,7 @@ namespace dxvk {
|
|||||||
/* Dragon Quest 2 - keeps searching for NVAPI */
|
/* Dragon Quest 2 - keeps searching for NVAPI */
|
||||||
{ "DRAGON QUEST XI.exe", {{
|
{ "DRAGON QUEST XI.exe", {{
|
||||||
{ "dxgi.customVendorId", "1002" },
|
{ "dxgi.customVendorId", "1002" },
|
||||||
{ "dxgi.customDeviceId", "E366" },
|
{ "dxgi.customDeviceId", "e366" },
|
||||||
}} },
|
}} },
|
||||||
/* F1 2015 */
|
/* F1 2015 */
|
||||||
{ "F1_2015.exe", {{
|
{ "F1_2015.exe", {{
|
||||||
@ -43,12 +43,12 @@ namespace dxvk {
|
|||||||
/* Grand Theft Auto V */
|
/* Grand Theft Auto V */
|
||||||
{ "GTA5.exe", {{
|
{ "GTA5.exe", {{
|
||||||
{ "dxgi.customVendorId", "1002" },
|
{ "dxgi.customVendorId", "1002" },
|
||||||
{ "dxgi.customDeviceId", "E366" },
|
{ "dxgi.customDeviceId", "e366" },
|
||||||
}} },
|
}} },
|
||||||
/* Batman: Arkham Knight */
|
/* Batman: Arkham Knight */
|
||||||
{ "BatmanAK.exe", {{
|
{ "BatmanAK.exe", {{
|
||||||
{ "dxgi.customVendorId", "1002" },
|
{ "dxgi.customVendorId", "1002" },
|
||||||
{ "dxgi.customDeviceId", "E366" },
|
{ "dxgi.customDeviceId", "e366" },
|
||||||
}} },
|
}} },
|
||||||
/* Mafia 3 */
|
/* Mafia 3 */
|
||||||
{ "mafia3.exe", {{
|
{ "mafia3.exe", {{
|
||||||
@ -188,8 +188,13 @@ namespace dxvk {
|
|||||||
|
|
||||||
Config Config::getAppConfig(const std::string& appName) {
|
Config Config::getAppConfig(const std::string& appName) {
|
||||||
auto appConfig = g_appDefaults.find(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 appConfig->second;
|
||||||
|
}
|
||||||
|
|
||||||
return Config();
|
return Config();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,4 +227,14 @@ namespace dxvk {
|
|||||||
return config;
|
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;
|
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
|
* \brief Retrieves default options for an app
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user