From e5246b63208b216d1619950ed45f6489f9d74eb3 Mon Sep 17 00:00:00 2001 From: Stefan Lau Date: Mon, 8 Dec 2025 11:20:55 +0100 Subject: [PATCH 1/3] Fix dev server setup on Windows --- .erb/configs/webpack.config.renderer.dev.mts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.erb/configs/webpack.config.renderer.dev.mts b/.erb/configs/webpack.config.renderer.dev.mts index 79e3da3..900794b 100644 --- a/.erb/configs/webpack.config.renderer.dev.mts +++ b/.erb/configs/webpack.config.renderer.dev.mts @@ -109,18 +109,21 @@ const configuration: webpack.Configuration = { __dirname: false, __filename: false, }, - devServer: { port, compress: true, hot: true, headers: { 'Access-Control-Allow-Origin': '*' }, + devMiddleware: { + writeToDisk: true, + }, static: { publicPath: '/', }, historyApiFallback: { verbose: true, }, + setupMiddlewares(middlewares) { console.log('Starting preload.js builder...'); const preloadProcess = spawn('npm', ['run', 'start:preload'], { From 4593721d95aa6d5965ad80c596dcd08d1dad63be Mon Sep 17 00:00:00 2001 From: Stefan Lau Date: Mon, 8 Dec 2025 11:21:18 +0100 Subject: [PATCH 2/3] Fix cursor disappearing on Antd inputs on windows with AMD graphics --- src/renderer/App.css | 7 ------- src/renderer/App.tsx | 2 ++ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/renderer/App.css b/src/renderer/App.css index 4f4e1f2..da555b8 100644 --- a/src/renderer/App.css +++ b/src/renderer/App.css @@ -2,10 +2,3 @@ body { overflow-x: hidden; overflow-y: hidden; } - -/* Fix cursor turning white while transitioning the input border color on Windows */ -body .ant-input-outlined, -body .ant-input-number-outlined, -body .ant-select-outlined .ant-select-selector { - transition: none !important; -} diff --git a/src/renderer/App.tsx b/src/renderer/App.tsx index c8e4607..2efcbb3 100644 --- a/src/renderer/App.tsx +++ b/src/renderer/App.tsx @@ -44,6 +44,8 @@ export function AppWithoutProviders() { const appStore = createAppStore(); const THEME_CONFIG: ThemeConfig = { token: { + // Disable all animations because of https://issues.chromium.org/issues/40239916 + motion: false, colorPrimary: '#9d1e1c', }, }; From 8e8af3bd1d8b631f82369d89cd890630f1299091 Mon Sep 17 00:00:00 2001 From: Stefan Lau Date: Mon, 8 Dec 2025 11:21:32 +0100 Subject: [PATCH 3/3] Use BufReader for better performance --- src-rust/src/invokables/image.rs | 5 +++-- src-rust/src/invokables/sounds.rs | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src-rust/src/invokables/image.rs b/src-rust/src/invokables/image.rs index 7480e6b..12c435a 100644 --- a/src-rust/src/invokables/image.rs +++ b/src-rust/src/invokables/image.rs @@ -2,6 +2,7 @@ use crate::{invokables::Invokable, state::AppState}; use anyhow::{anyhow, Context, Result}; use image::RgbaImage; use serde::{Deserialize, Serialize}; +use std::io::BufReader; use stracciatella::file_formats::stci::{Stci, StciRgb888}; #[derive(Debug)] @@ -61,7 +62,7 @@ impl Invokable for Render { fn invoke(&self, state: &AppState) -> Result { let state = state.read(); - let mut f = state.open_file(&self.file).context("failed to read file")?; + let mut f = BufReader::new(state.open_file(&self.file).context("failed to read file")?); let stci = Stci::from_input(&mut f)?; let sub_image = self.subimage.unwrap_or(0); let size = match &stci { @@ -162,7 +163,7 @@ impl Invokable for ReadMetadata { fn invoke(&self, state: &AppState) -> Result { let state = state.read(); - let mut f = state.open_file(&self.file).context("failed to read file")?; + let mut f = BufReader::new(state.open_file(&self.file).context("failed to read file")?); let stci = Stci::from_input(&mut f)?; let images = match stci { Stci::Indexed { sub_images, .. } => sub_images diff --git a/src-rust/src/invokables/sounds.rs b/src-rust/src/invokables/sounds.rs index 8e818d4..e47da8c 100644 --- a/src-rust/src/invokables/sounds.rs +++ b/src-rust/src/invokables/sounds.rs @@ -1,6 +1,7 @@ use crate::{invokables::Invokable, state}; use anyhow::{anyhow, Context, Result}; use serde::{Deserialize, Serialize}; +use std::io::{BufReader, Read as _}; #[derive(Debug)] pub enum Base64Sound { @@ -47,7 +48,7 @@ impl Invokable for Read { fn invoke(&self, state: &state::AppState) -> Result { let state = state.read(); - let mut f = state.open_file(&self.file).context("failed to open file")?; + let mut f = BufReader::new(state.open_file(&self.file).context("failed to open file")?); let mut content = vec![]; f.read_to_end(&mut content).context("failed to read file")?;