fix: winit + softbuffer for layout-agnostic input and better FPS
Replaced minifb with winit + softbuffer: Input (layout-agnostic): - winit uses PhysicalKey<KeyCode> which maps to physical key positions - KeyCode::KeyA = physical A key, regardless of keyboard layout - Works on Russian, Arabic, any layout — no key mapping needed - HashSet<KeyCode> tracks pressed/released state - Proper Press/Release events from OS, no timeout hacks FPS improvements: - Glyph atlas pre-built at startup (alpha bitmap, zero per-frame alloc) - render_to_buffer: skip empty cells entirely (no draw call) - blend_fast: bitshift instead of division for alpha blending - Buffer fill via .fill() instead of nested loop - copy_from_slice for pixel transfer to softbuffer (memcpy speed) - ControlFlow::Poll for maximum frame rate 109 tests, 0 failures
This commit is contained in:
+3
-1
@@ -8,8 +8,10 @@ crossterm = "0.28"
|
||||
clap = { version = "4", features = ["derive"] }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
minifb = "0.27"
|
||||
fontdue = "0.9"
|
||||
winit = "0.30"
|
||||
softbuffer = "0.4"
|
||||
log = "0.4"
|
||||
|
||||
[profile.release]
|
||||
opt-level = 3
|
||||
|
||||
Reference in New Issue
Block a user