Skip to content

Commit 7b99daf

Browse files
committed
Cleanup
1 parent 3dddb72 commit 7b99daf

File tree

2 files changed

+6
-67
lines changed

2 files changed

+6
-67
lines changed

src/fighters.rs

-13
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,6 @@ macro_rules! install_fighters {
77
}}
88
}
99

10-
macro_rules! delayed_install_fighters {
11-
($func:ident; $($name:ident = $feature:expr),*) => {{
12-
$(
13-
#[cfg(feature = $feature)]
14-
{ $name::$func() }
15-
)*
16-
}}
17-
}
18-
1910
pub fn install() {
2011
#[cfg(not(feature = "runtime"))]
2112
{
@@ -53,7 +44,6 @@ pub fn install() {
5344
ken = "ken",
5445
kirby = "kirby",
5546
koopa = "koopa",
56-
koopag = "koopag",
5747
koopajr = "koopajr",
5848
krool = "krool",
5949
link = "link",
@@ -117,6 +107,3 @@ pub fn install() {
117107
zelda = "zelda"
118108
}
119109
}
120-
121-
pub fn delayed_install() {
122-
}

src/lib.rs

+6-54
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,6 @@ pub fn smashline_install() {
4141
fighters::install();
4242
}
4343

44-
#[cfg(not(feature = "main_nro"))]
45-
#[export_name = "hdr_delayed_install"]
46-
pub fn delayed_install() {
47-
fighters::delayed_install();
48-
}
49-
50-
#[cfg(feature = "add_status")]
51-
extern "Rust" {
52-
#[link_name = "hdr_delayed_install"]
53-
fn delayed_install();
54-
}
55-
5644
#[cfg(feature = "main_nro")]
5745
#[export_name = "hdr_is_available"]
5846
pub fn is_available() -> bool {
@@ -407,7 +395,6 @@ pub extern "C" fn main() {
407395
//game_end,
408396
//game_exit
409397
);
410-
fighters::install();
411398
}
412399

413400
#[cfg(not(feature = "runtime"))]
@@ -423,22 +410,6 @@ pub extern "C" fn main() {
423410
}
424411

425412
fighters::install();
426-
#[cfg(all(not(feature = "add_status"), feature = "main_nro"))]
427-
{
428-
if !(delayed_install as *const ()).is_null() {
429-
unsafe {
430-
delayed_install();
431-
}
432-
}
433-
}
434-
435-
#[cfg(all(
436-
feature = "add_status",
437-
not(all(not(feature = "add_status"), feature = "main_nro"))
438-
))]
439-
{
440-
fighters::delayed_install();
441-
}
442413

443414
#[cfg(feature = "updater")]
444415
{
@@ -483,18 +454,18 @@ pub fn setup_hid_hdr() {
483454

484455
#[cfg(feature = "main_nro")]
485456
pub fn quick_validate_install() {
486-
let has_smashline_hook = Path::new(
487-
"sd:/atmosphere/contents/01006a800016e000/romfs/skyline/plugins/libsmashline_hook.nro",
457+
let has_smashline_plugin = Path::new(
458+
"sd:/atmosphere/contents/01006a800016e000/romfs/skyline/plugins/libsmashline_plugin.nro",
488459
)
489460
.is_file();
490-
if has_smashline_hook {
491-
println!("libsmashline_hook.nro is present");
461+
if has_smashline_plugin {
462+
println!("libsmashline_plugin.nro is present");
492463
} else {
493464
if is_on_ryujinx() {
494-
println!("No libsmashline_hook.nro found! We will likely crash.");
465+
println!("No libsmashline_plugin.nro found! We will likely crash.");
495466
} else {
496467
skyline_web::dialog_ok::DialogOk::ok(
497-
"No libsmashline_hook.nro found! We will likely crash.",
468+
"No libsmashline_plugin.nro found! We will likely crash.",
498469
);
499470
}
500471
}
@@ -526,25 +497,6 @@ pub fn quick_validate_install() {
526497
}
527498
}
528499

529-
let has_smashline_development_hook = Path::new("sd:/atmosphere/contents/01006a800016e000/romfs/skyline/plugins/libsmashline_hook_development.nro").is_file();
530-
if has_smashline_development_hook {
531-
if is_on_ryujinx() {
532-
println!("libsmashline_hook_development.nro found! This will conflict with hdr! Expect a crash soon.");
533-
} else {
534-
let should_delete = skyline_web::dialog::Dialog::yes_no("libsmashline_hook_development.nro found! This will conflict with hdr! Would you like to delete it?");
535-
if should_delete {
536-
fs::remove_file("sd:/atmosphere/contents/01006a800016e000/romfs/skyline/plugins/libsmashline_hook_development.nro");
537-
unsafe {
538-
skyline::nn::oe::RequestToRelaunchApplication();
539-
}
540-
} else {
541-
skyline_web::dialog_ok::DialogOk::ok(
542-
"Warning, we will likely crash soon because of this conflict.",
543-
);
544-
}
545-
}
546-
}
547-
548500
let has_development_nro =
549501
Path::new("sd:/atmosphere/contents/01006a800016e000/romfs/smashline/development.nro")
550502
.is_file();

0 commit comments

Comments
 (0)