diff --git a/output/dll/bizswan.dll b/output/dll/bizswan.dll index 68a35c4844..45bbcb3671 100644 Binary files a/output/dll/bizswan.dll and b/output/dll/bizswan.dll differ diff --git a/wonderswan/blip/Blip_Buffer.cpp b/wonderswan/blip/Blip_Buffer.cpp index f04a1fc599..ae86679e89 100644 --- a/wonderswan/blip/Blip_Buffer.cpp +++ b/wonderswan/blip/Blip_Buffer.cpp @@ -30,7 +30,7 @@ Blip_Buffer::Blip_Buffer() { factor_ = (blip_u64)ULLONG_MAX; offset_ = 0; - buffer_ = 0; + buffer_ = nullptr; buffer_size_ = 0; sample_rate_ = 0; reader_accum_ = 0; @@ -127,7 +127,7 @@ Blip_Buffer::blargg_err_t Blip_Buffer::set_sample_rate( long new_rate, int msec clear(); - return 0; // success + return nullptr; // success } blip_resampled_time_t Blip_Buffer::clock_rate_factor( long rate ) const @@ -202,7 +202,7 @@ void Blip_Buffer::remove_samples( long count ) Blip_Synth_Fast_::Blip_Synth_Fast_() { - buf = 0; + buf = nullptr; last_amp = 0; delta_factor = 0; } @@ -220,7 +220,7 @@ Blip_Synth_::Blip_Synth_( short* p, int w ) : { volume_unit_ = 0.0; kernel_unit = 0; - buf = 0; + buf = nullptr; last_amp = 0; delta_factor = 0; } diff --git a/wonderswan/memory.cpp b/wonderswan/memory.cpp index 9d4a6e9f91..6775a34d45 100644 --- a/wonderswan/memory.cpp +++ b/wonderswan/memory.cpp @@ -280,12 +280,12 @@ namespace MDFN_IEN_WSWAN if (wsCartROM) { std::free(wsCartROM); - wsCartROM = 0; + wsCartROM = nullptr; } if (wsSRAM) { std::free(wsSRAM); - wsSRAM = 0; + wsSRAM = nullptr; } } diff --git a/wonderswan/mingw/Makefile b/wonderswan/mingw/Makefile index 90788da80a..77a1b59b6b 100644 --- a/wonderswan/mingw/Makefile +++ b/wonderswan/mingw/Makefile @@ -1,7 +1,7 @@ CXX = g++ -CXXFLAGS = -Wall -DLSB_FIRST -I.. -Wno-multichar -O3 +CXXFLAGS = -Wall -DLSB_FIRST -I.. -Wno-multichar -O3 -Wzero-as-null-pointer-constant -std=gnu++11 -fomit-frame-pointer -fno-exceptions TARGET = bizswan.dll -LDFLAGS = -shared -static-libgcc -static-libstdc++ +LDFLAGS = -shared -static-libgcc -static-libstdc++ $(CXXFLAGS) RM = rm CP = cp @@ -9,14 +9,13 @@ SRCS = \ ../eeprom.cpp \ ../gfx.cpp \ ../interrupt.cpp \ - ../main.cpp \ ../memory.cpp \ + ../newstate.cpp \ ../rtc.cpp \ ../sound.cpp \ ../system.cpp \ ../tcache.cpp \ ../v30mz.cpp \ - ../newstate.cpp \ ../Blip/Blip_Buffer.cpp OBJS = $(SRCS:.cpp=.o) diff --git a/wonderswan/rtc.cpp b/wonderswan/rtc.cpp index f3fd8c7755..aa56a23bb2 100644 --- a/wonderswan/rtc.cpp +++ b/wonderswan/rtc.cpp @@ -60,7 +60,7 @@ namespace MDFN_IEN_WSWAN if(Command == 0x15) { tm newtime; - uint64 now = userealtime ? time(0) : CurrentTime; + uint64 now = userealtime ? time(nullptr) : CurrentTime; GMTime(now, newtime); switch(wsCA15) @@ -87,7 +87,7 @@ namespace MDFN_IEN_WSWAN if (realtime) { userealtime = true; - CurrentTime = time(0); + CurrentTime = time(nullptr); } else { diff --git a/wonderswan/sound.cpp b/wonderswan/sound.cpp index 54147a39be..db43ea5126 100644 --- a/wonderswan/sound.cpp +++ b/wonderswan/sound.cpp @@ -336,7 +336,7 @@ namespace MDFN_IEN_WSWAN if(sbuf[i]) { delete sbuf[i]; - sbuf[i] = 0; + sbuf[i] = nullptr; } } diff --git a/wonderswan/v30mz.cpp b/wonderswan/v30mz.cpp index 76cfe7601a..33053947e4 100644 --- a/wonderswan/v30mz.cpp +++ b/wonderswan/v30mz.cpp @@ -465,6 +465,7 @@ namespace MDFN_IEN_WSWAN POP(I.regs.w[CW]); POP(I.regs.w[AW]); CLK(8); + (void)tmp; } OP_EPILOGUE; OP( 0x62, i_chkind )