git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

commit 4a7afb246dd98e40d9e792f80fa57b972e77f324
parent 178860e71580646530e95bbb90abbe3a32689664
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Fri,  5 Nov 2021 21:45:54 +0200

Fix some oopsies

Diffstat:
MCocoa/GBHueSliderCell.m2+-
MCocoa/GBPaletteEditorController.m6+++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Cocoa/GBHueSliderCell.m b/Cocoa/GBHueSliderCell.m @@ -48,7 +48,7 @@ [super drawKnob:knobRect]; NSRect peekRect = knobRect; peekRect.size.width /= 2; - peekRect.size.height /= 2; + peekRect.size.height = peekRect.size.width; peekRect.origin.x += peekRect.size.width / 2; peekRect.origin.y += peekRect.size.height / 2; NSColor *color = self.colorValue; diff --git a/Cocoa/GBPaletteEditorController.m b/Cocoa/GBPaletteEditorController.m @@ -148,7 +148,7 @@ static double blend(double from, double to, double position) return; } NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - NSMutableDictionary *themes = [[defaults dictionaryForKey:@"GBThemes"] ?: @[] mutableCopy]; + NSMutableDictionary *themes = [[defaults dictionaryForKey:@"GBThemes"] ?: @{} mutableCopy]; NSString *newName = object; unsigned i = 2; if (!newName.length) { @@ -171,7 +171,7 @@ static double blend(double from, double to, double position) { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSString *name = [defaults stringForKey:@"GBCurrentTheme"]; - NSMutableDictionary *themes = [[defaults dictionaryForKey:@"GBThemes"] ?: @[] mutableCopy]; + NSMutableDictionary *themes = [[defaults dictionaryForKey:@"GBThemes"] ?: @{} mutableCopy]; [themes removeObjectForKey:name]; [defaults setObject:themes forKey:@"GBThemes"]; [_themesList reloadData]; @@ -267,7 +267,7 @@ static double blend(double from, double to, double position) @"HueBiasStrength": @(_hueStrengthSlider.doubleValue / 256.0) }; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - NSMutableDictionary *themes = [[defaults dictionaryForKey:@"GBThemes"] ?: @[] mutableCopy]; + NSMutableDictionary *themes = [[defaults dictionaryForKey:@"GBThemes"] ?: @{} mutableCopy]; themes[[defaults stringForKey:@"GBCurrentTheme"]] = theme; [defaults setObject:themes forKey:@"GBThemes"]; [[NSNotificationCenter defaultCenter] postNotificationName:@"GBColorPaletteChanged" object:nil];

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.