diff --git a/parallel-rdp-standalone/vkguts.c b/parallel-rdp-standalone/vkguts.c index 410f758..9006f4e 100644 --- a/parallel-rdp-standalone/vkguts.c +++ b/parallel-rdp-standalone/vkguts.c @@ -10,8 +10,8 @@ static ptr_VidExt_Quit CoreVideo_Quit = NULL; static ptr_VidExt_SetCaption CoreVideo_SetCaption = NULL; static ptr_VidExt_ToggleFullScreen CoreVideo_ToggleFullScreen = NULL; static ptr_VidExt_ResizeWindow CoreVideo_ResizeWindow = NULL; -static ptr_VidExt_GetVkSurface CoreVideo_GetVkSurface = NULL; -static ptr_VidExt_GetVkInstExtensions CoreVideo_GetVkInstExtensions = NULL; +static ptr_VidExt_VK_GetSurface CoreVideo_GetVkSurface = NULL; +static ptr_VidExt_VK_GetInstanceExtensions CoreVideo_GetVkInstExtensions = NULL; static ptr_VidExt_SetVideoMode CoreVideo_SetVideoMode = NULL; static ptr_VidExt_GL_SwapBuffers CoreVideo_SwapCounter = NULL; @@ -23,8 +23,8 @@ void screen_init() CoreVideo_SetCaption = (ptr_VidExt_SetCaption)DLSYM(CoreLibHandle, "VidExt_SetCaption"); CoreVideo_ToggleFullScreen = (ptr_VidExt_ToggleFullScreen)DLSYM(CoreLibHandle, "VidExt_ToggleFullScreen"); CoreVideo_ResizeWindow = (ptr_VidExt_ResizeWindow)DLSYM(CoreLibHandle, "VidExt_ResizeWindow"); - CoreVideo_GetVkSurface = (ptr_VidExt_GetVkSurface)DLSYM(CoreLibHandle, "VidExt_GetVkSurface"); - CoreVideo_GetVkInstExtensions = (ptr_VidExt_GetVkInstExtensions)DLSYM(CoreLibHandle, "VidExt_GetVkInstExtensions"); + CoreVideo_GetVkSurface = (ptr_VidExt_VK_GetSurface)DLSYM(CoreLibHandle, "VidExt_VK_GetSurface"); + CoreVideo_GetVkInstExtensions = (ptr_VidExt_VK_GetInstanceExtensions)DLSYM(CoreLibHandle, "VidExt_VK_GetInstanceExtensions"); CoreVideo_SetVideoMode = (ptr_VidExt_SetVideoMode)DLSYM(CoreLibHandle, "VidExt_SetVideoMode"); CoreVideo_SwapCounter = (ptr_VidExt_GL_SwapBuffers)DLSYM(CoreLibHandle, "VidExt_GL_SwapBuffers"); @@ -47,9 +47,9 @@ void screen_toggle_fullscreen() CoreVideo_ToggleFullScreen(); } -VkSurfaceKHR screen_get_surface(VkInstance instance) +m64p_error screen_get_surface(VkSurfaceKHR* surface, VkInstance instance) { - return (VkSurfaceKHR)CoreVideo_GetVkSurface((void*)instance); + return CoreVideo_GetVkSurface((void**)surface, (void*)instance); } m64p_error screen_get_instance_extensions(const char ** ext[], uint32_t* ext_num) diff --git a/parallel-rdp-standalone/vkguts.h b/parallel-rdp-standalone/vkguts.h index 9724a5a..487d3c7 100644 --- a/parallel-rdp-standalone/vkguts.h +++ b/parallel-rdp-standalone/vkguts.h @@ -12,7 +12,7 @@ extern "C" void screen_close(); void screen_toggle_fullscreen(); void screen_set_mode(bool fullscreen); - VkSurfaceKHR screen_get_surface(VkInstance instance); + m64p_error screen_get_surface(VkSurfaceKHR* surface, VkInstance instance); m64p_error screen_get_instance_extensions(const char** ext[], uint32_t* ext_num); void screen_frame_count(); diff --git a/parallel-rdp-standalone/wsi_platform.cpp b/parallel-rdp-standalone/wsi_platform.cpp index bfeb4e6..1180a4f 100644 --- a/parallel-rdp-standalone/wsi_platform.cpp +++ b/parallel-rdp-standalone/wsi_platform.cpp @@ -4,7 +4,9 @@ VkSurfaceKHR QT_WSIPlatform::create_surface(VkInstance instance, VkPhysicalDevice gpu) { - return screen_get_surface(instance); + surface = nullptr; + screen_get_surface(&surface, instance); + return surface; } void QT_WSIPlatform::destroy_surface(VkInstance instance, VkSurfaceKHR surface) diff --git a/parallel-rdp-standalone/wsi_platform.h b/parallel-rdp-standalone/wsi_platform.h index 1d62a3e..273344d 100644 --- a/parallel-rdp-standalone/wsi_platform.h +++ b/parallel-rdp-standalone/wsi_platform.h @@ -13,4 +13,6 @@ public: bool alive(Vulkan::WSI &wsi) override; void poll_input() override; void do_resize(); +private: + VkSurfaceKHR surface; };