Fix PAL SGB in the Cocoa port

This commit is contained in:
Lior Halphon 2021-02-25 22:42:02 +02:00
parent e08df2a089
commit a13469c4e2
3 changed files with 8 additions and 5 deletions

View File

@ -237,8 +237,13 @@ static void infraredStateChanged(GB_gameboy_t *gb, bool on)
case MODEL_CGB: case MODEL_CGB:
return (GB_model_t)[[NSUserDefaults standardUserDefaults] integerForKey:@"GBCGBModel"]; return (GB_model_t)[[NSUserDefaults standardUserDefaults] integerForKey:@"GBCGBModel"];
case MODEL_SGB: case MODEL_SGB: {
return (GB_model_t)[[NSUserDefaults standardUserDefaults] integerForKey:@"GBSGBModel"]; GB_model_t model = (GB_model_t)[[NSUserDefaults standardUserDefaults] integerForKey:@"GBSGBModel"];
if (model == (GB_MODEL_SGB | GB_MODEL_PAL_BIT_OLD)) {
model = GB_MODEL_SGB_PAL;
}
return model;
}
case MODEL_AGB: case MODEL_AGB:
return GB_MODEL_AGB; return GB_MODEL_AGB;

View File

@ -396,7 +396,7 @@
<menu key="menu" autoenablesItems="NO" id="czw-Hi-jyM"> <menu key="menu" autoenablesItems="NO" id="czw-Hi-jyM">
<items> <items>
<menuItem title="Super Game Boy (NTSC)" state="on" tag="4" id="x5A-7f-ef9"/> <menuItem title="Super Game Boy (NTSC)" state="on" tag="4" id="x5A-7f-ef9"/>
<menuItem title="Super Game Boy (PAL)" tag="4100" id="Cix-n2-l4L"/> <menuItem title="Super Game Boy (PAL)" tag="68" id="Cix-n2-l4L"/>
<menuItem title="Super Game Boy 2" tag="257" id="gZG-1g-KF0"/> <menuItem title="Super Game Boy 2" tag="257" id="gZG-1g-KF0"/>
</items> </items>
</menu> </menu>

View File

@ -34,10 +34,8 @@
#define GB_MODEL_PAL_BIT 0x40 #define GB_MODEL_PAL_BIT 0x40
#define GB_MODEL_NO_SFC_BIT 0x80 #define GB_MODEL_NO_SFC_BIT 0x80
#ifdef GB_INTERNAL
#define GB_MODEL_PAL_BIT_OLD 0x1000 #define GB_MODEL_PAL_BIT_OLD 0x1000
#define GB_MODEL_NO_SFC_BIT_OLD 0x2000 #define GB_MODEL_NO_SFC_BIT_OLD 0x2000
#endif
#ifdef GB_INTERNAL #ifdef GB_INTERNAL
#if __clang__ #if __clang__