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
|
||||
|
||||
## 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
|
||||
|
||||
Kaleido for Mac.
|
||||
|
|
|
|||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "kaleido-desktop",
|
||||
"version": "0.1.0-beta.8",
|
||||
"version": "0.1.0-beta.9",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "kaleido-desktop",
|
||||
"version": "0.1.0-beta.8",
|
||||
"version": "0.1.0-beta.9",
|
||||
"dependencies": {
|
||||
"@fontsource-variable/inter": "^5.3.0",
|
||||
"@tanstack/react-query": "^5.105.0",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "kaleido-desktop",
|
||||
"private": true,
|
||||
"version": "0.1.0-beta.8",
|
||||
"version": "0.1.0-beta.9",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
|
|
|||
2
src-tauri/Cargo.lock
generated
2
src-tauri/Cargo.lock
generated
|
|
@ -2173,7 +2173,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "kaleido"
|
||||
version = "0.1.0-beta.8"
|
||||
version = "0.1.0-beta.9"
|
||||
dependencies = [
|
||||
"fs2",
|
||||
"futures-util",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "kaleido"
|
||||
version = "0.1.0-beta.8"
|
||||
version = "0.1.0-beta.9"
|
||||
description = "Kaleido — a Plex client for Windows"
|
||||
authors = ["Elijah"]
|
||||
edition = "2021"
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ use std::sync::Arc;
|
|||
use objc2::rc::Retained;
|
||||
use objc2::{define_class, msg_send, AllocAnyThread, DefinedClass, MainThreadMarker};
|
||||
use objc2_app_kit::{NSAutoresizingMaskOptions, NSView, NSWindow, NSWindowButton, NSWindowOrderingMode};
|
||||
use objc2_core_foundation::CFTimeInterval;
|
||||
use objc2_core_graphics::{kCGColorSpaceITUR_2100_PQ, CGColorSpace};
|
||||
use objc2_core_foundation::{CFRetained, CFTimeInterval};
|
||||
use objc2_core_graphics::{kCGColorSpaceITUR_2100_PQ, kCGColorSpaceSRGB, CGColorSpace};
|
||||
use objc2_core_video::CVTimeStamp;
|
||||
use objc2_foundation::{NSNumber, NSPoint, NSRect, NSSize, NSString};
|
||||
use objc2_open_gl::*;
|
||||
|
|
@ -131,6 +131,10 @@ extern "C" fn on_update(wake: *mut c_void) {
|
|||
let _ = wake.try_send(());
|
||||
}
|
||||
|
||||
fn srgb() -> Option<CFRetained<CGColorSpace>> {
|
||||
CGColorSpace::with_name(Some(unsafe { kCGColorSpaceSRGB }))
|
||||
}
|
||||
|
||||
// —— The video layer ———————————————————————————————————————————————————
|
||||
|
||||
struct LayerIvars {
|
||||
|
|
@ -211,6 +215,9 @@ impl VideoLayer {
|
|||
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] };
|
||||
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.setOpaque(true);
|
||||
layer
|
||||
|
|
@ -393,7 +400,7 @@ impl VideoSurface {
|
|||
|
||||
/// 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
|
||||
/// 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) {
|
||||
if name != "video-params/gamma" {
|
||||
return;
|
||||
|
|
@ -413,8 +420,8 @@ impl VideoSurface {
|
|||
let layer = &self.ui.layer;
|
||||
CATransaction::begin();
|
||||
layer.setWantsExtendedDynamicRangeContent(edr);
|
||||
let pq = if edr { CGColorSpace::with_name(Some(unsafe { kCGColorSpaceITUR_2100_PQ })) } else { None };
|
||||
layer.setColorspace(pq.as_deref());
|
||||
let space = if edr { CGColorSpace::with_name(Some(unsafe { kCGColorSpaceITUR_2100_PQ })) } else { srgb() };
|
||||
layer.setColorspace(space.as_deref());
|
||||
CATransaction::commit();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "Kaleido",
|
||||
"version": "0.1.0-beta.8",
|
||||
"version": "0.1.0-beta.9",
|
||||
"identifier": "tv.kaleido.desktop",
|
||||
"build": {
|
||||
"beforeDevCommand": "npm run dev",
|
||||
|
|
@ -31,9 +31,12 @@
|
|||
"csp": null,
|
||||
"assetProtocol": {
|
||||
"enable": true,
|
||||
"scope": [
|
||||
"scope": {
|
||||
"allow": [
|
||||
"**"
|
||||
]
|
||||
],
|
||||
"requireLiteralLeadingDot": false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue