Core implementation problem with opengl video driver

Hi,

I’m trying to make a core using Borland Delphi 7. I’ve implemented all the retro_* functions in the DLL, based on the libretro-test example from the RetroArch source. The problem is that it only works fine when I configure RetroArch to run with SDL video drivers. With the openGL drivers it crashes when calling the video refresh callback function from retro_run(). Is there some extra initialization or any requirement necessary to make it work with the OpenGL video driver?

thanks in advance

I don’t know Delphi. Make sure you’re using the correct calling convention (C, not Pascal).

Hello Maister,

I’m using de C calling convention (“cdecl” keyword in Delphi), I even did some assembler debugging to check if the parameters where passed correctly… in fact it works with the SDL video driver.

I noticed that I have the same problem using the bNES core, it only works when I select the SDL video driver, and crashes with OpenGL in the same way it does my implementation. I think it is not a problem with my system, because other cores (QuickNES, Nestopia…) do work well with opengl driver… any idea?

thanks!

Not really … You have a backtrace or something?

I’m afraid Delphi 7 has no options to show a stack trace… I can watch the call stack of the DLL source code while debugging, nothing more.

by the way, does anyone else has had the same problem as me with the bNES core? (crash when using opengl video driver)

thank you

Just wanted to say that compiling the same source using FreePascal (only minor language changes) solved the problem.