merge doublemelon (#2067)

non-exhaustive (but exhausting) list of changes:

* base laid for multiple window support, but will likely require more work to work correctly
* encapsulation of frontend state for proper multi-instance support
* (JIT still needs a fix for the NDS::Current workaround but we can get there later)
* new, more flexible configuration system
This commit is contained in:
Arisotura
2024-06-15 13:52:47 +02:00
committed by GitHub
parent 8e9b88d01d
commit 25a7b1ca1d
111 changed files with 16802 additions and 5042 deletions

View File

@ -23,6 +23,8 @@
using namespace melonDS;
const char* kCamConfigPath[] = {"DSi.Camera0", "DSi.Camera1"};
#if QT_VERSION >= 0x060000
CameraFrameDumper::CameraFrameDumper(QObject* parent) : QVideoSink(parent)
@ -116,10 +118,11 @@ QList<QVideoFrame::PixelFormat> CameraFrameDumper::supportedPixelFormats(QAbstra
#endif
CameraManager::CameraManager(int num, int width, int height, bool yuv) : QObject()
CameraManager::CameraManager(int num, int width, int height, bool yuv)
: QObject(),
num(num),
config(Config::GetGlobalTable().GetTable(kCamConfigPath[num]))
{
this->num = num;
startNum = 0;
// QCamera needs to be controlled from the UI thread, hence this
@ -136,7 +139,7 @@ CameraManager::CameraManager(int num, int width, int height, bool yuv) : QObject
tempFrameBuffer = new u32[fbsize];
inputType = -1;
xFlip = false;
xFlip = config.GetBool("XFlip");
init();
}
@ -157,9 +160,9 @@ void CameraManager::init()
startNum = 0;
inputType = Config::Camera[num].InputType;
imagePath = QString::fromStdString(Config::Camera[num].ImagePath);
camDeviceName = QString::fromStdString(Config::Camera[num].CamDeviceName);
inputType = config.GetInt("InputType");
imagePath = config.GetQString("ImagePath");
camDeviceName = config.GetQString("DeviceName");
camDevice = nullptr;