diff --git a/parallel-rdp-standalone/parallel_imp.cpp b/parallel-rdp-standalone/parallel_imp.cpp index a3ab0a4..b5d4e7d 100644 --- a/parallel-rdp-standalone/parallel_imp.cpp +++ b/parallel-rdp-standalone/parallel_imp.cpp @@ -260,6 +260,7 @@ void vk_rasterize() render_frame(device); (*render_callback)(1); wsi->end_frame(); + screen_frame_count(); wsi->begin_frame(); } diff --git a/parallel-rdp-standalone/vkguts.c b/parallel-rdp-standalone/vkguts.c index 22892e0..bcfb1a4 100644 --- a/parallel-rdp-standalone/vkguts.c +++ b/parallel-rdp-standalone/vkguts.c @@ -13,6 +13,7 @@ static ptr_VidExt_ResizeWindow CoreVideo_ResizeWindow = NULL; static ptr_VidExt_GetVkSurface CoreVideo_GetVkSurface = NULL; static ptr_VidExt_GetVkInstExtensions CoreVideo_GetVkInstExtensions = NULL; static ptr_VidExt_SetVideoMode CoreVideo_SetVideoMode = NULL; +static ptr_VidExt_GL_SwapBuffers CoreVideo_SwapCounter = NULL; void screen_init() { @@ -25,6 +26,7 @@ void screen_init() CoreVideo_GetVkSurface = (ptr_VidExt_GetVkSurface)DLSYM(CoreLibHandle, "VidExt_GetVkSurface"); CoreVideo_GetVkInstExtensions = (ptr_VidExt_GetVkInstExtensions)DLSYM(CoreLibHandle, "VidExt_GetVkInstExtensions"); CoreVideo_SetVideoMode = (ptr_VidExt_SetVideoMode)DLSYM(CoreLibHandle, "VidExt_SetVideoMode"); + CoreVideo_SwapCounter = (ptr_VidExt_GL_SwapBuffers)DLSYM(CoreLibHandle, "VidExt_GL_SwapBuffers"); CoreVideo_Init(); CoreVideo_SetCaption("Mupen64Plus-Parallel"); @@ -54,3 +56,8 @@ m64p_error screen_get_instance_extensions(const char ** ext[], uint32_t* ext_num { return CoreVideo_GetVkInstExtensions(ext, ext_num); } + +void screen_frame_count() +{ + CoreVideo_SwapCounter(); +} diff --git a/parallel-rdp-standalone/vkguts.h b/parallel-rdp-standalone/vkguts.h index 2527a09..a663c2a 100644 --- a/parallel-rdp-standalone/vkguts.h +++ b/parallel-rdp-standalone/vkguts.h @@ -14,6 +14,7 @@ extern "C" void screen_set_mode(bool fullscreen); VkSurfaceKHR screen_get_surface(VkInstance instance); m64p_error screen_get_instance_extensions(const char** ext[], uint32_t* ext_num); + void screen_frame_count(); extern bool window_fullscreen; extern bool window_widescreen;