You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
this fix is just for libretro? I 'sideported' your delete[] vs delete commit to my copy of the patch, that will just run in dosbox itself, but i shouldn't do that for this one right?
edit: or maybe not now that i think about it, if it was in the original, it can't be about the libretro api.
edit2: oh, it's supposed to be 1s/60frames, so the ideal timeslice for a single frame. I'll side port this too i guess.
The reason will be displayed to describe this comment to others. Learn more.
this fix is just for libretro? I 'sideported' your delete[] vs delete commit to my copy of the patch, that will just run in dosbox itself, but i shouldn't do that for this one right?
edit: or maybe not now that i think about it, if it was in the original, it can't be about the libretro api.
No, it's not just for libretro. It's a genuine mistake by kekko. RENDER_SetSize() takes FPS as parameter, but the code was passing the frame time instead (in this case, 16.7 instead of 60.) When running as a libretro core, reporting the correct FPS to the frontend is vital, otherwise retro_run() will get called 16.7 times per second rather than 60. I'm not sure what the effects of this bug are in stand-alone dosbox.
9d97bf2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this fix is just for libretro? I 'sideported' your delete[] vs delete commit to my copy of the patch, that will just run in dosbox itself, but i shouldn't do that for this one right?
edit: or maybe not now that i think about it, if it was in the original, it can't be about the libretro api.
edit2: oh, it's supposed to be 1s/60frames, so the ideal timeslice for a single frame. I'll side port this too i guess.
9d97bf2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it's not just for libretro. It's a genuine mistake by kekko.
RENDER_SetSize()
takes FPS as parameter, but the code was passing the frame time instead (in this case, 16.7 instead of 60.) When running as a libretro core, reporting the correct FPS to the frontend is vital, otherwiseretro_run()
will get called 16.7 times per second rather than 60. I'm not sure what the effects of this bug are in stand-alone dosbox.9d97bf2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh, but your code makes it that value:
vdraw.vfreq = 1000.0f/60.0f;
1000/vdraw.vfreq = 1000/1000.0f/60.0f = 1.0f / 60.0f = 0.01666666666
Am i missing something? If it's supposed to be 60 that is.
9d97bf2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vdraw.vfreq
is not 60. It's 16.7. It's initialized inVoodoo_Initialize()
with:That means it contains the frame time, not the frame rate.
9d97bf2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But that's what i meant; 1000/16.7 is 0.016666.... not 60. If the argument is supposed to be frames per second, what is 0.01666 frames per second?
edit: I understand you have to use vfreq, in case some future code changes the target fps, but isn't it supposed to be 1000*vdraw.vfreq?
9d97bf2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh, 1000 / 16.7 is 60 :-P
9d97bf2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fuuuuck. Never mind me. I just put in '1000/1000/60' in google and the order of operations precedence fucked me.