Use of PdSetTargetDevice

Linked to my previous Topic “PtRaw use”:
openqnx.com/PNphpBB2-viewtopic-t1106-.html

In order to use PgGetVideoMode, PgGetVideoModeInfo, PgGetPalette, PgGetGraphicsHWCaps, Tutorial QNX always say “You must target this function at a specific card by calling PdSetTargetDevice …”
So, I suppose that PdSetTargetDevice has to be called before one of these functions.
My problem is that my calls to above functions return always errors : when I try to use PdSetTargetDevice or not.
I looked for examples on web and I find a lot of use case where these functions are used without previous call to PdSetTargetDevice.

So, is PdSetTargetDevice mandatory ? If yes, how to use it ? If not, what does the tutorial mean ?

Hi there

Regarding PdSetTargetDevice this function wasn’t even present in early versions of “Momentics” (acctually before momentics excisted…)<6.1 IIRC.

That’s probably why many examples out there does not use this function.
What more specifically does the Videomode functions return to you? I’ve seen them being used correctly on several places and toyed around with them a bit myself.

And no ,that call is not mandatory, but your application might not work too well on machines running with multiple monitors.

Cheers!
/Johan Björk