Page 1 of 1

deInitSprit() OR ExamineScreenModes() without InitSprite() ?

Posted: Thu Nov 26, 2009 2:14 pm
by chi
i need to call ExamineScreenModes() from a dll to extend my b3d-engine with a screen mode requester... starts/works nice so far ;)
but when i close my engine it´ll crash (vc++ runtime error) caused by InitSprite().

so i really need something similar to deInitSprite() or maybe an other way to get all available screen modes (win only)... any ideas?

maybe its a silly question but i never touched pb´s engine3d so i´m not very familiar with it ;)


thx, chi

Re: deInitSprit() OR ExamineScreenModes() without InitSprite() ?

Posted: Thu Nov 26, 2009 2:35 pm
by Kaeru Gaman
maybe an other way to get all available screen modes (win only)
have a look at the EnumDisplaySettings API function...
http://msdn.microsoft.com/en-us/library/aa920775.aspx

Re: deInitSprit() OR ExamineScreenModes() without InitSprite() ?

Posted: Thu Nov 26, 2009 3:30 pm
by chi
thx kaeru, i´ll check that! so i assume there´s no way to do it pb internally?

Re: deInitSprit() OR ExamineScreenModes() without InitSprite() ?

Posted: Thu Nov 26, 2009 5:02 pm
by Kaeru Gaman
how should I know?
I never tried to examine screenmodes and then not using it.

I don't exactly understand your problem, I admit.

so, your b3d engine is a dll...?
you want an examine thingy in your dll...?
you have other screen functionalities in your dll...?

is the problem, when you build an examine into your dll, it needs the INIT, and this already called INIT crashes the other parts of your engine because it calls INIT a second time...?

so, why don't you just give your Engine a single extra INIT call...?
or work with an DLL internal FLAG to mark if INIT was already called or not...?