fix: Add mut to fix incorrect get of windowsize in cover

This commit is contained in:
Anton Nyström
2024-10-29 11:24:16 +01:00
committed by Henrik Friedrichsen
parent a5953d9848
commit 6dc1229718
2 changed files with 8 additions and 2 deletions

View File

@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Fixed
- Fix error in fetching of window size leading to crashes with cover feature
## [1.2.0] - 2024-10-15
### Added

View File

@@ -33,8 +33,8 @@ impl CoverView {
pub fn new(queue: Arc<Queue>, library: Arc<Library>, config: &Config) -> Self {
// Determine size of window both in pixels and chars
let (rows, cols, mut xpixels, mut ypixels) = unsafe {
let query: (u16, u16, u16, u16) = (0, 0, 0, 0);
ioctl(1, TIOCGWINSZ, &query);
let mut query: (u16, u16, u16, u16) = (0, 0, 0, 0);
ioctl(1, TIOCGWINSZ, &mut query);
query
};