Skip to content

Commit 393c7e2

Browse files
make melonDS camera stub produce an all black image
all 0s (default) is green in yuv (what always gets used in practice)
1 parent 87034fa commit 393c7e2

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Assets/dll/melonDS.wbx.zst

1.31 KB
Binary file not shown.

waterbox/melon/BizPlatform/BizPlatformStubs.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,18 @@ void Camera_Stop(int num, void* userdata)
133133
void Camera_CaptureFrame(int num, u32* frame, int width, int height, bool yuv, void* userdata)
134134
{
135135
// TODO
136+
137+
u32 length = width * height;
138+
if (yuv)
139+
{
140+
length /= 2;
141+
}
142+
143+
u32 black = yuv ? 0x80008000 : 0x00000000;
144+
for (u32 i = 0; i < length; i++)
145+
{
146+
frame[i] = black;
147+
}
136148
}
137149

138150
bool Addon_KeyDown(KeyType type, void* userdata)

0 commit comments

Comments
 (0)