Views: 13,852,422 | Homepage | Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search | 10-15-24 05:52 PM |
Guest: |
0 users reading How to calculate delay which lasts for 1 or 2 frames? | 1 bot |
Main - Development - How to calculate delay which lasts for 1 or 2 frames? | Hide post layouts | New reply |
temp12312 |
| ||
Member Normal user Level: 8 Posts: 12/13 EXP: 1656 Next: 531 Since: 05-15-21 Last post: 1045 days ago Last view: 462 days ago |
Hello, I am calling nds schedule event and I can not figure out how to calculate delay which lasts for 1 or 2 frames. So how to calculate it reliably? To do so for 2 frames is it reliable or calculate it for 1 frame and then do one skip in function event callback, so in total 2 frames?... |
Generic aka RSDuck |
| ||
Big fire melon Administrator Level: 45 Posts: 438/610 EXP: 644514 Next: 15650 Since: 10-12-19 Last post: 13 days ago Last view: 1 day ago |
one frame should normally be 6*355*263 cycles, though in theory it can vary.
What exactly are you trying to archieve? ____________________ Take me to your heart / never let me go! "clearly you need to mow more lawns and buy a better pc" - Hydr8gon |
temp12312 |
| ||
Member Normal user Level: 8 Posts: 13/13 EXP: 1656 Next: 531 Since: 05-15-21 Last post: 1045 days ago Last view: 462 days ago |
Thanks. It is about emulating touches. If you call functions without delay game sees only the last call I think, because it does not register other function calls. |
Generic aka RSDuck |
| ||
Big fire melon Administrator Level: 45 Posts: 440/610 EXP: 644514 Next: 15650 Since: 10-12-19 Last post: 13 days ago Last view: 1 day ago |
the emulator scheduler isn't the best place to implement something like this, you're probably better off just hooking that in somewhere here: https://github.com/Arisotura/melonDS/blob/master/src/frontend/qt_sdl/main.cpp#L542 so that it will go before or after every call to RunFrame.
If you want to discuss this further I'll recommend hopping onto our IRC channel/Discord server: https://melonds.kuribo64.net/board/thread.php?id=3 ____________________ Take me to your heart / never let me go! "clearly you need to mow more lawns and buy a better pc" - Hydr8gon |
Main - Development - How to calculate delay which lasts for 1 or 2 frames? | Hide post layouts | New reply |
Page rendered in 0.055 seconds. (2048KB of memory used) MySQL - queries: 30, rows: 85/85, time: 0.048 seconds. Acmlmboard 2.064 (2018-07-20) © 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |