Merge pull request #479 from dankmeme01/main

implement getGameVersion on mac
This commit is contained in:
Chloe 2024-02-03 06:29:25 -07:00 committed by GitHub
commit e2ff9c8719
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -145,7 +145,12 @@ void Loader::Impl::addNativeBinariesPath(ghc::filesystem::path const& path) {
} }
std::string Loader::Impl::getGameVersion() { 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 // TODO