initial video out context object

This commit is contained in:
georgemoralis 2023-08-22 00:54:44 +03:00
parent 0799c59e3f
commit a8b020b153
3 changed files with 42 additions and 1 deletions

View file

@ -0,0 +1,14 @@
#include "video_out_ctx.h"
namespace HLE::Graphics::Objects {
void VideoOutCtx::Init(u32 width, u32 height) {
for (auto& video_ctx : m_video_out_ctx) {
video_ctx.m_resolution.fullWidth = width;
video_ctx.m_resolution.fullHeight = height;
video_ctx.m_resolution.paneWidth = width;
video_ctx.m_resolution.paneHeight = height;
}
}
void VideoOutCtx::Open() {}
}; // namespace HLE::Graphics::Objects

View file

@ -0,0 +1,27 @@
#pragma once
#include <Core/PS4/HLE/Graphics/video_out.h>
#include <Lib/Threads.h>
using namespace HLE::Libs::Graphics::VideoOut;
namespace HLE::Graphics::Objects {
struct VideoConfigInternal {
Lib::Mutex m_mutex;
SceVideoOutResolutionStatus m_resolution;
bool isOpened = false;
};
class VideoOutCtx {
static constexpr int MAX_VIDEO_OUT = 2;
public:
VideoOutCtx() {}
virtual ~VideoOutCtx() {}
void Init(u32 width, u32 height);
void Open();
private:
Lib::Mutex m_mutex;
VideoConfigInternal m_video_out_ctx[MAX_VIDEO_OUT];
};
}; // namespace HLE::Graphics::Objects