Compare commits
2 commits
3aacb94048
...
6f92aa42cc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f92aa42cc | ||
|
|
a7aad59409 |
7 changed files with 31 additions and 14 deletions
|
|
@ -1,5 +1,12 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.1.0-beta.9
|
||||||
|
|
||||||
|
Fixes for the Mac version.
|
||||||
|
|
||||||
|
- Regular (SDR) video no longer looks washed out on Mac; HDR was unaffected.
|
||||||
|
- Downloaded titles show their artwork again on Mac.
|
||||||
|
|
||||||
## 0.1.0-beta.8
|
## 0.1.0-beta.8
|
||||||
|
|
||||||
Kaleido for Mac.
|
Kaleido for Mac.
|
||||||
|
|
|
||||||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "kaleido-desktop",
|
"name": "kaleido-desktop",
|
||||||
"version": "0.1.0-beta.8",
|
"version": "0.1.0-beta.9",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "kaleido-desktop",
|
"name": "kaleido-desktop",
|
||||||
"version": "0.1.0-beta.8",
|
"version": "0.1.0-beta.9",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource-variable/inter": "^5.3.0",
|
"@fontsource-variable/inter": "^5.3.0",
|
||||||
"@tanstack/react-query": "^5.105.0",
|
"@tanstack/react-query": "^5.105.0",
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "kaleido-desktop",
|
"name": "kaleido-desktop",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.1.0-beta.8",
|
"version": "0.1.0-beta.9",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|
|
||||||
2
src-tauri/Cargo.lock
generated
2
src-tauri/Cargo.lock
generated
|
|
@ -2173,7 +2173,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kaleido"
|
name = "kaleido"
|
||||||
version = "0.1.0-beta.8"
|
version = "0.1.0-beta.9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"fs2",
|
"fs2",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "kaleido"
|
name = "kaleido"
|
||||||
version = "0.1.0-beta.8"
|
version = "0.1.0-beta.9"
|
||||||
description = "Kaleido — a Plex client for Windows"
|
description = "Kaleido — a Plex client for Windows"
|
||||||
authors = ["Elijah"]
|
authors = ["Elijah"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,8 @@ use std::sync::Arc;
|
||||||
use objc2::rc::Retained;
|
use objc2::rc::Retained;
|
||||||
use objc2::{define_class, msg_send, AllocAnyThread, DefinedClass, MainThreadMarker};
|
use objc2::{define_class, msg_send, AllocAnyThread, DefinedClass, MainThreadMarker};
|
||||||
use objc2_app_kit::{NSAutoresizingMaskOptions, NSView, NSWindow, NSWindowButton, NSWindowOrderingMode};
|
use objc2_app_kit::{NSAutoresizingMaskOptions, NSView, NSWindow, NSWindowButton, NSWindowOrderingMode};
|
||||||
use objc2_core_foundation::CFTimeInterval;
|
use objc2_core_foundation::{CFRetained, CFTimeInterval};
|
||||||
use objc2_core_graphics::{kCGColorSpaceITUR_2100_PQ, CGColorSpace};
|
use objc2_core_graphics::{kCGColorSpaceITUR_2100_PQ, kCGColorSpaceSRGB, CGColorSpace};
|
||||||
use objc2_core_video::CVTimeStamp;
|
use objc2_core_video::CVTimeStamp;
|
||||||
use objc2_foundation::{NSNumber, NSPoint, NSRect, NSSize, NSString};
|
use objc2_foundation::{NSNumber, NSPoint, NSRect, NSSize, NSString};
|
||||||
use objc2_open_gl::*;
|
use objc2_open_gl::*;
|
||||||
|
|
@ -131,6 +131,10 @@ extern "C" fn on_update(wake: *mut c_void) {
|
||||||
let _ = wake.try_send(());
|
let _ = wake.try_send(());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn srgb() -> Option<CFRetained<CGColorSpace>> {
|
||||||
|
CGColorSpace::with_name(Some(unsafe { kCGColorSpaceSRGB }))
|
||||||
|
}
|
||||||
|
|
||||||
// —— The video layer ———————————————————————————————————————————————————
|
// —— The video layer ———————————————————————————————————————————————————
|
||||||
|
|
||||||
struct LayerIvars {
|
struct LayerIvars {
|
||||||
|
|
@ -211,6 +215,9 @@ impl VideoLayer {
|
||||||
let this = VideoLayer::alloc().set_ivars(LayerIvars { cgl, pixel_format, float, render: Mutex::new(None) });
|
let this = VideoLayer::alloc().set_ivars(LayerIvars { cgl, pixel_format, float, render: Mutex::new(None) });
|
||||||
let layer: Retained<VideoLayer> = unsafe { msg_send![super(this), init] };
|
let layer: Retained<VideoLayer> = unsafe { msg_send![super(this), init] };
|
||||||
layer.setAsynchronous(false);
|
layer.setAsynchronous(false);
|
||||||
|
// A float framebuffer without a colour space would be read as linear
|
||||||
|
// light, washing SDR out; mpv writes gamma-encoded SDR, as for Windows.
|
||||||
|
layer.setColorspace(srgb().as_deref());
|
||||||
layer.setNeedsDisplayOnBoundsChange(true);
|
layer.setNeedsDisplayOnBoundsChange(true);
|
||||||
layer.setOpaque(true);
|
layer.setOpaque(true);
|
||||||
layer
|
layer
|
||||||
|
|
@ -393,7 +400,7 @@ impl VideoSurface {
|
||||||
|
|
||||||
/// HDR passthrough: for PQ or HLG video, mpv outputs PQ (BT.2020) instead of
|
/// HDR passthrough: for PQ or HLG video, mpv outputs PQ (BT.2020) instead of
|
||||||
/// tone-mapping to SDR, and the layer shows it in extended dynamic range, so
|
/// tone-mapping to SDR, and the layer shows it in extended dynamic range, so
|
||||||
/// macOS maps it to the display's HDR headroom. SDR video uses the defaults.
|
/// macOS maps it to the display's HDR headroom. SDR video is shown as sRGB.
|
||||||
pub fn on_property(&mut self, name: &str, value: &serde_json::Value) {
|
pub fn on_property(&mut self, name: &str, value: &serde_json::Value) {
|
||||||
if name != "video-params/gamma" {
|
if name != "video-params/gamma" {
|
||||||
return;
|
return;
|
||||||
|
|
@ -413,8 +420,8 @@ impl VideoSurface {
|
||||||
let layer = &self.ui.layer;
|
let layer = &self.ui.layer;
|
||||||
CATransaction::begin();
|
CATransaction::begin();
|
||||||
layer.setWantsExtendedDynamicRangeContent(edr);
|
layer.setWantsExtendedDynamicRangeContent(edr);
|
||||||
let pq = if edr { CGColorSpace::with_name(Some(unsafe { kCGColorSpaceITUR_2100_PQ })) } else { None };
|
let space = if edr { CGColorSpace::with_name(Some(unsafe { kCGColorSpaceITUR_2100_PQ })) } else { srgb() };
|
||||||
layer.setColorspace(pq.as_deref());
|
layer.setColorspace(space.as_deref());
|
||||||
CATransaction::commit();
|
CATransaction::commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://schema.tauri.app/config/2",
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
"productName": "Kaleido",
|
"productName": "Kaleido",
|
||||||
"version": "0.1.0-beta.8",
|
"version": "0.1.0-beta.9",
|
||||||
"identifier": "tv.kaleido.desktop",
|
"identifier": "tv.kaleido.desktop",
|
||||||
"build": {
|
"build": {
|
||||||
"beforeDevCommand": "npm run dev",
|
"beforeDevCommand": "npm run dev",
|
||||||
|
|
@ -31,9 +31,12 @@
|
||||||
"csp": null,
|
"csp": null,
|
||||||
"assetProtocol": {
|
"assetProtocol": {
|
||||||
"enable": true,
|
"enable": true,
|
||||||
"scope": [
|
"scope": {
|
||||||
"**"
|
"allow": [
|
||||||
]
|
"**"
|
||||||
|
],
|
||||||
|
"requireLiteralLeadingDot": false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue