From 6023acd300c36216a0b0bf4d97501ef97c0377ad Mon Sep 17 00:00:00 2001 From: hyugogirubato <65763543+hyugogirubato@users.noreply.github.com> Date: Sat, 21 Jun 2025 16:23:40 +0200 Subject: [PATCH] add rollback symbols usage --- keydive/core.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/keydive/core.py b/keydive/core.py index 3796a43..d033e51 100644 --- a/keydive/core.py +++ b/keydive/core.py @@ -454,13 +454,18 @@ class Core(Remote): 'For OEM API > 17, the "--symbols" option is required. ' 'Refer to: https://github.com/hyugogirubato/KeyDive/blob/main/docs/FUNCTIONS.md' ) - self._server.dialog = True # Determine whether to enable dynamic symbol resolution based on server and vendor context dynamic = self._server.features and vendor.min_oem[0] > 17 and not self._resolved # Attempt to hook into the identified library with or without dynamic symbols - return script.exports_sync.hooklibrary(library['name'], dynamic) + status = script.exports_sync.hooklibrary(library['name'], dynamic) + if not (self._server.dialog or status or self._resolved) and self.sdk > 33: + # https://github.com/hyugogirubato/KeyDive/issues/60 + self.logger.warning('Detection without symbols failed, try again with the "--symbols" option.') + + self._server.dialog = True + return status # If the expected library was not found, clean up and notify the user script.unload()