using this code to toggle the mono audio setting only partially works:
When I press the toggle button, the option in the Accessibility menu changes to the new value, but it doesn't actually do anything to the music. If I change the option from the settings menu it works fine again, it seems that the menu does more than just toggle a plist entry to "yes" or "no".
Can anyone give me any tips?
When I press the toggle button, the option in the Accessibility menu changes to the new value, but it doesn't actually do anything to the music. If I change the option from the settings menu it works fine again, it seems that the menu does more than just toggle a plist entry to "yes" or "no".
Can anyone give me any tips?
Code:
void setState(BOOL Enable)
{
NSMutableDictionary *plistDict = [NSMutableDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/com.apple.Accessibility.plist"];
if (Enable)
{
[plistDict setValue:[NSNumber numberWithBool:YES] forKey:@"MonoAudioEnabled"];
[plistDict writeToFile:@"/var/mobile/Library/Preferences/com.apple.Accessibility.plist" atomically: YES];
}
else
{
[plistDict setValue:[NSNumber numberWithBool:NO] forKey:@"MonoAudioEnabled"];
[plistDict writeToFile:@"/var/mobile/Library/Preferences/com.apple.Accessibility.plist" atomically: YES];
}
}