Add hypervisor in Logfile outputs (#92)

* Add hypervisor in logfile outputs

* fix typings

* moved setting

* Check if macos or not

* Replace "Not applicable" with "N/A"

* Add hypervisor setting to embed

---------

Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
This commit is contained in:
Jerome A 2024-05-15 22:58:20 +08:00 committed by GitHub
parent ac3829f508
commit 41bc653bea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View file

@ -144,6 +144,7 @@ class LogFileReader(Cog):
f"**PPTC Cache:** `{analysed_log['settings']['pptc']}`",
f"**Shader Cache:** `{analysed_log['settings']['shader_cache']}`",
f"**V-Sync:** `{analysed_log['settings']['vsync']}`",
f"**Hypervisor:** `{analysed_log['settings']['hypervisor']}`",
)
)

View file

@ -135,8 +135,8 @@ class LogAnalyser:
raise ValueError("No log entries found.")
self.__get_errors()
self.__get_settings_info()
self.__get_hardware_info()
self.__get_settings_info()
self.__get_ryujinx_info()
self.__get_app_name()
self.__get_mods()
@ -173,6 +173,7 @@ class LogAnalyser:
"pptc": "Unknown",
"shader_cache": "Unknown",
"vsync": "Unknown",
"hypervisor": "Unknown",
"resolution_scale": "Unknown",
"anisotropic_filtering": "Unknown",
"aspect_ratio": "Unknown",
@ -341,6 +342,11 @@ class LogAnalyser:
case "pptc" | "shader_cache" | "texture_recompression" | "vsync":
return "Enabled" if value == "True" else "Disabled"
case "hypervisor":
if "mac" in self._hardware_info["os"]:
return "Enabled" if value == "True" else "Disabled"
else:
return "N/A"
case _:
return value
@ -361,6 +367,7 @@ class LogAnalyser:
"shader_cache": "EnableShaderCache",
"texture_recompression": "EnableTextureRecompression",
"vsync": "EnableVsync",
"hypervisor": "UseHypervisor",
}
for key in self._settings.keys():