mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-16 23:37:11 +00:00
(Apple) Some minor cleanups to location manager code - still only reports a few initial
locations and nothing afterwards
This commit is contained in:
parent
3fd4f21c9a
commit
40d7eb40bd
@ -373,6 +373,19 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
|
||||
RARCH_LOG("didUpdateLocations - latitude %f, longitude %f\n", (float)currentLatitude, (float)currentLongitude);
|
||||
}
|
||||
|
||||
- (void)onLocationInit
|
||||
{
|
||||
// Create the location manager if this object does not
|
||||
// already have one.
|
||||
|
||||
if (locationManager == nil)
|
||||
locationManager = [[CLLocationManager alloc] init];
|
||||
locationManager.delegate = self;
|
||||
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
|
||||
locationManager.distanceFilter = kCLDistanceFilterNone;
|
||||
[locationManager startUpdatingLocation];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
static RAScreen* get_chosen_screen()
|
||||
@ -656,15 +669,8 @@ static void *apple_location_init()
|
||||
applelocation_t *applelocation = (applelocation_t*)calloc(1, sizeof(applelocation_t));
|
||||
if (!applelocation)
|
||||
return NULL;
|
||||
|
||||
// Create the location manager if this object does not
|
||||
// already have one.
|
||||
if (nil == locationManager)
|
||||
locationManager = [[CLLocationManager alloc] init];
|
||||
|
||||
locationManager.delegate = [RAGameView get];
|
||||
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
|
||||
locationManager.distanceFilter = kCLDistanceFilterNone;
|
||||
|
||||
[[RAGameView get] onLocationInit];
|
||||
|
||||
return applelocation;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user