From bd6dc5988a4c07b9e258f61eb1dadb6db761f34e Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Wed, 27 Nov 2024 21:05:07 -0500 Subject: [PATCH 1/6] Fix missing dependency feature for objdiff-gui --- objdiff-gui/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/objdiff-gui/Cargo.toml b/objdiff-gui/Cargo.toml index aac8873..555872f 100644 --- a/objdiff-gui/Cargo.toml +++ b/objdiff-gui/Cargo.toml @@ -95,7 +95,7 @@ exec = "0.3" # native: [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -tracing-subscriber = "0.3" +tracing-subscriber = { version = "0.3", features = ["env-filter"] } # web: [target.'cfg(target_arch = "wasm32")'.dependencies] From 8150f9832cec91b1369e96a2e5e9481b9b921ad9 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Thu, 28 Nov 2024 16:19:17 -0500 Subject: [PATCH 2/6] Update .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c46c7cc..e4a9258 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,4 @@ android.keystore *.frag *.vert *.metal -.vscode/launch.json +.vscode/ From 1f6b4ac8c49365948fa52214953260f6b0a3ef60 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Sun, 1 Dec 2024 20:27:56 -0500 Subject: [PATCH 3/6] Display decoded rlwinm info to hover tooltip --- objdiff-gui/src/views/function_diff.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/objdiff-gui/src/views/function_diff.rs b/objdiff-gui/src/views/function_diff.rs index dde736e..e93f5cc 100644 --- a/objdiff-gui/src/views/function_diff.rs +++ b/objdiff-gui/src/views/function_diff.rs @@ -149,6 +149,10 @@ fn ins_hover_ui( ui.colored_label(appearance.highlight_color, "Extern".to_string()); } } + + if let Some(demangled) = rlwinmdec::decode(&ins.formatted) { + ui.colored_label(appearance.highlight_color, &demangled); + } }); } From c0e9af54a5382d5c60c40371f1ad641b449cb0c7 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Sun, 1 Dec 2024 20:34:48 -0500 Subject: [PATCH 4/6] Remove trailing newline when displaying decoded rlwinm info --- objdiff-gui/src/views/function_diff.rs | 2 +- objdiff-gui/src/views/rlwinm.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/objdiff-gui/src/views/function_diff.rs b/objdiff-gui/src/views/function_diff.rs index e93f5cc..f40858b 100644 --- a/objdiff-gui/src/views/function_diff.rs +++ b/objdiff-gui/src/views/function_diff.rs @@ -151,7 +151,7 @@ fn ins_hover_ui( } if let Some(demangled) = rlwinmdec::decode(&ins.formatted) { - ui.colored_label(appearance.highlight_color, &demangled); + ui.colored_label(appearance.highlight_color, demangled.trim()); } }); } diff --git a/objdiff-gui/src/views/rlwinm.rs b/objdiff-gui/src/views/rlwinm.rs index 08b9354..63b9ca5 100644 --- a/objdiff-gui/src/views/rlwinm.rs +++ b/objdiff-gui/src/views/rlwinm.rs @@ -19,7 +19,7 @@ pub fn rlwinm_decode_window( if let Some(demangled) = rlwinmdec::decode(&state.text) { ui.scope(|ui| { ui.style_mut().override_text_style = Some(TextStyle::Monospace); - ui.colored_label(appearance.replace_color, &demangled); + ui.colored_label(appearance.replace_color, demangled.trim()); }); if ui.button("Copy").clicked() { ui.output_mut(|output| output.copied_text = demangled); From d773b8c14f0ce1b5c5c078dd342eeb8607289697 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Mon, 2 Dec 2024 00:59:22 -0500 Subject: [PATCH 5/6] Change variable name Co-authored-by: Luke Street --- objdiff-gui/src/views/function_diff.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/objdiff-gui/src/views/function_diff.rs b/objdiff-gui/src/views/function_diff.rs index f40858b..a412649 100644 --- a/objdiff-gui/src/views/function_diff.rs +++ b/objdiff-gui/src/views/function_diff.rs @@ -150,8 +150,8 @@ fn ins_hover_ui( } } - if let Some(demangled) = rlwinmdec::decode(&ins.formatted) { - ui.colored_label(appearance.highlight_color, demangled.trim()); + if let Some(decoded) = rlwinmdec::decode(&ins.formatted) { + ui.colored_label(appearance.highlight_color, decoded.trim()); } }); } From 6f05b6b964a75c2f7df8453fb5d46e119ccf2814 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Mon, 2 Dec 2024 01:10:18 -0500 Subject: [PATCH 6/6] Also update variable name in rlwinm.rs --- objdiff-gui/src/views/rlwinm.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/objdiff-gui/src/views/rlwinm.rs b/objdiff-gui/src/views/rlwinm.rs index 63b9ca5..780708a 100644 --- a/objdiff-gui/src/views/rlwinm.rs +++ b/objdiff-gui/src/views/rlwinm.rs @@ -16,13 +16,13 @@ pub fn rlwinm_decode_window( egui::Window::new("Rlwinm Decoder").open(show).show(ctx, |ui| { ui.text_edit_singleline(&mut state.text); ui.add_space(10.0); - if let Some(demangled) = rlwinmdec::decode(&state.text) { + if let Some(decoded) = rlwinmdec::decode(&state.text) { ui.scope(|ui| { ui.style_mut().override_text_style = Some(TextStyle::Monospace); - ui.colored_label(appearance.replace_color, demangled.trim()); + ui.colored_label(appearance.replace_color, decoded.trim()); }); if ui.button("Copy").clicked() { - ui.output_mut(|output| output.copied_text = demangled); + ui.output_mut(|output| output.copied_text = decoded); } } else { ui.scope(|ui| {