Skip to content

Commit f81680c

Browse files
committed
Fix arm64 build against current toolchain
1 parent 91f65da commit f81680c

5 files changed

Lines changed: 25 additions & 19 deletions

File tree

NESGameCore.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ - (NSData *)serializeStateWithError:(NSError **)outError
499499
NSLocalizedRecoverySuggestionErrorKey : errorDescription
500500
}];
501501

502-
return NO;
502+
return nil;
503503
}
504504

505505
stateStream.seekg(0, std::ios::end);

Nestopia.xcodeproj/project.pbxproj

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2288,7 +2288,10 @@
22882288
PRODUCT_BUNDLE_IDENTIFIER = "org.openemu.${PRODUCT_NAME:identifier}";
22892289
PRODUCT_NAME = Nestopia;
22902290
SKIP_INSTALL = YES;
2291-
WARNING_CFLAGS = "-Wno-switch-enum";
2291+
WARNING_CFLAGS = (
2292+
"-Wno-switch-enum",
2293+
"-Wno-c++11-narrowing",
2294+
);
22922295
WRAPPER_EXTENSION = oecoreplugin;
22932296
};
22942297
name = Debug;
@@ -2310,7 +2313,10 @@
23102313
PRODUCT_BUNDLE_IDENTIFIER = "org.openemu.${PRODUCT_NAME:identifier}";
23112314
PRODUCT_NAME = Nestopia;
23122315
SKIP_INSTALL = YES;
2313-
WARNING_CFLAGS = "-Wno-switch-enum";
2316+
WARNING_CFLAGS = (
2317+
"-Wno-switch-enum",
2318+
"-Wno-c++11-narrowing",
2319+
);
23142320
WRAPPER_EXTENSION = oecoreplugin;
23152321
};
23162322
name = Release;

core/NstPpu.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -312,17 +312,17 @@ namespace Nes
312312
{
313313
const byte data[11] =
314314
{
315-
regs.ctrl[0],
316-
regs.ctrl[1],
317-
regs.status,
318-
scroll.address & 0xFF,
319-
scroll.address >> 8,
320-
scroll.latch & 0xFF,
321-
scroll.latch >> 8,
322-
scroll.xFine | scroll.toggle << 3,
323-
regs.oam,
324-
io.buffer,
325-
io.latch
315+
byte( regs.ctrl[0] ),
316+
byte( regs.ctrl[1] ),
317+
byte( regs.status ),
318+
byte( scroll.address & 0xFF ),
319+
byte( scroll.address >> 8 ),
320+
byte( scroll.latch & 0xFF ),
321+
byte( scroll.latch >> 8 ),
322+
byte( scroll.xFine | scroll.toggle << 3 ),
323+
byte( regs.oam ),
324+
byte( io.buffer ),
325+
byte( io.latch )
326326
};
327327

328328
state.Begin( AsciiId<'R','E','G'>::V ).Write( data ).End();

core/input/NstInpTurboFile.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ namespace Nes
6565

6666
const byte data[3] =
6767
{
68-
pos & 0xFF,
69-
pos >> 8,
70-
count | (old << 1) | (out << 2)
68+
byte( pos & 0xFF ),
69+
byte( pos >> 8 ),
70+
byte( count | (old << 1) | (out << 2) )
7171
};
7272

7373
saver.Begin( AsciiId<'R','E','G'>::V ).Write( data ).End();

core/input/NstInpZapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ namespace Nes
137137
{
138138
const byte data[2] =
139139
{
140-
arcade ? shifter ? 0x1 : 0x3 : 0x0,
141-
arcade ? stream : 0x00
140+
byte( arcade ? shifter ? 0x1 : 0x3 : 0x0 ),
141+
byte( arcade ? stream : 0x00 )
142142
};
143143

144144
saver.Begin( AsciiId<'Z','P'>::R(0,0,id) ).Write( data ).End();

0 commit comments

Comments
 (0)