osudroid / osu-droid

http://osudroid.moe
Apache License 2.0
498 stars 74 forks source link

Touch events in gameplay are written to replay using update thread clock #345

Closed Rian8337 closed 2 weeks ago

Rian8337 commented 1 month ago

In gameplay, touch events are handled by the main thread. However, these events are written to replay using update thread's clock, which causes time inaccuracies in replays (secPassed belongs to the update thread):

https://github.com/osudroid/osu-droid/blob/da935e5868bb0947eb36f10c806e60c21934411b/src/ru/nsu/ccfit/zuev/osu/game/GameScene.java#L2372

https://github.com/osudroid/osu-droid/blob/da935e5868bb0947eb36f10c806e60c21934411b/src/ru/nsu/ccfit/zuev/osu/game/GameScene.java#L2380

https://github.com/osudroid/osu-droid/blob/da935e5868bb0947eb36f10c806e60c21934411b/src/ru/nsu/ccfit/zuev/osu/game/GameScene.java#L2392