mirror of
https://github.com/SysRay/psOff_public.git
synced 2024-11-23 06:19:41 +00:00
commit
63dd5ad3b5
@ -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),
|
||||
};
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
|
@ -626,9 +626,11 @@ VkDevice createDevice(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, Vul
|
||||
};
|
||||
|
||||
VkPhysicalDeviceBufferDeviceAddressFeatures bufferDeviceAddress {
|
||||
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES, .pNext = &colorWriteExt, .bufferDeviceAddress = VK_TRUE,
|
||||
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES,
|
||||
.pNext = &colorWriteExt,
|
||||
.bufferDeviceAddress = VK_TRUE,
|
||||
|
||||
//.bufferDeviceAddressCaptureReplay = enableValidation ? VK_TRUE : VK_FALSE,
|
||||
.bufferDeviceAddressCaptureReplay = enableValidation ? VK_TRUE : VK_FALSE,
|
||||
};
|
||||
|
||||
VkPhysicalDeviceDescriptorIndexingFeatures descIndexing {
|
||||
|
@ -43,26 +43,28 @@ EXPORT SYSV_ABI int sceNpTrophyUnlockTrophy(SceNpTrophyContext context, SceNpTro
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceNpTrophyGetTrophyUnlockState(SceNpTrophyContext context, SceNpTrophyHandle handle, SceNpTrophyFlagArray* flags, uint32_t* count) {
|
||||
flags->flagBits[0] = 0;
|
||||
flags->flagBits[1] = 0;
|
||||
flags->flagBits[2] = 0;
|
||||
flags->flagBits[3] = 0;
|
||||
|
||||
if (flags != nullptr) {
|
||||
flags->flagBits[0] = 0;
|
||||
flags->flagBits[1] = 0;
|
||||
flags->flagBits[2] = 0;
|
||||
flags->flagBits[3] = 0;
|
||||
}
|
||||
*count = 2;
|
||||
|
||||
return Ok;
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceNpTrophyGetGameInfo(SceNpTrophyContext context, SceNpTrophyHandle handle, SceNpTrophyGameDetails* details, SceNpTrophyGameData* data) {
|
||||
details->numGroups = 0;
|
||||
details->numTrophies = 1;
|
||||
details->numPlatinum = 0;
|
||||
details->numGold = 0;
|
||||
details->numSilver = 0;
|
||||
details->numBronze = 1;
|
||||
|
||||
strcpy_s(details->title, "tropyName");
|
||||
strcpy_s(details->description, "tropyDesc");
|
||||
if (details != nullptr) {
|
||||
details->numGroups = 0;
|
||||
details->numTrophies = 1;
|
||||
details->numPlatinum = 0;
|
||||
details->numGold = 0;
|
||||
details->numSilver = 0;
|
||||
details->numBronze = 1;
|
||||
strcpy_s(details->title, "tropyName");
|
||||
strcpy_s(details->description, "tropyDesc");
|
||||
}
|
||||
|
||||
if (data != nullptr) {
|
||||
data->unlockedTrophies = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user