implement getGameVersion on mac

This commit is contained in:
dankmeme01 2024-02-01 21:18:27 +01:00
parent 7891ac605e
commit 86ae005fe9

View file

@ -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