SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 63e081e9c2ac1396b8648ff090d854ea5a102f04 parent 4d28af4fcf43455d19277ba1899cdc8e79b2dae3 Author: Lior Halphon <LIJI32@gmail.com> Date: Fri, 13 Dec 2024 20:23:43 +0200 Fix the Pink Pop theme, it had mismatching colors and settings Diffstat:
| M | Cocoa/GBApp.m | 8 | ++++++-- |
| M | iOS/main.m | 18 | ++++++++++++++++-- |
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/Cocoa/GBApp.m b/Cocoa/GBApp.m @@ -172,7 +172,7 @@ static uint32_t color_to_int(NSColor *color) @"Colors": @[@0xff28140a, @0xff7c42cb, @0xffaa83de, @0xffd1ceeb, @0xffd5d8ec], @"DisabledLCDColor": @YES, @"HueBias": @0.9477411056868732, - @"HueBiasStrength": @0.3433764940239044, + @"HueBiasStrength": @0.80024421215057373, @"Manual": @NO, }, @"Radioactive Pea": @{ @@ -237,8 +237,8 @@ static uint32_t color_to_int(NSColor *color) } if (![[[NSUserDefaults standardUserDefaults] stringForKey:@"GBThemesVersion"] isEqualToString:@(GB_VERSION)]) { - [[NSUserDefaults standardUserDefaults] setObject:@(GB_VERSION) forKey:@"GBThemesVersion"]; [self updateThemesDefault:false]; + [[NSUserDefaults standardUserDefaults] setObject:@(GB_VERSION) forKey:@"GBThemesVersion"]; } } @@ -248,6 +248,10 @@ static uint32_t color_to_int(NSColor *color) NSMutableDictionary *currentThemes = [defaults dictionaryForKey:@"GBThemes"].mutableCopy; [defaults removeObjectForKey:@"GBThemes"]; NSMutableDictionary *defaultThemes = [defaults dictionaryForKey:@"GBThemes"].mutableCopy; + if (![[NSUserDefaults standardUserDefaults] stringForKey:@"GBThemesVersion"]) { + // Force update the Pink Pop theme, it was glitchy in 1.0 + [currentThemes removeObjectForKey:@"Pink Pop"]; + } if (overwrite) { [currentThemes addEntriesFromDictionary:defaultThemes]; [defaults setObject:currentThemes forKey:@"GBThemes"]; diff --git a/iOS/main.m b/iOS/main.m @@ -6,7 +6,8 @@ int main(int argc, char * argv[]) { @autoreleasepool { - [[NSUserDefaults standardUserDefaults] registerDefaults:@{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults registerDefaults:@{ @"GBFilter": @"NearestNeighbor", @"GBColorCorrection": @(GB_COLOR_CORRECTION_MODERN_BALANCED), @"GBAudioMode": @"switch", @@ -108,7 +109,7 @@ int main(int argc, char * argv[]) @"Colors": @[@0xff28140a, @0xff7c42cb, @0xffaa83de, @0xffd1ceeb, @0xffd5d8ec], @"DisabledLCDColor": @YES, @"HueBias": @0.9477411056868732, - @"HueBiasStrength": @0.3433764940239044, + @"HueBiasStrength": @0.80024421215057373, @"Manual": @NO, }, @"Radioactive Pea": @{ @@ -145,6 +146,19 @@ int main(int argc, char * argv[]) }, }, }]; + + if (![[defaults stringForKey:@"GBThemesVersion"] isEqualToString:@(GB_VERSION)]) { + NSMutableDictionary *currentThemes = [defaults dictionaryForKey:@"GBThemes"].mutableCopy; + [defaults removeObjectForKey:@"GBThemes"]; + NSMutableDictionary *defaultThemes = [defaults dictionaryForKey:@"GBThemes"].mutableCopy; + if (![[NSUserDefaults standardUserDefaults] stringForKey:@"GBThemesVersion"]) { + // Force update the Pink Pop theme, it was glitchy in 1.0 + [currentThemes removeObjectForKey:@"Pink Pop"]; + } + [defaultThemes addEntriesFromDictionary:currentThemes]; + [defaults setObject:defaultThemes forKey:@"GBThemes"]; + [[NSUserDefaults standardUserDefaults] setObject:@(GB_VERSION) forKey:@"GBThemesVersion"]; + } } return UIApplicationMain(argc, argv, nil, NSStringFromClass([GBViewController class])); }
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.