mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-15 21:22:40 +00:00
Properly start and stop mDNS manager
This commit is contained in:
@@ -157,9 +157,18 @@ static StreamConfiguration* streamConfig;
|
|||||||
self.hostPickerVals = [[NSArray alloc] init];
|
self.hostPickerVals = [[NSArray alloc] init];
|
||||||
[self.StreamConfigs selectRow:1 inComponent:0 animated:NO];
|
[self.StreamConfigs selectRow:1 inComponent:0 animated:NO];
|
||||||
|
|
||||||
|
_opQueue = [[NSOperationQueue alloc] init];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)viewDidAppear:(BOOL)animated
|
||||||
|
{
|
||||||
_mDNSManager = [[MDNSManager alloc] initWithCallback:self];
|
_mDNSManager = [[MDNSManager alloc] initWithCallback:self];
|
||||||
[_mDNSManager searchForHosts];
|
[_mDNSManager searchForHosts];
|
||||||
_opQueue = [[NSOperationQueue alloc] init];
|
}
|
||||||
|
|
||||||
|
- (void)viewDidDisappear:(BOOL)animated
|
||||||
|
{
|
||||||
|
[_mDNSManager stopSearching];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)updateHosts:(NSArray *)hosts {
|
- (void)updateHosts:(NSArray *)hosts {
|
||||||
|
|||||||
Reference in New Issue
Block a user