mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 01:46:42 +00:00
UPDATES: Use new constants for MacOS X 10.10
This commit is contained in:
parent
600520902e
commit
aa5432b0e9
@ -33,6 +33,8 @@
|
|||||||
#include <Cocoa/Cocoa.h>
|
#include <Cocoa/Cocoa.h>
|
||||||
#include <Sparkle/Sparkle.h>
|
#include <Sparkle/Sparkle.h>
|
||||||
|
|
||||||
|
#include <AvailabilityMacros.h>
|
||||||
|
|
||||||
SUUpdater *sparkleUpdater;
|
SUUpdater *sparkleUpdater;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -136,8 +138,13 @@ int MacOSXUpdateManager::getUpdateCheckInterval() {
|
|||||||
|
|
||||||
bool MacOSXUpdateManager::getLastUpdateCheckTimeAndDate(TimeDate &t) {
|
bool MacOSXUpdateManager::getLastUpdateCheckTimeAndDate(TimeDate &t) {
|
||||||
NSDate *date = [sparkleUpdater lastUpdateCheckDate];
|
NSDate *date = [sparkleUpdater lastUpdateCheckDate];
|
||||||
|
#ifdef MAC_OS_X_VERSION_10_10
|
||||||
|
NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
|
||||||
|
NSDateComponents *components = [gregorian components:(NSCalendarUnitDay | NSCalendarUnitWeekday) fromDate:date];
|
||||||
|
#else
|
||||||
NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
|
NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
|
||||||
NSDateComponents *components = [gregorian components:(NSDayCalendarUnit | NSWeekdayCalendarUnit) fromDate:date];
|
NSDateComponents *components = [gregorian components:(NSDayCalendarUnit | NSWeekdayCalendarUnit) fromDate:date];
|
||||||
|
#endif
|
||||||
|
|
||||||
t.tm_wday = [components weekday];
|
t.tm_wday = [components weekday];
|
||||||
t.tm_year = [components year];
|
t.tm_year = [components year];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user