spu: rm bunch of unused functions
[pcsx_rearmed.git] / libpcsxcore / plugins.c
index 0423310..a77c728 100644 (file)
@@ -48,7 +48,6 @@ GPUmakeSnapshot       GPU_makeSnapshot;
 GPUfreeze             GPU_freeze;\r
 GPUgetScreenPic       GPU_getScreenPic;\r
 GPUshowScreenPic      GPU_showScreenPic;\r
-GPUclearDynarec       GPU_clearDynarec;\r
 GPUvBlank             GPU_vBlank;\r
 \r
 CDRinit               CDR_init;\r
@@ -71,18 +70,12 @@ CDRsetfilename        CDR_setfilename;
 CDRreadCDDA           CDR_readCDDA;\r
 CDRgetTE              CDR_getTE;\r
 \r
-SPUconfigure          SPU_configure;\r
-SPUabout              SPU_about;\r
 SPUinit               SPU_init;\r
 SPUshutdown           SPU_shutdown;\r
-SPUtest               SPU_test;\r
 SPUopen               SPU_open;\r
 SPUclose              SPU_close;\r
-SPUplaySample         SPU_playSample;\r
 SPUwriteRegister      SPU_writeRegister;\r
 SPUreadRegister       SPU_readRegister;\r
-SPUwriteDMA           SPU_writeDMA;\r
-SPUreadDMA            SPU_readDMA;\r
 SPUwriteDMAMem        SPU_writeDMAMem;\r
 SPUreadDMAMem         SPU_readDMAMem;\r
 SPUplayADPCMchannel   SPU_playADPCMchannel;\r
@@ -200,7 +193,6 @@ void CALLBACK GPU__makeSnapshot(void) {}
 void CALLBACK GPU__keypressed(int key) {}\r
 long CALLBACK GPU__getScreenPic(unsigned char *pMem) { return -1; }\r
 long CALLBACK GPU__showScreenPic(unsigned char *pMem) { return -1; }\r
-void CALLBACK GPU__clearDynarec(void (CALLBACK *callback)(void)) {}\r
 void CALLBACK GPU__vBlank(int val) {}\r
 \r
 #define LoadGpuSym1(dest, name) \\r
@@ -240,7 +232,6 @@ static int LoadGPUplugin(const char *GPUdll) {
        LoadGpuSym1(freeze, "GPUfreeze");\r
        LoadGpuSym0(getScreenPic, "GPUgetScreenPic");\r
        LoadGpuSym0(showScreenPic, "GPUshowScreenPic");\r
-       LoadGpuSym0(clearDynarec, "GPUclearDynarec");\r
     LoadGpuSym0(vBlank, "GPUvBlank");\r
        LoadGpuSym0(configure, "GPUconfigure");\r
        LoadGpuSym0(test, "GPUtest");\r
@@ -316,12 +307,8 @@ static int LoadCDRplugin(const char *CDRdll) {
        return 0;\r
 }\r
 \r
-void *hSPUDriver = NULL;\r
-\r
-long CALLBACK SPU__configure(void) { return 0; }\r
-void CALLBACK SPU__about(void) {}\r
-long CALLBACK SPU__test(void) { return 0; }\r
-void CALLBACK SPU__registerScheduleCb(void (CALLBACK *cb)(unsigned int)) {}\r
+static void *hSPUDriver = NULL;\r
+static void CALLBACK SPU__registerScheduleCb(void (CALLBACK *cb)(unsigned int)) {}\r
 \r
 #define LoadSpuSym1(dest, name) \\r
        LoadSym(SPU_##dest, SPU##dest, name, TRUE);\r
@@ -338,7 +325,6 @@ static int LoadSPUplugin(const char *SPUdll) {
 \r
        hSPUDriver = SysLoadLibrary(SPUdll);\r
        if (hSPUDriver == NULL) {\r
-               SPU_configure = NULL;\r
                SysMessage (_("Could not load SPU plugin %s!"), SPUdll); return -1;\r
        }\r
        drv = hSPUDriver;\r
@@ -346,13 +332,8 @@ static int LoadSPUplugin(const char *SPUdll) {
        LoadSpuSym1(shutdown, "SPUshutdown");\r
        LoadSpuSym1(open, "SPUopen");\r
        LoadSpuSym1(close, "SPUclose");\r
-       LoadSpuSym0(configure, "SPUconfigure");\r
-       LoadSpuSym0(about, "SPUabout");\r
-       LoadSpuSym0(test, "SPUtest");\r
        LoadSpuSym1(writeRegister, "SPUwriteRegister");\r
        LoadSpuSym1(readRegister, "SPUreadRegister");           \r
-       LoadSpuSym1(writeDMA, "SPUwriteDMA");\r
-       LoadSpuSym1(readDMA, "SPUreadDMA");\r
        LoadSpuSym1(writeDMAMem, "SPUwriteDMAMem");\r
        LoadSpuSym1(readDMAMem, "SPUreadDMAMem");\r
        LoadSpuSym1(playADPCMchannel, "SPUplayADPCMchannel");\r
@@ -696,13 +677,9 @@ static int LoadSIO1plugin(const char *SIO1dll) {
 \r
 #endif\r
 \r
-void CALLBACK clearDynarec(void) {\r
-       psxCpu->Reset();\r
-}\r
-\r
 int LoadPlugins() {\r
        int ret;\r
-       char Plugin[MAXPATHLEN];\r
+       char Plugin[MAXPATHLEN * 2];\r
 \r
        ReleasePlugins();\r
        SysLibError();\r
@@ -807,7 +784,7 @@ int ReloadCdromPlugin()
        if (UsingIso()) {\r
                LoadCDRplugin(NULL);\r
        } else {\r
-               char Plugin[MAXPATHLEN];\r
+               char Plugin[MAXPATHLEN * 2];\r
                sprintf(Plugin, "%s/%s", Config.PluginsDir, Config.Cdr);\r
                if (LoadCDRplugin(Plugin) == -1) return -1;\r
        }\r
@@ -820,7 +797,7 @@ void SetIsoFile(const char *filename) {
                IsoFile[0] = '\0';\r
                return;\r
        }\r
-       strncpy(IsoFile, filename, MAXPATHLEN);\r
+       strncpy(IsoFile, filename, MAXPATHLEN - 1);\r
 }\r
 \r
 const char *GetIsoFile(void) {\r