libwiigui and widescreen

Discussion in 'Wii - Emulation and Homebrew' started by boondoklife, Sep 27, 2011.

Sep 27, 2011

libwiigui and widescreen by boondoklife at 3:32 AM (604 Views / 0 Likes) 3 replies

  1. boondoklife
    OP

    Member boondoklife GBAtemp Regular

    Joined:
    Sep 12, 2009
    Messages:
    187
    Location:
    Jah's Pocket
    Country:
    United States
    I am playing around with libwiigui and was wondering if it just stretches the workarea to fit a 16:9 screen. I ask this as I loaded a single image and it looks stretched wider when viewed in 16:9 mode. (4:3 looks just the way it should). I am using v1.06 and just can't seem to understand why it is doing this.

    As a second point of interest, when I pipe out the current screenheight and screenwidth I always get 640x480 no matter if I am in 16:9 or 4:3 mode (I am changing the setting on both the TV and the Wii). Am I incorrect in thinking 16:9 should register as 720x480?

    Any info on this would be great.
     
  2. Jacobeian

    Member Jacobeian GBAtemp Advanced Maniac

    Joined:
    May 15, 2008
    Messages:
    1,879
    Country:
    Cuba
    I think 640x480 is actually the widest you can render with GX.

    And no, 720x480 does not necessarily mean 16:9, 4:3 and 16:9 actually refer to the shape of pixels, pixels are always "stretched" when using 16:9. It' just that a wider part of the image can be seen in 16:9 mode, but I think the exact amount of pixels actually vary upon TV models.

    The idea when rendering a widescreen image is to take the stretching in account and "downscale" the image with GX to 640x480, so that it takes its initial aspect ratio when stretched by the TV in 16:9 mode.
     
  3. boondoklife
    OP

    Member boondoklife GBAtemp Regular

    Joined:
    Sep 12, 2009
    Messages:
    187
    Location:
    Jah's Pocket
    Country:
    United States
    I think I got what your saying, but if the pixel aspext changes depending on the 4:3/16:9 setting then I need to have libwiigui set the image size apropriately correct?

    I supose I could loop through the images and setup the image dimensions to fit the current ratio accordingly. Is this the methodology that is sugested.
     
  4. Jacobeian

    Member Jacobeian GBAtemp Advanced Maniac

    Joined:
    May 15, 2008
    Messages:
    1,879
    Country:
    Cuba
    I think that if you apply for example 720x480 pixels PNG image to a 640x480 GUI element, the image will be downscaled during GX rendering to fit the element size, then later stretched:

    1) by the Wii video output if horizontal scaling is enabled (upscale ratio is vi_width / fb_width, those values being defined by the current rendering mode, which might be fixed by libwiigui, I don't know)

    2) by the TV if displayed in 16:9 mode (upscale ratio is 1.333 compared to 4:3 mode)


    WIth that in mind, you can indeed adjust the dimension of the images affected to your GUI elements to keep the desired aspect ratio, as well as the Wii horizontal scaling (by changing the vi_width value) to increase the number of active pixels.

    I don't know much about libwiigui though, that's just how I understand GX works, maybe libwiigui is expecting the image dimensions to be the same as GUI elements, I don't know.
     

Share This Page