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

Advanced game related topics
User avatar
chi
Addict
Addict
Posts: 1087
Joined: Sat May 05, 2007 5:31 pm
Location: Austria

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

Post 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
Et cetera is my worst enemy
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

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

Post 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
oh... and have a nice day.
User avatar
chi
Addict
Addict
Posts: 1087
Joined: Sat May 05, 2007 5:31 pm
Location: Austria

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

Post by chi »

thx kaeru, i´ll check that! so i assume there´s no way to do it pb internally?
Et cetera is my worst enemy
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

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

Post 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...?
oh... and have a nice day.
Post Reply