From 68b9225b4ebe52f35342ca12cc53213d52db80dc Mon Sep 17 00:00:00 2001 From: shun suzuki Date: Wed, 18 Dec 2024 16:05:43 +0900 Subject: [PATCH] fix simulator options --- simulator/src/simulator.rs | 4 ++-- src/lib/UI/Simulator.svelte | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/simulator/src/simulator.rs b/simulator/src/simulator.rs index e3ac67f..f8a1b5d 100644 --- a/simulator/src/simulator.rs +++ b/simulator/src/simulator.rs @@ -41,8 +41,8 @@ impl Simulator { let rx_buf = Arc::new(RwLock::default()); let server = Server::new( &runtime, - 8080, - true, + state.port, + state.lightweight, rx_buf.clone(), event_loop.create_proxy(), )?; diff --git a/src/lib/UI/Simulator.svelte b/src/lib/UI/Simulator.svelte index 29dacc4..143d532 100644 --- a/src/lib/UI/Simulator.svelte +++ b/src/lib/UI/Simulator.svelte @@ -33,15 +33,14 @@ "-p", simulatorOptions.port.toString(), "-v", - simulatorOptions.vsync ? "true" : "false", + simulatorOptions.vsync.toString(), "-s", setting_file, "--setting_dir", appConfigDirPath, + "--lightweight", + simulatorOptions.lightweight.toString(), ]; - if (simulatorOptions.lightweight) { - args.push("--lightweight"); - } command = simulatorOptions.unity ? Command.sidecar("simulator-unity", args) : Command.sidecar("simulator", args);