From 86ae005fe915b17f250d56501a7ada9f5946adbc Mon Sep 17 00:00:00 2001 From: dankmeme01 <42031238+dankmeme01@users.noreply.github.com> Date: Thu, 1 Feb 2024 21:18:27 +0100 Subject: [PATCH] implement getGameVersion on mac --- loader/src/platform/mac/LoaderImpl.mm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/loader/src/platform/mac/LoaderImpl.mm b/loader/src/platform/mac/LoaderImpl.mm index ec656a0d..2ada7b80 100644 --- a/loader/src/platform/mac/LoaderImpl.mm +++ b/loader/src/platform/mac/LoaderImpl.mm @@ -145,7 +145,12 @@ void Loader::Impl::addNativeBinariesPath(ghc::filesystem::path const& path) { } std::string Loader::Impl::getGameVersion() { - return GEODE_STR(GEODE_GD_VERSION); // TODO implement + NSBundle* mainBundle = [NSBundle mainBundle]; + NSDictionary* infoDictionary = [mainBundle infoDictionary]; + + NSString *version = infoDictionary[@"CFBundleShortVersionString"]; + + return std::string([version UTF8String]); } // TODO