Add optional wgpu feature

This commit is contained in:
2023-01-21 12:56:29 -05:00
parent 8278d5d207
commit 6ee11ca640
4 changed files with 358 additions and 5 deletions

View File

@@ -46,7 +46,10 @@ fn main() {
log::warn!("Failed to load application icon: {}", e);
}
}
// native_options.renderer = eframe::Renderer::Wgpu;
#[cfg(feature = "wgpu")]
{
native_options.renderer = eframe::Renderer::Wgpu;
}
eframe::run_native(
"objdiff",
native_options,

View File

@@ -246,7 +246,7 @@ fn relocations_by_section(
);
match kind {
ObjRelocKind::Absolute => addend as i64,
ObjRelocKind::MipsHi16 => ((addend & 0x0000FFFF) << 16) as i16 as i64,
ObjRelocKind::MipsHi16 => ((addend & 0x0000FFFF) << 16) as i32 as i64,
ObjRelocKind::MipsLo16
| ObjRelocKind::MipsGot16
| ObjRelocKind::MipsCall16