--
[ Picked text/plain from multipart/alternative ]
Doesn't work. Hopefully someone from Valve will see this... I'd prefer not
to hardcode these resolutions

On 7/12/07, Jonathan Murphy <[EMAIL PROTECTED]> wrote:
>
> --
> [ Picked text/plain from multipart/alternative ]
> Forgot this:
>
> #define MAX_MODE_DESCRIPTION_LEN 32
>
> On 7/12/07, Jonathan Murphy <[EMAIL PROTECTED]> wrote:
> >
> > Try this struct instead:
> >
> > typedef struct vmode_s
> > {
> >     int            width;
> >     int            height;
> >     int            bpp;
> >     char        modedesc[ MAX_MODE_DESCRIPTION_LEN ];
> > } vmode_t;
> >
> > On 7/12/07, Matt Stafford <[EMAIL PROTECTED]> wrote:
> > >
> > > --
> > > [ Picked text/plain from multipart/alternative ]
> > > Hey all,
> > > As per another thread talking about a custom Options menu, I had a go
> at
> > > re-creating the Video options with relatively good success. However, I
> > > hit
> > > some serious issues when I tried to re-create the resolution changer.
> I
> > > found the function GetVideoModes( struct vmode_s **liststart, int
> *count
> > > )
> > > in the IGameUIFuncs interface, which I've used with a bit of success.
> > > However, the weird problem is this
> > > Firstly, when I call the function, I get 35 resolutions. This is all
> > > well
> > > and good, except 20 or so of them are -1114130x-1114130. For the
> others,
> > > every 3rd resolution is correct, but the other 2 switch the width and
> > > color
> > > depth, and then the width and color depth.
> > > So, I'm getting results such as
> > > 640x480x32
> > > 32x720x960
> > > 1280x32x768
> > > 848x480x32
> > >
> > > This repeats up until 1400x1050, before the -1114130 results.
> > >
> > > The members I've got for the vmode_s struct are
> > > int width;
> > > int height;
> > > int bpp;
> > >
> > > I'm almost certain that I'm using this function incorrectly, but I
> > > really
> > > don't know the correct members of the vmode_s struct in order to do it
> > > properly. The fact that I get some valid resolutions, then some with
> the
> > > bpp
> > > and width/height switched and then a bunch of invalid ones means that
> > > I've
> > > gone wrong somewhere, as I imagine its the function Valve are using to
> > > populate their res combo box.
> > >
> > > Anyone got any ideas? I'm hoping for a reply from someone from Valve,
> > > because I don't think anyone else has attempted to re-make this part
> of
> > > the
> > > Options menu yet, so I doubt this function has needed to be used
> > >
> > > Cheers
> > > Matt
> > >
> > > --
> > > Matt Stafford (Wraiyth)
> > > http://www.wraiyth.com
> > > NightFall HL2 Mod - http://www.nightfallmod.com
> > > --
> > >
> > > _______________________________________________
> > > To unsubscribe, edit your list preferences, or view the list archives,
> > > please visit:
> > > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > >
> > >
> >
> >
> > --
> > Lead Programmer for Resistance and Liberation
> > www.resistanceandliberation.com
>
>
>
>
> --
> Lead Programmer for Resistance and Liberation
> www.resistanceandliberation.com
> --
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>


--
Matt Stafford (Wraiyth)
http://www.wraiyth.com
NightFall HL2 Mod - http://www.nightfallmod.com
--

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to