From 8c3d8e081149a01c567734916873be68dc497719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Mon, 30 Dec 2019 13:33:43 +0100 Subject: [PATCH] DSPSpy: Remove unused stubs The whole thing was commented out, and nothing is actually using it --- Source/DSPSpy/DSPSpy.vcproj | 4 - Source/DSPSpy/DSPSpy.vcxproj | 3 +- Source/DSPSpy/DSPSpy.vcxproj.filters | 3 +- Source/DSPSpy/Stubs.cpp | 109 --------------------------- 4 files changed, 2 insertions(+), 117 deletions(-) delete mode 100644 Source/DSPSpy/Stubs.cpp diff --git a/Source/DSPSpy/DSPSpy.vcproj b/Source/DSPSpy/DSPSpy.vcproj index 0d1aa47e8b..06237e5d23 100644 --- a/Source/DSPSpy/DSPSpy.vcproj +++ b/Source/DSPSpy/DSPSpy.vcproj @@ -246,10 +246,6 @@ RelativePath=".\sbuild.sh" > - - diff --git a/Source/DSPSpy/DSPSpy.vcxproj b/Source/DSPSpy/DSPSpy.vcxproj index cae9d356f0..aff5818e37 100644 --- a/Source/DSPSpy/DSPSpy.vcxproj +++ b/Source/DSPSpy/DSPSpy.vcxproj @@ -165,7 +165,6 @@ make HW_TYPE=gamecube - @@ -178,4 +177,4 @@ make HW_TYPE=gamecube - \ No newline at end of file + diff --git a/Source/DSPSpy/DSPSpy.vcxproj.filters b/Source/DSPSpy/DSPSpy.vcxproj.filters index 874f584ddd..d221a3b178 100644 --- a/Source/DSPSpy/DSPSpy.vcxproj.filters +++ b/Source/DSPSpy/DSPSpy.vcxproj.filters @@ -78,7 +78,6 @@ DSP Interface - @@ -94,4 +93,4 @@ - \ No newline at end of file + diff --git a/Source/DSPSpy/Stubs.cpp b/Source/DSPSpy/Stubs.cpp deleted file mode 100644 index 0d5fd36d41..0000000000 --- a/Source/DSPSpy/Stubs.cpp +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright 2003 Dolphin Emulator Project -// Licensed under GPLv2+ -// Refer to the license.txt file included. - -// Stubs to make DSPCore compile as part of DSPSpy. - -/* -#include -#include - -#include - -#include "Thread.h" - -void *AllocateMemoryPages(size_t size) -{ - return malloc(size); -} - -void FreeMemoryPages(void *pages, size_t size) -{ - free(pages); -} - -void WriteProtectMemory(void* ptr, size_t size, bool allowExecute) -{ -} - -void UnWriteProtectMemory(void* ptr, size_t size, bool allowExecute) -{ -} - -bool DSPHost_OnThread() -{ - return false; -} - -// Well, it's just RAM right? :) -u8 DSPHost_ReadHostMemory(u32 address) -{ - u8 *ptr = (u8*)address; - return *ptr; -} - -void DSPHost_WriteHostMemory(u8 value, u32 addr) {} - - -void DSPHost_CodeLoaded(const u8 *code, int size) -{ -} - - -namespace Common -{ - -CriticalSection::CriticalSection(int) -{ -} -CriticalSection::~CriticalSection() -{ -} - -void CriticalSection::Enter() -{ -} - -void CriticalSection::Leave() -{ -} - -} // namespace - -namespace File -{ - -bool WriteStringToFile(bool text_file, const std::string &str, const char *filename) -{ - FILE *f = fopen(filename, text_file ? "w" : "wb"); - if (!f) - return false; - size_t len = str.size(); - if (len != fwrite(str.data(), 1, str.size(), f)) - { - fclose(f); - return false; - } - fclose(f); - return true; -} - -bool ReadFileToString(bool text_file, const char *filename, std::string &str) -{ - FILE *f = fopen(filename, text_file ? "r" : "rb"); - if (!f) - return false; - fseeko(f, 0, SEEK_END); - size_t len = ftello(f); - fseeko(f, 0, SEEK_SET); - char *buf = new char[len + 1]; - buf[fread(buf, 1, len, f)] = 0; - str = std::string(buf, len); - fclose(f); - delete [] buf; - return true; -} - -} - -*/