mirror of
https://github.com/SysRay/psOff_public.git
synced 2024-10-07 03:43:54 +00:00
4k option
This commit is contained in:
parent
1eeaa0676a
commit
9ab8891684
@ -28,6 +28,7 @@ bool InitParams::init(int argc, char** argv) {
|
||||
("d", "Wait for debugger")
|
||||
("vkValidation", "Enable vulkan validation layers")
|
||||
("bright", "use srgb display format (brightness)")
|
||||
("4k", "try 4K display mode if game supports it")
|
||||
("vsync", po::value<bool>()->default_value(true), "Enable vertical synchronization")
|
||||
("file", po::value<std::string>(), "fullpath to applications binary")
|
||||
("root", po::value<std::string>(), "Applications root")
|
||||
@ -87,3 +88,7 @@ bool InitParams::enableBrightness() {
|
||||
bool InitParams::useVSYNC() {
|
||||
return _pImpl->m_vm["vsync"].as<bool>();
|
||||
}
|
||||
|
||||
bool InitParams::try4K() {
|
||||
return _pImpl->m_vm.count("4k");
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ class InitParams {
|
||||
bool enableValidation();
|
||||
bool enableBrightness();
|
||||
bool useVSYNC();
|
||||
bool try4K();
|
||||
~InitParams();
|
||||
};
|
||||
|
||||
|
@ -621,26 +621,25 @@ void VideoOut::getBufferAttribute(void* attribute, uint32_t pixel_format, int32_
|
||||
|
||||
auto [displayFormat, _] = vulkan::getDisplayFormat(m_vulkanObj);
|
||||
|
||||
// todo: needs gpu memory display image recreate
|
||||
// if (m_widthTotal >= 1920 && m_heightTotal >= 1080) {
|
||||
// *(SceVideoOutBufferAttribute*)attribute = SceVideoOutBufferAttribute {
|
||||
// .pixelFormat = SceVideoOutPixelFormat::PIXEL_FORMAT_A8R8G8B8_SRGB, // todo get vulkan pixel_format?
|
||||
// .tilingMode = tiling_mode,
|
||||
// .aspectRatio = aspect_ratio,
|
||||
// .width = m_widthTotal,
|
||||
// .height = m_heightTotal,
|
||||
// .pitchInPixel = m_widthTotal,
|
||||
// };
|
||||
// } else {
|
||||
|
||||
*(SceVideoOutBufferAttribute*)attribute = SceVideoOutBufferAttribute {
|
||||
.pixelFormat = SceVideoOutPixelFormat::PIXEL_FORMAT_A8R8G8B8_SRGB, // todo get vulkan pixel_format?
|
||||
.tilingMode = tiling_mode,
|
||||
.aspectRatio = aspect_ratio,
|
||||
.width = width,
|
||||
.height = height,
|
||||
.pitchInPixel = pitchInPixel,
|
||||
};
|
||||
if (accessInitParams()->try4K()) {
|
||||
*(SceVideoOutBufferAttribute*)attribute = SceVideoOutBufferAttribute {
|
||||
.pixelFormat = SceVideoOutPixelFormat::PIXEL_FORMAT_A8R8G8B8_SRGB, // todo get vulkan pixel_format?
|
||||
.tilingMode = tiling_mode,
|
||||
.aspectRatio = aspect_ratio,
|
||||
.width = 3840,
|
||||
.height = 2160,
|
||||
.pitchInPixel = 3840,
|
||||
};
|
||||
} else {
|
||||
*(SceVideoOutBufferAttribute*)attribute = SceVideoOutBufferAttribute {
|
||||
.pixelFormat = SceVideoOutPixelFormat::PIXEL_FORMAT_A8R8G8B8_SRGB, // todo get vulkan pixel_format?
|
||||
.tilingMode = tiling_mode,
|
||||
.aspectRatio = aspect_ratio,
|
||||
.width = std::min(width, 1920u),
|
||||
.height = std::min(height, 1080u),
|
||||
.pitchInPixel = std::min(width, 1920u),
|
||||
};
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user