#36 XaAES blue icons

v1.0_(example)
closed
Petr Stehlik
None
1
2013-01-23
2013-01-22
Vincent Rivière
No

Using ARanYM 0.9.14 on Windows, fVDI, FreeMiNT and XaAES.

Sometimes at startup, the XaAES logo has a dark blue background. Same for the mint icon in the XaAES about box.
Sometimes, the icons are partially blue: the top has blue background, while the bottom is normal.

This problems occurs only with ARAnyM+fVDI, preferably with JIT version.

Discussion

  • The problem comes from src/natfeat/nfvdi.cpp, when fVDI switches to 32-bit display.

    In VdiDriver::setResolution(), a new HostSurface is created immediately for the VDI driver.

    Then the video mode change is applied to the host window only on next VBL, in HostScreen::refreshSurface().

    But in VdiDriver::expandArea(), there is a bogus test:
    if (host->video->getBpp() == 8) {
    This is wrong, because the VDI makes a test on the host window surface, which will only be correct on next VBL.

    So there is a short period of time at startup when VdiDriver::expandArea() is not consistent with the new video mode. And it is precisely in this short period of time that XaAES converts its bitmaps, resulting in blue icons.

    This strange blue color comes from fgColor and bgColor which are actually 32-bit white, but the inapprapriate &= 0xff operation makes it blue.

    The attached patch fixes this problem. Please commit.

     
    Attachments
  • Petr Stehlik
    Petr Stehlik
    2013-01-23

    • status: open --> closed
    • assigned_to: Petr Stehlik
     
  • Petr Stehlik
    Petr Stehlik
    2013-01-23

    Thank you for the provided patch, it's been committed.