This site is no longer active and is available for archival purposes only. Registration and login is disabled.

STL 4 or 4.5.3


STL 4 or 4.5.3

Postby kornalius » May 28, 2004 @ 4:13pm

User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby Kzinti » May 28, 2004 @ 4:49pm

Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby kornalius » May 28, 2004 @ 5:14pm

User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby DaGGeR » May 31, 2004 @ 9:53am

DaGGeR
 


Postby kornalius » Jun 1, 2004 @ 2:23am

User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby Kzinti » Jun 1, 2004 @ 2:34am

Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby adde » Jun 3, 2004 @ 2:24am

User avatar
adde
pm Member
 
Posts: 152
Joined: Oct 9, 2002 @ 1:42pm
Location: Stockholm / Sweden


Postby adde » Jun 3, 2004 @ 2:50am

In this note FZammetti is doing as I suggested earlier: http://www.pocketmatrix.com/forums/view ... hp?t=16749

i.e. just answer the newbie with a link.

But the question still stands: why is the topic still in the forum?? It has no use and provides no (new) answers: hence, it should be removed!

There's a reason for newcomers not reading 8 pages of old posts and that is simply because there are to many OLD posts. Unrelated old stuff should be weeded out by someone (and/or the still usefull stuff for new users should, as I said earlier, be collected into a new forum/webpage/wiki).
User avatar
adde
pm Member
 
Posts: 152
Joined: Oct 9, 2002 @ 1:42pm
Location: Stockholm / Sweden


Postby kornalius » Jun 3, 2004 @ 2:51am

Stupid questions? :roll: ... Maybe.

This place is here to answer our questions no? I use PocketFrog and I want support just like everybody here.
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby fast_rx » Jun 3, 2004 @ 3:00am

User avatar
fast_rx
pm Member
 
Posts: 660
Joined: Jun 10, 2003 @ 4:24pm


Postby adde » Jun 3, 2004 @ 10:55am

"This place is here to answer our questions no? I use PocketFrog and I want support just like everybody here."
Exactly my point. But posting new topics for something that has already been dealt with previously is just redundant.

And yes fast_rx, I do realize the irony of not simply refeering to some old post myself (although I did that to). But I feel like someone should take the initiative to this debate. Or, it could be just me and that nobody really cares about all the newbies not reading through the old notes because there are far to many BS notes still laying around (like this one in a few weeks). This will benefit everyone (inkluding newbies).
User avatar
adde
pm Member
 
Posts: 152
Joined: Oct 9, 2002 @ 1:42pm
Location: Stockholm / Sweden


Postby kornalius » Jun 3, 2004 @ 9:50pm

Adde, see this thread http://www.pocketmatrix.com/forums/view ... hp?t=16722 , the last two posts from me. Maybe you can use some of your knowledge to try to help a NEWBIE.

Edit: Fixed the coma at the end of the link!

Regards,
Kornalius
Last edited by kornalius on Jun 4, 2004 @ 3:30pm, edited 1 time in total.
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby adde » Jun 4, 2004 @ 2:21am

First out, the link Kornelius posted does not work since it has a trailing "," char at the end.. Simply remove it and you will get to topic 16722.

I've already read that post (before answering this one) and to quote Thierry from that thread:
"If I remember correctly, you have two things to do:
1) Call PocketPC::Shutdown() or something similar. Look up how the framework shuts down.
2) Modify PocketPC. There is a problem with pointers not being reset to 0 for the display and input drivers.
Someone already discussed this a few months ago and got it working.
BTW, posting tons of replies won't get you help any faster."


and then his second post:
"Oh sorry you are right, there is no PocketPC::Shutdown. I guess you will need to add it.
The problem is with the two following variables (in PocketPC.cpp):
DisplayDriver* l_displayDriver; //fixme: leak at exit
InputDriver* l_inputDriver; //fixme: leak at exit

See the comments? =) You will have to create a Shutdown() function in PPC that destroy these two objects and set them back to NULL.
In Game::Shutdown() after the two pointer resets(), you want to call PocketPC::Shutdown(). This should do it. After that you can reinitialize everything."


The reason for not posting an answer is that you already have all the information you need (provided you are prepared to get your hands dirty and look into the actual source file of pocketpc.cpp and realize that the reason you can't start up a window twice is because the global (well, actually local to the file) pointers l_displayDriver and l_inputDriver are never reset to NULL at shutdown (or even worse, the object that it is pointing to is never deleted although all the memory that it once allocated for its members is).

There.. I just said the exact same thing as Thierry did in the other thread.

But since I am a really nice guy I'll even throw in a bonus and that is my modified version of the pocketpc.h/.cpp files where I have added a static function that I chose to name "InvalidateDrivers()". Make sure you call this function in your Game::Shutdown() func after m_display.reset()

I even call it before doing PocketPC::CreateDisplay() in the Game::Init(). This has to do with the fact that the pointers are never properly initialized either. Thierry is heavily relying on the fact that: "The C standard dictates that any static values that aren't explicitly initialized in the code must be initialized to zero, but nonstatic values are undefined." Also, I needed to be able to call CreateDisplay multiple times. This is probably not supported on the PocketPC platform using GAPI but it is on a WCE platform or desktop using the W32 drivers.

I did this modification since I needed to be able to launch multiple windows using PF and ATL (I had a 800x600 resolution on my PDA). To be able to handle this I also needed to add threads and add some of the stuff that FZammetti later did for PF 0.7.0 to be able to use Heckus together with PF.

To be honest, these modifications is only a quick hack. What you would like is to do a proper delete on these pointers at shutdown and not call the function during init. Hence, rename InvalidateDrivers to Shutdown and then change:
l_displayDriver=0; and l_inputDriver=0;
to
delete l_displayDriver; and delete l_inputDriver;

You can find my modified files at http://www.nada.kth.se/~t98_hes/pf/ together with some other stuff you may or may not find useful (probably not hugh).

A big appology for once again writing about something that has been dealt with before on this forum.. This seems to be a pattern that is extremely hard to break. I will post a new topic during the weekend containing information about a free WIKI where people can maintain an FAQ and knowledge database (it's sort of like this forum but with a higher ability to cross reference and link between topics and later remove old/outdated/false/non interesting information.)
User avatar
adde
pm Member
 
Posts: 152
Joined: Oct 9, 2002 @ 1:42pm
Location: Stockholm / Sweden


Postby kornalius » Jun 4, 2004 @ 3:27pm

User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby adde » Jun 4, 2004 @ 4:28pm

You've repeated comments that weren't necessary!

Ok.. sorry about that.. For the STL issues I can only suggest that you use the search function of this forum for STL problem as they are all described and solved. Two hints though:
1. You're not suppose to compile STL lib. It can't be done on a PocketPC.
2. You basicly just need a stl_user_config.h file with the right settings in order to get it to work.. All this is explained in the FAQ and on other posts. And the config file is even included in PF (atleast in 0.6.0). The stuff you need to change is with the iostreams since they are not implemented on the PPC.

Also.. I seem to recall having problem myself in the beginning because I used a newer version of STLport.. You just grab the one that is working (and that is again posted here and there and in the FAQ).

This will be my final post on this thread. I've written to much already.
User avatar
adde
pm Member
 
Posts: 152
Joined: Oct 9, 2002 @ 1:42pm
Location: Stockholm / Sweden


Next

Return to PocketFrog & PocketHAL


Sort


Forum Description

SDKs for fast and robust device-independent access to Pocket PC display hardware.

Moderators:

sponge, Kzinti

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron