Views: 23,293,054 | Homepage | Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search | 12-11-24 06:57 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: 1693 Next: 494 Since: 05-15-21 Last post: 1103 days ago Last view: 519 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: 654482 Next: 5682 Since: 10-12-19 Last post: 70 days ago Last view: 18 hours 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: 1693 Next: 494 Since: 05-15-21 Last post: 1103 days ago Last view: 519 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: 654482 Next: 5682 Since: 10-12-19 Last post: 70 days ago Last view: 18 hours 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.034 seconds. (2048KB of memory used) MySQL - queries: 30, rows: 86/86, time: 0.030 seconds. Acmlmboard 2.064 (2018-07-20) © 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |