mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-21 02:45:00 +00:00
initial video out context object
This commit is contained in:
parent
0799c59e3f
commit
a8b020b153
3 changed files with 42 additions and 1 deletions
14
src/Core/PS4/HLE/Graphics/Objects/video_out_ctx.cpp
Normal file
14
src/Core/PS4/HLE/Graphics/Objects/video_out_ctx.cpp
Normal 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
|
27
src/Core/PS4/HLE/Graphics/Objects/video_out_ctx.h
Normal file
27
src/Core/PS4/HLE/Graphics/Objects/video_out_ctx.h
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue