Add camera support for windows.#12572
Conversation
|
Very cool! How far back in Windows versions does this API work? Is it supported on Vista? I was dreading doing this because of DirectShow which I still have nightmares about (only slightly kidding)... |
|
Accordings to docs, most of them are supported on vista, maybe few are not supported though,like MFEnumDeviceSources function.It has a full support on win7.I think not many users on vista? |
|
It's just that I don't want a change to our minimum requirements to be accidental, it should be intentional. Currently PPSSPP supports Vista and forwards, so it would be good to be sure - if this API doesn't work there, we could simply disable it on Vista, keeping PPSSPP working for Vista users even though they won't get this feature. |
|
Yeah, it's right, I will comfirm this through VMware. |
| #endif | ||
|
|
||
| #ifdef _WIN32 | ||
| delete winCamera; |
There was a problem hiding this comment.
if (winCamera) { delete } ?
There was a problem hiding this comment.
Not really necessary as delete handles nullptr, but it's fine either way I think.
|
I've tested the first commit and I've observed that the image is stretched because the games ask for 480x272, but the webcam provides 640x480 (I think) which have a different aspect ratio. |
|
If you pass a smaller source height you should also offset, to center it vertically, I guess. Though I'm not sure how much that matters for these games... |
|
Improving stuff like that can be done later, good to get the functionality in, so I'm merging. |
Implement this with MF api,referenced some Microsoft docs and samples.


I tested Invizimals, it works fine on my laptop(with a Microsoft HD Webcam).
Preview:
Also has a basic support for multi camera switching.
EDIT by hrydgard: Helps #12337