mirror of
https://github.com/geode-sdk/geode.git
synced 2025-02-17 00:30:26 -05:00
implement getGameVersion on mac
This commit is contained in:
parent
7891ac605e
commit
86ae005fe9
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue