diff --git a/Windows/PPSSPP.vcxproj b/Windows/PPSSPP.vcxproj index 55a21f5a1d..bef161003e 100644 --- a/Windows/PPSSPP.vcxproj +++ b/Windows/PPSSPP.vcxproj @@ -1704,6 +1704,7 @@ + diff --git a/Windows/PPSSPP.vcxproj.filters b/Windows/PPSSPP.vcxproj.filters index ffbdc51429..141d03a3ca 100644 --- a/Windows/PPSSPP.vcxproj.filters +++ b/Windows/PPSSPP.vcxproj.filters @@ -729,5 +729,8 @@ Other Platforms\libretro + + Other Platforms\libretro + \ No newline at end of file diff --git a/libretro/libretro.cpp b/libretro/libretro.cpp index bdb5f8d1b1..52ff150474 100644 --- a/libretro/libretro.cpp +++ b/libretro/libretro.cpp @@ -34,6 +34,7 @@ #include "GPU/GPUInterface.h" #include "GPU/Common/FramebufferManagerCommon.h" #include "GPU/Common/TextureScalerCommon.h" +#include "GPU/Common/PresentationCommon.h" #include "libretro/libretro.h" #include "libretro/LibretroGraphicsContext.h" @@ -318,10 +319,8 @@ static void check_variables(CoreParameter &coreParam) if (!PSP_IsInited() && ppsspp_internal_resolution.Update(&g_Config.iInternalResolution)) { - coreParam.pixelWidth = coreParam.renderWidth = - g_Config.iInternalResolution * 480; - coreParam.pixelHeight = coreParam.renderHeight = - g_Config.iInternalResolution * 272; + coreParam.pixelWidth = coreParam.renderWidth = g_Config.iInternalResolution * 480; + coreParam.pixelHeight = coreParam.renderHeight = g_Config.iInternalResolution * 272; if (gpu) { @@ -421,7 +420,7 @@ void retro_get_system_av_info(struct retro_system_av_info *info) info->geometry.base_height = g_Config.iInternalResolution * 272; info->geometry.max_width = g_Config.iInternalResolution * 480; info->geometry.max_height = g_Config.iInternalResolution * 272; - info->geometry.aspect_ratio = 16.0 / 9.0; + info->geometry.aspect_ratio = 480.0 / 272.0; // Not 16:9! But very, very close. } unsigned retro_api_version(void) { return RETRO_API_VERSION; } diff --git a/libretro/libretro_vulkan.cpp b/libretro/libretro_vulkan.cpp index b046368ae4..1081f95e0b 100644 --- a/libretro/libretro_vulkan.cpp +++ b/libretro/libretro_vulkan.cpp @@ -13,6 +13,7 @@ #include #include "Common/Log.h" +#include "Core/Config.h" #define VK_NO_PROTOTYPES #include "libretro/libretro_vulkan.h" @@ -134,8 +135,15 @@ static VKAPI_ATTR VkResult VKAPI_CALL vkCreateLibretroSurfaceKHR(VkInstance inst VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilitiesKHR_libretro(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *pSurfaceCapabilities) { VkResult res = vkGetPhysicalDeviceSurfaceCapabilitiesKHR_org(physicalDevice, surface, pSurfaceCapabilities); if (res == VK_SUCCESS) { - pSurfaceCapabilities->currentExtent.width = -1; - pSurfaceCapabilities->currentExtent.height = -1; + int w = g_Config.iInternalResolution * 480; + int h = g_Config.iInternalResolution * 272; + + pSurfaceCapabilities->minImageExtent.width = w; + pSurfaceCapabilities->minImageExtent.height = h; + pSurfaceCapabilities->maxImageExtent.width = w; + pSurfaceCapabilities->maxImageExtent.height = h; + pSurfaceCapabilities->currentExtent.width = w; + pSurfaceCapabilities->currentExtent.height = h; } return res; } @@ -415,7 +423,7 @@ void vk_libretro_set_hwrender_interface(retro_hw_render_interface *hw_render_int } void vk_libretro_shutdown() { - memset(&vk_init_info, 0x00, sizeof(vk_init_info)); - vulkan = NULL; + memset(&vk_init_info, 0, sizeof(vk_init_info)); + vulkan = nullptr; DEDICATED_ALLOCATION = false; }