From 6a0e4d860f55eb4f5cdef00e97bd95bca788505b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Gu=C3=A9rin?= Date: Thu, 9 Dec 2021 22:36:57 -0800 Subject: [PATCH] mantle: add grWsiWinReleaseFullscreenOwnership semi-stub fixes BF4 fullscreen --- src/mantle/mantle_wsi.c | 16 ++++++++++++++++ src/mantle/stub.c | 7 ------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/mantle/mantle_wsi.c b/src/mantle/mantle_wsi.c index d70b1204..d1c2c134 100644 --- a/src/mantle/mantle_wsi.c +++ b/src/mantle/mantle_wsi.c @@ -466,6 +466,22 @@ GR_RESULT GR_STDCALL grWsiWinTakeFullscreenOwnership( return GR_SUCCESS; } +GR_RESULT GR_STDCALL grWsiWinReleaseFullscreenOwnership( + GR_WSI_WIN_DISPLAY display) +{ + LOGT("%p\n", display); + GrWsiWinDisplay* grWsiWinDisplay = (GrWsiWinDisplay*)display; + + if (grWsiWinDisplay == NULL) { + return GR_ERROR_INVALID_HANDLE; + } else if (GET_OBJ_TYPE(grWsiWinDisplay) != GR_OBJ_TYPE_WSI_WIN_DISPLAY) { + return GR_ERROR_INVALID_OBJECT_TYPE; + } + + LOGW("semi-stub\n"); // TODO finish + return GR_SUCCESS; +} + GR_RESULT GR_STDCALL grWsiWinCreatePresentableImage( GR_DEVICE device, const GR_WSI_WIN_PRESENTABLE_IMAGE_CREATE_INFO* pCreateInfo, diff --git a/src/mantle/stub.c b/src/mantle/stub.c index 0b2995af..ccb42caa 100644 --- a/src/mantle/stub.c +++ b/src/mantle/stub.c @@ -208,13 +208,6 @@ GR_VOID GR_STDCALL grCmdDbgMarkerEnd( // WSI Functions -GR_RESULT GR_STDCALL grWsiWinReleaseFullscreenOwnership( - GR_WSI_WIN_DISPLAY display) -{ - LOGW("STUB\n"); - return GR_UNSUPPORTED; -} - GR_RESULT GR_STDCALL grWsiWinSetGammaRamp( GR_WSI_WIN_DISPLAY display, const GR_WSI_WIN_GAMMA_RAMP* pGammaRamp)