Skip to content

Settings saved by one instance reach the other without a focus event - #45

Merged
jpcottin merged 1 commit into
mainfrom
fix/settings-reach-the-glasses-instance
Oct 24, 2026
Merged

jpcottin merged 1 commit into
mainfrom
fix/settings-reach-the-glasses-instance

Conversation

@jpcottin

Copy link
Copy Markdown
Owner

The settings file was only re-read on a window-focus event, and the
projected window the glasses instance draws into never receives one, so
Sound or Auto Play toggled on the phone while the game ran on the glasses
stayed as they were there until that activity was recreated. The two
instances live in one process: every save now bumps a shared generation
counter and an instance whose last load is behind it reloads on its next
frame, music flag included.

New test: two instances on one data path; a row toggled on the phone is
seen by the other after a frame, with no focus event. 146 -> 147 tests.

The settings file was only re-read on a window-focus event, and the
projected window the glasses instance draws into never receives one, so
Sound or Auto Play toggled on the phone while the game ran on the glasses
stayed as they were there until that activity was recreated. The two
instances live in one process: every save now bumps a shared generation
counter and an instance whose last load is behind it reloads on its next
frame, music flag included.

New test: two instances on one data path; a row toggled on the phone is
seen by the other after a frame, with no focus event. 146 -> 147 tests.
@jpcottin
jpcottin merged commit 2cd83eb into main Oct 24, 2026
21 checks passed
@jpcottin
jpcottin deleted the fix/settings-reach-the-glasses-instance branch October 24, 2026 06:44
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.

1 participant