none
Can't Create Surface unless we "disable full screen optimizations" RRS feed

  • Question

  • We have customers using Remote Desktop to log into a Windows 2019 Server running on AWS. Our EXE app starts up and runs just fine and uses DirectX for graphics and sound. But when customers close and reopen the Remote Desktop our app can no longer create DirectX surfaces. Here is the code that fails:

    ZeroMemory(&ddsdCur, sizeint(ddsdCur));
    ddsdCur.dwSize = sizeint(ddsdCur);
    ddsdCur.dwFlags = DDSD_CAPS;
    ddsdCur.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
    res = IDirectDraw_CreateSurface((LPDIRECTDRAW)pdd, &ddsdCur, (LPDIRECTDRAWSURFACE *)&pddsback, NULL);
    if (res != DD_OK) fatalerror();

    The result code (res) is DDERR_UNSUPPORTEDMODE -- The display is currently in an unsupported mode

    We have discovered if we check the new Windows 10 option to "disable full screen optimizations" then everything works as expected. The customers can open and close the Remote Desktop and the app is still there running fine. My questions is this: is there something we can do to be more compatible with full screen optimizations? We don't want to have all customers set this flag. What can we do to be compatible?

    Thanks in advance

    Friday, August 30, 2019 6:03 PM

Answers

All replies