Skip to content

Conversation

@danieltarazona
Copy link

@danieltarazona danieltarazona commented Dec 11, 2025

Summary

A few months ago I was laid off from my job as an Senior iOS dev so I decided to make some changes to interesting projects while I look for a new job then started working remotly on Swift with VSCode for a personal project rather than Xcode.

New Features:

  1. Keyboard button behind the Overlay Parsec button for quick access.
  2. Pinch to Zoom.
  3. Mouse Follow when Zoom In and reach the desktop corners.
  4. Screen repositioning when Keyboard appear.
  5. Mouse repositioning when Keyboard appear.
  6. Selection Marks on Overlay Parsec options like Resolution, Bitrate.
  7. Keyboard state on Overlay Parsec menu.

The changes includes:

  1. Parsec SDK Submodule Update
  • Changed SDK repository URL from AngelDTF/parsec-sdk to MalfoyJW/parsec-sdk
  • Reason: Use updated version of the Parsec SDK
  1. Launch Screen Updates
  • Changed background color from named BackgroundGray to pure black
  • Adjusted image positioning and content mode
  • Removed named color dependency
  1. Threading Safety Fixes (DispatchQueue.main.async)
    LoginView.swift
  • Wrapped entire URLSession dataTask callback in DispatchQueue.main.async
  • Reason: UI state updates (isLoading, showAlert, navigation) must occur on main thread
    MainView.swift
  • Wrapped refreshHosts() dataTask callback in DispatchQueue.main.async
  • Wrapped refreshSelf() dataTask callback in DispatchQueue.main.async
  • Wrapped refreshFriends() dataTask callback in DispatchQueue.main.async
  • Reason: All UI state updates from network callbacks require main thread execution
    ParsecView.swift
  • Fixed changeResolution() - moved CParsec.updateHostVideoConfig() inside DispatchQueue.main.async block
  • Fixed changeDisplay() - moved CParsec.updateHostVideoConfig() inside DispatchQueue.main.async block
  • Reason: Fixed race condition where host config was updated before DataManager.model was modified
    ParsecSDKBridge.swift
  • Wrapped displayConfigs update in handleUserDataEvent (case 12) with DispatchQueue.main.async
  • Reason: DataManager model updates must happen on main thread
    URLImage.swift
  • Wrapped image loading completion handler in DispatchQueue.main.async
  1. Mouse Movement Improvements
    ParsecViewController.swift
  • Simplified mouse pan gesture handling with sub-pixel accumulation
  • Added lastPanTranslation, accumulatedDeltaX, accumulatedDeltaY properties
  • Improve simple accumulation mouse provides smoother movement
  • Precision improvement when mouse interpolation.
  1. Keyboard Accessory View Fix
    ParsecViewController.swift
  • Replaced UIToolbar with plain UIView for input accessory
  • Changed from Auto Layout to frame-based layout with autoresizingMask
  • Reason: UIToolbar generated Auto Layout constraint conflicts; frame-based layout avoids system-generated constraints
  1. App Initialization Deadlock Fix
    ViewContainerPatch.swift
  • Added guard !isPatched check to prevent multiple patching
  • Wrapped UIViewController.patchViewController() in DispatchQueue.main.async
  • Reason: Method swizzling conflicted with Xcode GPU debugger initialization during dyld loading, causing deadlock
  1. Frame Rate / ProMotion Support
    ParsecGLKViewController.swift
  • Added support for configurable FPS or device maximum (120Hz on ProMotion displays)
  • Uses UIScreen.main.maximumFramesPerSecond when FPS is set to 0
  • Reason: Enable higher refresh rates on capable devices
    SettingsHandler.swift
  • Added preferredFramesPerSecond setting
  • Added bitrate setting support
  • Reason: Allow user configuration of display and streaming parameters
    SettingsView.swift
  • Added FPS picker (30, 60, 120, Device Max)
  • Reason: UI for frame rate configuration
  1. Keyboard Character Support
    KeyCodeTranslators.swift
  • Added support for "Ñ" character (mapped to ParsecKeycode 51)
  • Reason: Spanish keyboard support 🇨🇴🇪🇸
  1. Code Style Improvements
    Multiple files received spacing/formatting changes around colons in type annotations (e.g., var foo:Type → var foo: Type):
  • ActivityIndicator.swift
  • AppDelegate.swift]
  • CParsec.swift
  • ContentView.swift
  • ExUI.swift
  • And others

@danieltarazona danieltarazona changed the title General UI and Performance Improvements New Features with General UI and Performance Improvements Dec 11, 2025
@danieltarazona
Copy link
Author

@hugeBlack Pending of review on these changes

@Simber1
Copy link

Simber1 commented Dec 16, 2025

Testing out the changes, the only issue I've found is I can't seem to scroll anymore. Before 2 fingers would scroll but now anytime I try to scroll it triggers a zoom/pan instead.

@hugeBlack
Copy link
Owner

Thank you for the contribution, I'll review these massive changes when I'm free and done working on other projects

@danieltarazona
Copy link
Author

Testing out the changes, the only issue I've found is I can't seem to scroll anymore. Before 2 fingers would scroll but now anytime I try to scroll it triggers a zoom/pan instead.

I have it on my radar, as soon as I have some time tomorrow, I'll take a look, it was a pending change, but I got distracted finishing another project. It's a pleasure to contribute, @hugeBlack take your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants