Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ jobs:
runs-on: windows-latest
timeout-minutes: 15
environment: update-signing
permissions:
contents: read
actions: read
steps:
# Keep the signing secret in the protected update-signing environment.
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
Expand All @@ -211,6 +214,14 @@ jobs:
with:
global-json-file: global.json

- name: Download native artifact from successful CI run
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
name: tested-native
path: artifacts/native
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}

- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
path: signed-assets
Expand Down
10 changes: 1 addition & 9 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,10 @@ regexes = ['^LEGACY-KEY-12345$']
[[allowlists]]
description = "Exact built-in YouTube client identifier, one service only"
condition = "AND"
paths = ['(^|[\\/])Services[\\/]YouTubeSubtitleService\.cs$', '(^|[\\/])Assets[\\/]MediaProtocols\.json$']
paths = ['(^|[\\/])Services[\\/]YouTubeSubtitleService\.cs$']
regexTarget = "secret"
regexes = ['^(?:AIza)SyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8$']

# This exact public Spotify Web Player TOTP version-61 seed is not a tenant key.
[[allowlists]]
description = "Exact built-in Spotify Web Player TOTP seed in MediaProtocols.json"
condition = "AND"
paths = ['(^|[\\/])Assets[\\/]MediaProtocols\.json$']
regexTarget = "secret"
regexes = ['^Mzc2MTM2Mzg3NTM4NDU5ODkzODgzMzEyMzEwOTExOTkyODQ3MTEyNDQ4ODk0NDEwMjEwNTExMjk3MTA4$']

[[allowlists]]
description = "Synthetic clipboard benchmark tokens"
condition = "AND"
Expand Down
2 changes: 2 additions & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
176edcfcb8628d6af9d719f9d14a7905e4e51f25:Services/YouTubeSubtitleService.cs:gcp-api-key:34
4a886045b2ffda4b7f5914fff22683871c4cd5f0:Assets/MediaProtocols.json:gcp-api-key:7
4a886045b2ffda4b7f5914fff22683871c4cd5f0:Assets/MediaProtocols.json:generic-api-key:4
bd171fc91536901017c12afac0c59b2a45e19c16:Assets/MediaProtocols.json:gcp-api-key:7
bd171fc91536901017c12afac0c59b2a45e19c16:Assets/MediaProtocols.json:generic-api-key:4
3ca5c3d3319460b24db9f01a6732050d9bf19ab5:Tests/SettingsActionsAndBaselineTests.cs:generic-api-key:39
17 changes: 0 additions & 17 deletions Assets/MediaProtocols.json

This file was deleted.

3 changes: 0 additions & 3 deletions Controllers/D3DImageFramePresenter.Webcam.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ internal sealed partial class D3DImageFramePresenter

internal event Action<int, int, int>? WebcamFallbackRequested;

internal bool FitsWebcam(int width, int height, int token) =>
width == _surfaceWidth && height == _surfaceHeight && token == _sessionGeneration;

internal void RequestWebcamAcquire(WebcamCaptureController capture, int token)
{
ArgumentNullException.ThrowIfNull(capture);
Expand Down
180 changes: 0 additions & 180 deletions Controllers/DedicatedKeyboardHook.cs

This file was deleted.

5 changes: 0 additions & 5 deletions Controllers/OverlayWindowController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,6 @@ public void MoveFixedPosition(int newX, int newY)
ApplyFixedBounds();
}

public void ResetToCenteredTop(double widthDip, double heightDip)
{
PositionAtTop(Math.Max(600, widthDip - HorizontalPadding), Math.Max(200, heightDip - VerticalPadding));
}

public void ReassertBounds()
{
if (!_state.HasFixedBounds || _state.WindowWidth <= 0 || _state.WindowHeight <= 0)
Expand Down
23 changes: 0 additions & 23 deletions Interop/CountdownHandle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ private static partial int vn_countdown_command(
long arg,
M05Native.VnCountdownSnapshotPod* outSnapshot);

[LibraryImport(NativeAbi.RustLibraryName)]
private static partial int vn_calendar_set_day_tick_enabled(long countdownHandle, byte enabled);

internal static int DestroyRaw(long handle) => vn_countdown_destroy(handle);

internal static CountdownHandle Create(long session = 0)
Expand Down Expand Up @@ -64,26 +61,6 @@ internal M05Native.VnCountdownSnapshotPod Command(uint op, long arg = 0)
}
}

internal void SetCalendarDayTickEnabled(bool enabled)
{
ObjectDisposedException.ThrowIf(IsClosed || IsInvalid, this);
bool addedRef = false;
try
{
DangerousAddRef(ref addedRef);
NativeResult.RequireSuccess(
vn_calendar_set_day_tick_enabled((long)DangerousGetHandle(), enabled ? (byte)1 : (byte)0),
nameof(vn_calendar_set_day_tick_enabled));
}
finally
{
if (addedRef)
{
DangerousRelease();
}
}
}

protected override bool ReleaseHandle() =>
vn_countdown_destroy((long)handle) == (int)NativeStatus.Ok;
}
22 changes: 1 addition & 21 deletions Interop/GlassPresenterSafeHandle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace VNotch.Interop;

/// <summary>
/// SafeHandle owning a native M12 <c>D3D9Presenter</c> handle in <c>vnotch_rust.dll</c>.
/// Borrowed COM pointers (<see cref="Surface9Ptr"/>, <see cref="GetD3D9Device"/>) remain valid only
/// Borrowed COM pointers (<see cref="Surface9Ptr"/>) remain valid only
/// until <see cref="Recreate"/> or <see cref="SafeHandle.Dispose"/>.
/// </summary>
internal sealed unsafe partial class GlassPresenterSafeHandle : VNotchSafeHandle
Expand Down Expand Up @@ -47,9 +47,6 @@ private static partial int vn_glass_presenter_recreate(
[LibraryImport(NativeAbi.RustLibraryName)]
private static partial int vn_glass_presenter_set_interval(long handle, double intervalMs);

[LibraryImport(NativeAbi.RustLibraryName)]
private static partial int vn_glass_presenter_get_d3d9_device(long handle, nint* outDevice9Ptr);

[LibraryImport(NativeAbi.RustLibraryName)]
private static partial int vn_glass_gpu_render_v2(
long handle,
Expand Down Expand Up @@ -216,23 +213,6 @@ internal void SetInterval(double intervalMs)
}
}

internal nint GetD3D9Device()
{
long rawHandle = AcquireRawHandle(out bool addedRef);
try
{
nint devicePtr = 0;
NativeResult.RequireSuccess(
vn_glass_presenter_get_d3d9_device(rawHandle, &devicePtr),
nameof(vn_glass_presenter_get_d3d9_device));
return devicePtr;
}
finally
{
ReleaseRawHandle(addedRef);
}
}

internal int RenderDesktop(in M12Native.VnGpuFrame frame)
{
long rawHandle = AcquireRawHandle(out bool addedRef);
Expand Down
6 changes: 0 additions & 6 deletions Interop/ImagingNative.cs
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,6 @@ internal static partial int vn_dicolor_extract_palette_v2(
VnColorRequest* req,
VnPaletteResult* outRes);

[LibraryImport(NativeAbi.RustLibraryName)]
internal static partial int vn_dicolor_clamp_crop_v2(
VnColorRequest* req,
VnCoreRect* outRect,
byte* outValid);

[LibraryImport(NativeAbi.RustLibraryName)]
internal static partial int vn_dicolor_ensure_contrast_v2(
VnColorRequest* req,
Expand Down
Loading
Loading