ata4 / angrylion-rdp-plus

A low-level N64 video emulation plugin, based on the pixel-perfect angrylion RDP plugin with some improvements.
158 stars 25 forks source link

mupen64plus: fix incorrect usage of API #111

Closed Rosalie241 closed 4 years ago

Rosalie241 commented 4 years ago

According to the docs: https://mupen64plus.org/wiki/index.php?title=Mupen64Plus_v2.0_Core_Video_Extension

m64p_error VidExt_Init(void) This function should be called from within the RomOpen() video plugin function call. The default SDL implementation of this function simply calls SDL_InitSubSystem(SDL_INIT_VIDEO). It does not open a rendering window or switch video modes.

screen_init was being called from PluginStartup, screen_init calls VidExt_Init, so screen_init was being called too early, breaking the specification & my mupen64plus GUI, this PR moves vdac_init (which calls screen_init) to RomOpen which mimics the zilmar spec version and makes it work with my GUI

EDIT: I just discovered this was caused by https://github.com/ata4/angrylion-rdp-plus/commit/5033601b0449bef16f460bd52e5b2d72c6b06556#

Jj0YzL5nvJ commented 4 years ago

Thanks! ^.^

Fixes #109

ata4 commented 4 years ago

Thanks!

ghost commented 4 years ago

Domo arigato!

Does this mean latest version of Angrylion RDP Plus now works with m64p without crashing?

Rosalie241 commented 4 years ago

@RokkumanX I don't see why it wouldn't work with m64p right now, so it should work.