I am having some issues with reloading DirectFB.
I have written an application that does the following:
DirectFBCreate
some directfb stuff
pDFB->Release(); //Release the main interface.
I then recreate DirectFB interface by calling DirectFBCreate again
DirectfbCreate();
more directfb stuff;
The problem is that when the application starts up it searches the gfxdrivers for my platform specific gfxdriver shared library.
It finds it, loads it and does the drawing I requested.
I then release the main interface.
I then create it again. However, it now searches the gfxdrivers directory and decides to not load my platform specific gfxdriver shared library and instead loads the Generic Software Rasterizer and this does not work in the same way.
I have found that if i edit the file src/core/gfxcard.c in the function dfb_gfxcard_shutdown
And add the following lines
D_FREE(card->module->file);
D_FREE(card->module->name);
I can make it try to load my gfxdriver when it creates the main interface the second time.
I then get the error in function:
direct_modules_explore_directory
D_ERROR( "Direct/Modules: Module '%s' did not register itself after loading! "
"Trying default module constructor...\n", entry->d_name );
It then gives the following error:
if (!module->loaded)
{
D_ERROR( "Direct/Modules: ... even did not register after "
"explicitly calling the module constructor!\n" );
}
If i edit the symbol it tries to load in the dlsym and make it the known entry point of my gfxdriver module (directfb_myarch) then i can make this work.
It fails to load the module but then tries the default constructor using the entry point that i have modified and it works.
Does anyone have any idea why this might work the first time and not the second and if there is a bug in DirectFB and if i am doing the correct thing as I need to solve this and do not want to go the wrong way.
I am using all of the DirectFB macros when created my gfx drivers.
Hope someone might be able to help me
cheers
Dan
Express yourself instantly with MSN Messenger! MSN Messenger
_______________________________________________ directfb-dev mailing list [email protected] http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
