mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-06-28 09:59:41 -06:00
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:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user