actual DSi camera support (#1520)

basically feeding something that isn't a fixed stripe pattern, and emulating enough of the camera hardware to make this work
This commit is contained in:
Arisotura
2022-10-02 16:47:57 +02:00
committed by GitHub
parent c1c4cbc838
commit 3f4573574a
23 changed files with 2024 additions and 270 deletions

View File

@ -33,6 +33,7 @@
#include "Platform.h"
#include "Config.h"
#include "ROMManager.h"
#include "CameraManager.h"
#include "LAN_Socket.h"
#include "LAN_PCap.h"
#include "LocalMP.h"
@ -40,8 +41,11 @@
std::string EmuDirectory;
extern CameraManager* camManager[2];
void emuStop();
namespace Platform
{
@ -99,7 +103,6 @@ void IPCDeInit()
IPCBuffer->detach();
delete IPCBuffer;
}
IPCBuffer = nullptr;
}
@ -492,8 +495,6 @@ u16 MP_RecvReplies(u8* data, u64 timestamp, u16 aidmask)
return LocalMP::RecvReplies(data, timestamp, aidmask);
}
bool LAN_Init()
{
if (Config::DirectLAN)
@ -537,4 +538,20 @@ int LAN_RecvPacket(u8* data)
return LAN_Socket::RecvPacket(data);
}
void Camera_Start(int num)
{
return camManager[num]->start();
}
void Camera_Stop(int num)
{
return camManager[num]->stop();
}
void Camera_CaptureFrame(int num, u32* frame, int width, int height, bool yuv)
{
return camManager[num]->captureFrame(frame, width, height, yuv);
}
}