mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
libretro: Fix screen size problem in Vulkan.
(Still something is slightly off, there are duplicated lines on screen. Can't figure out what)
This commit is contained in:
parent
dffc36b854
commit
61567796a2
4 changed files with 20 additions and 9 deletions
|
@ -1704,6 +1704,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="..\libretro\CMakeLists.txt" />
|
||||
<Text Include="..\libretro\README_WINDOWS.txt" />
|
||||
<Text Include="..\ppge_atlasscript.txt" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
|
|
|
@ -729,5 +729,8 @@
|
|||
<Text Include="..\libretro\CMakeLists.txt">
|
||||
<Filter>Other Platforms\libretro</Filter>
|
||||
</Text>
|
||||
<Text Include="..\libretro\README_WINDOWS.txt">
|
||||
<Filter>Other Platforms\libretro</Filter>
|
||||
</Text>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -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; }
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <condition_variable>
|
||||
|
||||
#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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue