Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Updates #591

Merged
merged 4 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,8 @@ config = { path = "crates/config" }
menus = { path = "crates/menus", optional = true }

[patch.crates-io]
nnsdk = { git = "https://github.com/ultimate-research/nnsdk-rs"}
# Specifying latest commit because git only doesn't use latest changes
native-tls = { git = "https://github.com/skyline-rs/rust-native-tls", rev = "f202fca" }
crc32fast = { git = "https://github.com/srijs/rust-crc32fast", rev = "e9c65bd" }

[features]
default = ["online", "ui"]
Expand Down
2 changes: 1 addition & 1 deletion crates/menus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = "2021"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml = "0.5.11"
skyline-web = "0.1"
skyline-web = { git = "https://github.com/skyline-rs/skyline-web" }
skyline-config = { git = "https://github.com/skyline-rs/skyline-config" }
log = "0.4.19"
smash-arc = { git = "https://github.com/jam1garner/smash-arc" }
Expand Down
6 changes: 3 additions & 3 deletions crates/menus/src/arcadia/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pub fn get_mods(presets: &HashSet<Hash40>) -> Vec<Entry> {
description: Some(res.description.unwrap_or_default().replace('\n', "<br />")),
},
Err(e) => {
skyline_web::DialogOk::ok(format!("The following info.toml is not valid: \n\n* '{}'\n\nError: {}", folder_name, e,));
skyline_web::dialog_ok::DialogOk::ok(format!("The following info.toml is not valid: \n\n* '{}'\n\nError: {}", folder_name, e,));
default_entry
},
};
Expand All @@ -100,7 +100,7 @@ pub fn show_arcadia(workspace: Option<String>) {
let umm_path = utils::paths::mods();

if !umm_path.exists() {
skyline_web::DialogOk::ok("It seems the directory specified in your configuration does not exist.");
skyline_web::dialog_ok::DialogOk::ok("It seems the directory specified in your configuration does not exist.");
return;
}
let workspace_name: String =
Expand Down Expand Up @@ -215,7 +215,7 @@ pub fn show_arcadia(workspace: Option<String>) {
if new_presets != presets {
// Acquire the filesystem so we can check if it's already finished or not (for boot-time mod manager)
// if let Some(_filesystem) = crate::GLOBAL_FILESYSTEM.try_read() {
if active_workspace.eq(&workspace_name) && skyline_web::Dialog::yes_no("Your preset has successfully been updated!<br>Your changes will take effect on the next boot.<br>Would you like to reboot the game to reload your mods?") {
if active_workspace.eq(&workspace_name) && skyline_web::dialog::Dialog::yes_no("Your preset has successfully been updated!<br>Your changes will take effect on the next boot.<br>Would you like to reboot the game to reload your mods?") {
unsafe { skyline::nn::oe::RequestToRelaunchApplication() };
}
// }
Expand Down
2 changes: 1 addition & 1 deletion crates/menus/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ pub fn show_config_editor<CS: ConfigStorage>(storage: &mut StorageHolder<CS>) {
storage.flush();

if reboot_required {
skyline_web::DialogOk::ok(
skyline_web::dialog_ok::DialogOk::ok(
"Some important fields in the configuration have been changed. <br>Smash will now reboot to reload ARCropolis with the new changes.",
);
unsafe { skyline::nn::oe::RequestToRelaunchApplication() };
Expand Down
2 changes: 1 addition & 1 deletion crates/menus/src/workspaces/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ pub fn show_workspaces() {

if active_workspace.ne(&prev_set_workspace) {
// if let Some(_filesystem) = crate::GLOBAL_FILESYSTEM.try_read() {
if skyline_web::Dialog::yes_no(format!("Your active workspace has successfully been changed to {}!<br>Your changes will take effect on the next boot.<br>Would you like to reboot the game to reload your mods?", active_workspace)) {
if skyline_web::dialog::Dialog::yes_no(format!("Your active workspace has successfully been changed to {}!<br>Your changes will take effect on the next boot.<br>Would you like to reboot the game to reload your mods?", active_workspace)) {
unsafe { skyline::nn::oe::RequestToRelaunchApplication() };
}
// }
Expand Down
6 changes: 3 additions & 3 deletions src/api/lua.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::lua::lua::{lua_state, luaL_Reg_container, luaL_Reg_from_api};
use std::ffi::CString;

#[no_mangle]
pub extern "C" fn arcorp_add_lua_menu_manager(name: *mut u8, reg_vec_ptr: *mut luaL_Reg_from_api, reg_vec_size: usize, reg_vec_cap: usize) -> bool {
pub extern "C" fn arcorp_add_lua_menu_manager(name: *mut i8, reg_vec_ptr: *mut luaL_Reg_from_api, reg_vec_size: usize, reg_vec_cap: usize) -> bool {
debug!("arcorp_add_lua_menu_manager -> Function called");
unsafe {
match CString::from_raw(name).to_str() {
Expand All @@ -28,7 +28,7 @@ pub extern "C" fn arcorp_add_lua_menu_manager(name: *mut u8, reg_vec_ptr: *mut l
}

#[no_mangle]
pub extern "C" fn arcorp_add_lua_ingame_manager(name: *mut u8, reg_vec_ptr: *mut luaL_Reg_from_api, reg_vec_size: usize, reg_vec_cap: usize) -> bool {
pub extern "C" fn arcorp_add_lua_ingame_manager(name: *mut i8, reg_vec_ptr: *mut luaL_Reg_from_api, reg_vec_size: usize, reg_vec_cap: usize) -> bool {
debug!("arcorp_add_lua_ingame_manager -> Function called");
unsafe {
match CString::from_raw(name).to_str() {
Expand Down Expand Up @@ -95,7 +95,7 @@ pub extern "C" fn arcrop_lua_state_push_nil(lua_state: &mut lua_state) {
}

#[no_mangle]
pub extern "C" fn arcrop_lua_state_push_string(lua_state: &mut lua_state, str: *mut u8) {
pub extern "C" fn arcrop_lua_state_push_string(lua_state: &mut lua_state, str: *mut i8) {
debug!("arcrop_lua_state_push_string -> Function called");
unsafe { lua_state.push_string(CString::from_raw(str).to_str().expect("Failed to get string from str pointer!")); }
}
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#![feature(string_remove_matches)]
// #![feature(fs_try_exists)]
#![feature(int_roundings)]
#![feature(stdsimd)]
#![feature(lazy_cell)]

use std::{
Expand Down
2 changes: 1 addition & 1 deletion src/lua/lua.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pub struct luaL_Reg_container {
#[repr(C)]
#[derive(Debug)]
pub struct luaL_Reg_from_api {
pub name: *mut u8,
pub name: *mut i8,
pub func: LuaCfunction,
}

Expand Down
Loading