Demangle function name on decomp.me scratch creation (#329)

This commit is contained in:
Sebastián Meljem
2026-03-08 14:14:24 -03:00
committed by GitHub
parent 2541aef71a
commit 16fb6a491f
2 changed files with 11 additions and 1 deletions
+10 -1
View File
@@ -5,6 +5,7 @@ use typed_path::{Utf8PlatformPathBuf, Utf8UnixPathBuf};
use crate::{
build::{BuildConfig, BuildStatus, run_make},
diff::Demangler,
jobs::{Job, JobContext, JobResult, JobState, start_job, update_status},
};
@@ -21,6 +22,7 @@ pub struct CreateScratchConfig {
pub function_name: String,
pub target_obj: Utf8PlatformPathBuf,
pub preset_id: Option<u32>,
pub demangler: Demangler,
}
#[derive(Default, Debug, Clone)]
@@ -74,7 +76,14 @@ fn run_create_scratch(
.text("diff_label", config.function_name.clone())
.text("diff_flags", diff_flags)
.text("context", context.unwrap_or_default())
.text("source_code", "// Move related code from Context tab to here");
.text("source_code", "// Move related code from Context tab to here")
.text(
"name",
config
.demangler
.demangle(&config.function_name)
.unwrap_or_else(|| config.function_name.clone()),
);
if let Some(preset) = config.preset_id {
form = form.text("preset", preset.to_string());
}
+1
View File
@@ -75,6 +75,7 @@ fn create_scratch_config(
function_name,
target_obj: target_path.clone(),
preset_id: scratch_config.preset_id,
demangler: state.effective_diff_config().demangler,
})
}