From 34d9fbeb2f174ef412206d28a993f5692192d293 Mon Sep 17 00:00:00 2001 From: Maschell Date: Sat, 3 Sep 2022 16:57:44 +0200 Subject: [PATCH] Update CRGetVersion --- src/export.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/export.cpp b/src/export.cpp index 6725cd6..716a873 100644 --- a/src/export.cpp +++ b/src/export.cpp @@ -5,7 +5,6 @@ #include "utils/logger.h" #include "utils/utils.h" #include -#include #include #include @@ -57,8 +56,13 @@ ContentRedirectionApiErrorType CRSetActive(CRLayerHandle handle, bool active) { return CONTENT_REDIRECTION_API_ERROR_LAYER_NOT_FOUND; } -uint32_t CRGetVersion() { - return CONTENT_REDIRECT_MODULE_VERSION; +ContentRedirectionApiErrorType CRGetVersion(ContentRedirectionVersion *outVersion) { + if (outVersion == nullptr) { + DEBUG_FUNCTION_LINE_ERR("CONTENT_REDIRECTION_API_ERROR_INVALID_ARG"); + return CONTENT_REDIRECTION_API_ERROR_INVALID_ARG; + } + *outVersion = 1; + return CONTENT_REDIRECTION_API_ERROR_NONE; } int CRAddDevice(const devoptab_t *device) {