static size_t active_;
static unsigned online_;
static bool nowplaying_;
+static bool remember_;
static bool NowPlaying() {
if (kCFCoreFoundationVersionNumber < 800)
static void Deactivate_() {
if (active_ != _not(size_t))
[[cydgets_ objectAtIndex:active_] disableCydget];
- active_ = 0;
+ if (!remember_)
+ active_ = 0;
}
MSHook(void, BKSDisplayServicesSetScreenBlanked, BOOL blanked) {
settings_ = [NSMutableDictionary dictionaryWithContentsOfFile:plist] ?: [NSMutableDictionary dictionary];
nowplaying_ = [[settings_ objectForKey:@"NowPlaying"] boolValue];
+ remember_ = [[settings_ objectForKey:@"RememberPosition"] boolValue];
NSArray *cydgets([settings_ objectForKey:@"LockCydgets"] ?: [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:
@"Welcome", @"Name", [NSNumber numberWithBool:YES], @"Active", nil
<real>800</real>
</array>
</dict>
+ <dict>
+ <key>cell</key>
+ <string>PSGroupCell</string>
+ <key>footerText</key>
+ <string>Normally, locking your phone returns to the first Cydget in the selected order; this setting avoids that behavior</string>
+ </dict>
+ <dict>
+ <key>cell</key>
+ <string>PSSwitchCell</string>
+ <key>default</key>
+ <false/>
+ <key>key</key>
+ <string>RememberPosition</string>
+ <key>label</key>
+ <string>Remember Position</string>
+ </dict>
+ <dict>
+ <key>cell</key>
+ <string>PSGroupCell</string>
+ <key>isStaticText</key>
+ <string>1</string>
+ <key>requiredCapabilities</key>
+ <array>
+ <dict>
+ <key>voip</key>
+ <false/>
+ <key>wildcat</key>
+ <false/>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>cell</key>
+ <string>PSTitleValueCell</string>
+ <key>label</key>
+ <string>Normally, locking your phone returns to the first Cydget in the selected order; this setting avoids that behavior</string>
+ <key>requiredCapabilities</key>
+ <array>
+ <dict>
+ <key>voip</key>
+ <false/>
+ <key>wildcat</key>
+ <false/>
+ </dict>
+ </array>
+ </dict>
</array>
<key>title</key>
<string>Cydget</string>