Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hypervisor in Logfile outputs #92

Merged
merged 6 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions robocop_ng/cogs/logfilereader.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ def format_analysed_log(self, author_name: str, analysed_log):
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']}`",
)
)

Expand Down
9 changes: 8 additions & 1 deletion robocop_ng/helpers/ryujinx_log_analyser.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ def __init__(self, log_text: Union[str, list[str]]):
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()
Expand Down Expand Up @@ -173,6 +173,7 @@ def __init_members(self):
"pptc": "Unknown",
"shader_cache": "Unknown",
"vsync": "Unknown",
"hypervisor": "Unknown",
"resolution_scale": "Unknown",
"anisotropic_filtering": "Unknown",
"aspect_ratio": "Unknown",
Expand Down Expand Up @@ -341,6 +342,11 @@ def __get_setting_value(self, name, key):
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

Expand All @@ -361,6 +367,7 @@ def __get_settings_info(self):
"shader_cache": "EnableShaderCache",
"texture_recompression": "EnableTextureRecompression",
"vsync": "EnableVsync",
"hypervisor": "UseHypervisor",
}

for key in self._settings.keys():
Expand Down