Skip to content

Commit a10e1fc

Browse files
committed
Fix the Pink Pop theme, it had mismatching colors and settings
1 parent 4dd2683 commit a10e1fc

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

Cocoa/GBApp.m

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ - (void) applicationDidFinishLaunching:(NSNotification *)notification
172172
@"Colors": @[@0xff28140a, @0xff7c42cb, @0xffaa83de, @0xffd1ceeb, @0xffd5d8ec],
173173
@"DisabledLCDColor": @YES,
174174
@"HueBias": @0.9477411056868732,
175-
@"HueBiasStrength": @0.3433764940239044,
175+
@"HueBiasStrength": @0.80024421215057373,
176176
@"Manual": @NO,
177177
},
178178
@"Radioactive Pea": @{
@@ -237,8 +237,8 @@ - (void) applicationDidFinishLaunching:(NSNotification *)notification
237237
}
238238

239239
if (![[[NSUserDefaults standardUserDefaults] stringForKey:@"GBThemesVersion"] isEqualToString:@(GB_VERSION)]) {
240-
[[NSUserDefaults standardUserDefaults] setObject:@(GB_VERSION) forKey:@"GBThemesVersion"];
241240
[self updateThemesDefault:false];
241+
[[NSUserDefaults standardUserDefaults] setObject:@(GB_VERSION) forKey:@"GBThemesVersion"];
242242
}
243243
}
244244

@@ -248,6 +248,10 @@ - (void)updateThemesDefault:(bool)overwrite
248248
NSMutableDictionary *currentThemes = [defaults dictionaryForKey:@"GBThemes"].mutableCopy;
249249
[defaults removeObjectForKey:@"GBThemes"];
250250
NSMutableDictionary *defaultThemes = [defaults dictionaryForKey:@"GBThemes"].mutableCopy;
251+
if (![[NSUserDefaults standardUserDefaults] stringForKey:@"GBThemesVersion"]) {
252+
// Force update the Pink Pop theme, it was glitchy in 1.0
253+
[currentThemes removeObjectForKey:@"Pink Pop"];
254+
}
251255
if (overwrite) {
252256
[currentThemes addEntriesFromDictionary:defaultThemes];
253257
[defaults setObject:currentThemes forKey:@"GBThemes"];

iOS/main.m

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
int main(int argc, char * argv[])
77
{
88
@autoreleasepool {
9-
[[NSUserDefaults standardUserDefaults] registerDefaults:@{
9+
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
10+
[defaults registerDefaults:@{
1011
@"GBFilter": @"NearestNeighbor",
1112
@"GBColorCorrection": @(GB_COLOR_CORRECTION_MODERN_BALANCED),
1213
@"GBAudioMode": @"switch",
@@ -108,7 +109,7 @@ int main(int argc, char * argv[])
108109
@"Colors": @[@0xff28140a, @0xff7c42cb, @0xffaa83de, @0xffd1ceeb, @0xffd5d8ec],
109110
@"DisabledLCDColor": @YES,
110111
@"HueBias": @0.9477411056868732,
111-
@"HueBiasStrength": @0.3433764940239044,
112+
@"HueBiasStrength": @0.80024421215057373,
112113
@"Manual": @NO,
113114
},
114115
@"Radioactive Pea": @{
@@ -145,6 +146,19 @@ int main(int argc, char * argv[])
145146
},
146147
},
147148
}];
149+
150+
if (![[defaults stringForKey:@"GBThemesVersion"] isEqualToString:@(GB_VERSION)]) {
151+
NSMutableDictionary *currentThemes = [defaults dictionaryForKey:@"GBThemes"].mutableCopy;
152+
[defaults removeObjectForKey:@"GBThemes"];
153+
NSMutableDictionary *defaultThemes = [defaults dictionaryForKey:@"GBThemes"].mutableCopy;
154+
if (![[NSUserDefaults standardUserDefaults] stringForKey:@"GBThemesVersion"]) {
155+
// Force update the Pink Pop theme, it was glitchy in 1.0
156+
[currentThemes removeObjectForKey:@"Pink Pop"];
157+
}
158+
[defaultThemes addEntriesFromDictionary:currentThemes];
159+
[defaults setObject:defaultThemes forKey:@"GBThemes"];
160+
[[NSUserDefaults standardUserDefaults] setObject:@(GB_VERSION) forKey:@"GBThemesVersion"];
161+
}
148162
}
149163
return UIApplicationMain(argc, argv, nil, NSStringFromClass([GBViewController class]));
150164
}

0 commit comments

Comments
 (0)