Since the libretro frontend can do whatever to the OpenGL state between
frames, we can't make any assumptions about the state at the beginning
of a frame.
While this does close small memory leaks, this is mostly for threading reasons. We're not supposed to call rb_raise with the gvl released, and calling rb_raise prevents GFX_UNLOCK from being called, which would cause problems for any games that want to call graphical operations in multiple threads should the user reset.
We're also now calling Graphics.__reset__ and Audio.__reset__ via eval instead of directly calling the functions, in case a game wants to hook them.
If game devs want to use framerates outside of Enterbrain's arbitrary
restrictions, there's no reason for us to prevent it. Same reason we
don't restrict the resolution.
Fixes https://github.com/mkxp-z/mkxp-z/issues/64
Fixes black screen when videos play when Hires mode is enabled.
(Doesn't actually enable Hires Movie replacement yet.)
Thanks Eblo for reporting the bug.
Put the audioThread check within the hasAudio conditional in the movie destructor
The order is significant, as trying to dispose of OpenAL objects before audioThread is complete can result in hanging
Instead of updating the `Input.repeat?` frame timing every time
`Graphics.frame_rate=` is called, automatically set it to the
current average framerate (or close to it)
+ Time is now measured in fractions of a second, not microseconds
+ Viewports in RGSS1 will now only retain weak references to their children
+ Invalid Sprite bitmaps found during Graphics.update will be treated as null
+ Bitmap#mega? and Bitmap#animated? are properly rescued
Use OpenAL instead of SDL for processing movie playback audio
Make sure video and audio are in sync based on playback position
General code cleanup of movie playback
- Black screen when resizing below 1x
- int scaling causing incorrectly scaled image after resize
- display offset being completely off without lastmile on macOS