mirror of
https://github.com/Ryujinx/ryuko-ng.git
synced 2024-12-22 20:25:34 +00:00
Remove RAM warning and show available RAM under general info as well (#77)
* Remove stub logs from default log levels * Remove RAM warning * Show available and total RAM under general info
This commit is contained in:
parent
c33f4f29a2
commit
04add0f364
|
@ -29,7 +29,6 @@ class LogAnalyser:
|
|||
_log_text: str
|
||||
_log_errors: list[list[str]]
|
||||
_hardware_info: dict[str, Optional[str]]
|
||||
_ram_available_mib: int
|
||||
_emu_info: dict[str, Optional[str]]
|
||||
_game_info: dict[str, Optional[str]]
|
||||
_settings: dict[str, Optional[str]]
|
||||
|
@ -178,7 +177,6 @@ class LogAnalyser:
|
|||
"aspect_ratio": "Unknown",
|
||||
"texture_recompression": "Unknown",
|
||||
}
|
||||
self._ram_available_mib = -1
|
||||
self._notes = []
|
||||
self._log_errors = []
|
||||
|
||||
|
@ -222,14 +220,16 @@ class LogAnalyser:
|
|||
if ram_match.group(4) == "GB":
|
||||
ram_available *= 1024
|
||||
|
||||
ram_total = float(ram_match.group(1))
|
||||
if ram_match.group(2) == "GB":
|
||||
ram_total *= 1024
|
||||
|
||||
self._hardware_info[
|
||||
setting
|
||||
] = f"{ram_match.group(1)} {ram_match.group(2)}"
|
||||
self._ram_available_mib = int(ram_available)
|
||||
] = f"{ram_available}/{ram_total} MiB"
|
||||
except ValueError:
|
||||
# ram_match.group(3) couldn't be parsed as a float.
|
||||
# ram_match.group(1) or ram_match.group(3) couldn't be parsed as a float.
|
||||
self._hardware_info[setting] = "Error"
|
||||
self._ram_available_mib = -1
|
||||
|
||||
case "os":
|
||||
os_match = re.search(
|
||||
|
@ -422,7 +422,7 @@ class LogAnalyser:
|
|||
)
|
||||
|
||||
def __get_log_notes(self):
|
||||
default_logs = ["Info", "Warning", "Error", "Guest", "Stub"]
|
||||
default_logs = ["Info", "Warning", "Error", "Guest"]
|
||||
user_logs = []
|
||||
if self._emu_info["logs_enabled"] is not None:
|
||||
user_logs = (
|
||||
|
@ -548,11 +548,6 @@ class LogAnalyser:
|
|||
"⚠️ Default user profile in use, consider creating a custom one."
|
||||
)
|
||||
|
||||
if 8192 > self._ram_available_mib > -1:
|
||||
self._notes.append(
|
||||
f"⚠️ Less than 8GB RAM available ({self._ram_available_mib} MB)"
|
||||
)
|
||||
|
||||
self.__get_controller_notes()
|
||||
self.__get_os_notes()
|
||||
|
||||
|
|
Loading…
Reference in a new issue