Skip to content

Add native macOS support - #2

Closed
ssskay wants to merge 7 commits into
gitChara-dot:mainfrom
ssskay:macos-support
Closed

ssskay wants to merge 7 commits into
gitChara-dot:mainfrom
ssskay:macos-support

Conversation

@ssskay

@ssskay ssskay commented Jul 9, 2026

Copy link
Copy Markdown

Hi! I loved Yaha-Pet and ported it to macOS — figured I would offer the changes back in case you want official Mac support.

Changes:

  • Fix crash when grabbing a character: the per-grab QSoundEffect deleted itself from its own playingChanged signal, which double-frees on Qt 6.10 (SIGABRT). Replaced with a persistent per-character grab player (also respects Mute All now).
  • Fix the random-behavior roll in try_animation — roll<=100 was always true, so characters only ever jumped. Now 40% jump / 30% walk / 30% other animations.
  • Add a Gather everyone! tray/dock action that recalls wandered pets to screen center.
  • macOS: pets stay visible when the app is not focused (WA_MacAlwaysShowToolWindow), Dock menu via setAsDockMenu, fullscreen helper window no longer intercepts clicks, app icon (yaha.icns), auto-spawn Usagi on launch so opening the app visibly works, README build instructions.
  • Replace one match statement with if for Python 3.9 compatibility (macOS system Python).

The jump-logic and crash fixes benefit Windows too. A prebuilt Mac app is on my fork releases. Thanks for making this — happy to adjust anything!

ssskay and others added 7 commits July 9, 2026 18:24
Fix grab-sound double-free crash (Qt 6.10), fix always-jump behavior roll, add Gather everyone menu action, keep pets visible when app is inactive, add Dock menu, Python 3.9 compatibility, app icon, build instructions.
Shape each pet window to the sprite mask so transparent margins pass clicks through, and add WindowDoesNotAcceptFocus so clicking a pet no longer pushes the active app behind.
The invisible fullscreen always-on-top window intercepted clicks meant for other apps on macOS. Mute All now switches to Unmute All and applies to characters spawned after muting.
config.json is now also loaded from the OS app-support folder (~/Library/Application Support/Yaha-Pet on macOS). Per-character keys sound_chance (0-1 probability an animation sound plays) and animation_interval_scale (multiplier on idle time between random animations) let users tune how chatty/hyper each character is without rebuilding.
…-lands

Velocity is sampled from the last ~120ms of drag movement. Fast releases launch the character into a gravity simulation with wall/ceiling/floor bounces and friction; hard landings show the crash sprite. Gentle releases keep the classic fall.
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.

2 participants