title: DXGI API: AcquireNextFrame() never grabs an updated image, always blank
body: <p>I've been playing around with someone else's code that implements the DXGI desktop duplication API and I've run into a strange issue. Here's the github link to the code I am using.</p>
  
  <p><a href="https://github.com/diederickh/screen_capture/blob/master/src/test/test_win_api_directx_research.cpp" rel="nofollow noreferrer">https://github.com/diederickh/screen_capture/blob/master/src/test/test_win_api_directx_research.cpp</a></p>
  
  <p>All the code works fine up until I try to see what's in D3D11_MAPPED_SUBRESOURCE map.pData where all I get is a blank screen, specifically it's a repeating set of 0xFF000000, black at full alpha. Looking around for other solutions, I found that someone solved this problem using a while loop to check for when the frame successfully updates.</p>
  
  <pre><code>while (true)
  {
      hr = duplication-&gt;AcquireNextFrame(INFINITE, &amp;frame_info, &amp;desktop_resource);
      if (hr &amp;&amp; frame_info.LastPresentTime.QuadPart)
      {
          break;
      }
  }
  </code></pre>
  
  <p>However, when I run this code, the console never exits and continues to run forever. Apparently, according to frame_info.LastPresentTime.QuadPart, the frame is never updating. What could be causing this? Is there a known condition that can cause this?</p>