fullscreen (#360)

* fullscreen

* improvements, and error catching

* yarn prettier

* discord rpc

* fixed uninitialized options.txt

* working discord version

* incorrect boolean

* change

* merge issue; regex solution

* fixed error

* multi line mode

* moved \n to start
This commit is contained in:
Wyatt Verchere
2023-07-27 00:10:07 -07:00
committed by GitHub
parent ce01ee6a2d
commit c364468ed5
20 changed files with 367 additions and 56 deletions

View File

@@ -29,6 +29,7 @@ pub async fn import_get_importable_instances(
}
/// Import an instance from a launcher type and base path
/// profile_path should be a blank profile for this purpose- if the function fails, it will be deleted
/// eg: import_instance(ImportLauncherType::MultiMC, PathBuf::from("C:/MultiMC"), "Instance 1")
#[tauri::command]
pub async fn import_import_instance(

View File

@@ -276,6 +276,7 @@ pub struct EditProfile {
pub memory: Option<MemorySettings>,
pub resolution: Option<WindowSize>,
pub hooks: Option<Hooks>,
pub force_fullscreen: Option<SetFullscreen>,
}
#[derive(Serialize, Deserialize, Clone, Debug)]
@@ -315,6 +316,9 @@ pub async fn profile_edit(
prof.java = edit_profile.java.clone();
prof.memory = edit_profile.memory;
prof.resolution = edit_profile.resolution;
if let Some(force_fullscreen) = edit_profile.force_fullscreen {
prof.force_fullscreen = force_fullscreen;
}
prof.hooks = edit_profile.hooks.clone();
prof.metadata.date_modified = chrono::Utc::now();