From 069c8dc42da67248f9746411323e387ba8d465d7 Mon Sep 17 00:00:00 2001 From: Sour Date: Sun, 24 Feb 2019 19:57:34 -0500 Subject: [PATCH] Fixed compilation warnings/errors --- Core/Console.cpp | 4 +++- Core/DefaultVideoFilter.cpp | 2 +- Core/SNES_SPC_misc.cpp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Core/Console.cpp b/Core/Console.cpp index f6131cb..090a05d 100644 --- a/Core/Console.cpp +++ b/Core/Console.cpp @@ -85,6 +85,8 @@ void Console::Stop() debugger->Run(); } + _debugger.reset(); + _runLock.WaitForRelease(); _cpu.reset(); @@ -122,7 +124,7 @@ void Console::LoadRom(VirtualFile romFile, VirtualFile patchFile) _cart = cart; _controlManager.reset(new ControlManager(shared_from_this())); _memoryManager.reset(new MemoryManager()); - _dmaController.reset(new DmaController(shared_from_this())); + _dmaController.reset(new DmaController(_memoryManager.get())); _memoryManager->Initialize(shared_from_this()); diff --git a/Core/DefaultVideoFilter.cpp b/Core/DefaultVideoFilter.cpp index 851030b..2e108ea 100644 --- a/Core/DefaultVideoFilter.cpp +++ b/Core/DefaultVideoFilter.cpp @@ -94,7 +94,7 @@ void DefaultVideoFilter::ApplyFilter(uint16_t *ppuOutputBuffer) { uint32_t *out = GetOutputBuffer(); uint32_t pixelCount = GetFrameInfo().Width * GetFrameInfo().Height; - for(int i = 0; i < pixelCount; i++) { + for(uint32_t i = 0; i < pixelCount; i++) { uint16_t rgb555 = ppuOutputBuffer[i]; uint8_t b = (rgb555 >> 10) * 256 / 32; uint8_t g = ((rgb555 >> 5) & 0x1F) * 256 / 32; diff --git a/Core/SNES_SPC_misc.cpp b/Core/SNES_SPC_misc.cpp index b4fcbe1..b5ddfa7 100644 --- a/Core/SNES_SPC_misc.cpp +++ b/Core/SNES_SPC_misc.cpp @@ -304,7 +304,7 @@ void SNES_SPC::set_output( sample_t* out, int size ) assert( out <= out_end ); } - dsp.set_output( out, out_end - out ); + dsp.set_output( out, (int)(out_end - out) ); } else {