SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit e087bd5218a2f294aa33a2bb6f71c99244340bdc parent 9e57201b0820ece8b1087579422347f2f776e3a6 Author: Lior Halphon <LIJI32@gmail.com> Date: Fri, 10 Dec 2021 02:06:12 +0200 The GBS visualizer should use custom color palettes Diffstat:
| M | Cocoa/GBVisualizerView.m | 20 | ++------------------ |
1 file changed, 2 insertions(+), 18 deletions(-)
diff --git a/Cocoa/GBVisualizerView.m b/Cocoa/GBVisualizerView.m @@ -1,4 +1,5 @@ #import "GBVisualizerView.h" +#import "GBPaletteEditorController.h" #include <Core/gb.h> #define SAMPLE_COUNT 1024 @@ -28,24 +29,7 @@ static NSColor *color_to_effect_color(typeof(GB_PALETTE_DMG.colors[0]) color) - (void)drawRect:(NSRect)dirtyRect { - const GB_palette_t *palette; - switch ([[NSUserDefaults standardUserDefaults] integerForKey:@"GBColorPalette"]) { - case 1: - palette = &GB_PALETTE_DMG; - break; - - case 2: - palette = &GB_PALETTE_MGB; - break; - - case 3: - palette = &GB_PALETTE_GBL; - break; - - default: - palette = &GB_PALETTE_GREY; - break; - } + const GB_palette_t *palette = [GBPaletteEditorController userPalette]; NSSize size = self.bounds.size; [color_to_effect_color(palette->colors[0]) setFill];
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.