mastodon.gamedev.place is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon server focused on game development and related topics.

Server stats:

5.6K
active users

So, . It's been out for a while, and I thought it would be safe to upgrade?

Except that the broke a most unexpected part of my side project: the Win32 API (and friends).

If you want to capture the pixels in another window, you have been able to use BitBlt since... forever. And this worked fine on Windows 10. But, now it doesn't.

Blair

To be more precise, you seem to be able to do it _once_ -- and you'll capture some good looking pixels. But subsequent calls don't seem to work.

I suspect Microsoft have been trying to deprecate it for a while, because windows aren't bitmaps anymore, they're DirectX buffers. There must have been some compat layer that made BitBlt work until now.

So, what to do? Well, to the best that I can tell, that's what the new API is for: learn.microsoft.com/en-us/wind

learn.microsoft.comScreen capture - UWP applicationsThe Windows.Graphics.Capture namespace provides APIs to acquire frames from a display or application window, to create video streams or snapshots to build collaborative and interactive experiences.

A couple of things that I'm chewing on:

- The app I'm building is traditional .NET WinForms because... well, it works. But the APIs aren't supported there.

- They _are_ supported in UWP -- but making a UWP app forces the use of the window picker, which will create some inefficiencies in my workflow.

- Also: UWP is deprecated, and it's not clear what the new hotness is.

I think OBS uses these APIs, so there must be another way to make it work. I'm still scratching my head over it.