some cleanup and stuff

This commit is contained in:
Mars 2024-06-14 01:41:59 -04:00
parent 138191227f
commit afbba70f92
Signed by: pupbrained
GPG key ID: 874E22DF2F9DFCB5
13 changed files with 203 additions and 160 deletions

View file

@ -9,7 +9,7 @@
+ (NSString*)macOSVersion;
@end
#else
#include "util/numtypes.h"
#include "util/macros.h"
extern "C" {
fn GetCurrentPlayingTitle() -> const char*;

View file

@ -80,8 +80,13 @@ using MRMediaRemoteGetNowPlayingInfoFunction = void (*)(
}
// Dictionary to map macOS versions to their respective names
NSDictionary<NSNumber*, NSString*>* versionNames =
@{@11 : @"Big Sur", @12 : @"Monterey", @13 : @"Ventura", @14 : @"Sonoma"};
NSDictionary<NSNumber*, NSString*>* versionNames = @{
@11 : @"Big Sur",
@12 : @"Monterey",
@13 : @"Ventura",
@14 : @"Sonoma",
@15 : @"Sequoia"
};
NSNumber* majorVersionNumber = @(osVersion.majorVersion);
NSString* versionName = versionNames[majorVersionNumber];
@ -96,7 +101,7 @@ using MRMediaRemoteGetNowPlayingInfoFunction = void (*)(
}
@end
#include "util/numtypes.h"
#include "util/macros.h"
extern "C" {
fn GetCurrentPlayingTitle() -> const char* {

View file

@ -2,8 +2,9 @@
#include <string>
#include "util/macros.h"
#include "util/numtypes.h"
u64 GetMemInfo();
std::string GetNowPlaying();
const char* GetOSVersion();
fn GetMemInfo() -> u64;
fn GetNowPlaying() -> std::string;
fn GetOSVersion() -> const char*;