gschup / ggrs

GGRS is a reimagination of GGPO, enabling P2P rollback networking in Rust. Rollback to the future!
Other
507 stars 25 forks source link

Support enum with fields in `Config::Input` #44

Open Vrixyz opened 1 year ago

Vrixyz commented 1 year ago

Fix https://github.com/gschup/ggrs/issues/40.

Follow up to https://github.com/gschup/ggrs/pull/41.

Currently just hacking stuff together, I dropped forbid_unsafe for my tests ; but ultimately the plan is to upstream that work to bytemuck.

Maybe https://jack.wrenn.fyi/blog/deflect/ contains helpful insights.

Vrixyz commented 1 year ago

To properly test the enum handling, test_synchronize_p2p_sessions Should have its enum equivalent to call into poll_remote_clients which continues until it hits a CheckedBitPattern call.