From 13f923675a010bc5d02bf1ab73081e59b9b971d1 Mon Sep 17 00:00:00 2001 From: shinydoofy Date: Sun, 22 Mar 2009 17:33:29 +0000 Subject: [PATCH] SDL: fixed latest compilation errors due to r1209. static != extern in gcc --- src/boards/SConscript | 4 ++++ src/boards/copyfami_mmc3.cpp | 2 +- src/boards/sheroes.cpp | 2 +- src/boards/super24.cpp | 2 +- src/drivers/sdl/config.cpp | 17 +++++++++-------- src/drivers/sdl/sdl.cpp | 12 ++++++------ 6 files changed, 22 insertions(+), 17 deletions(-) diff --git a/src/boards/SConscript b/src/boards/SConscript index f0f58941..606a623e 100644 --- a/src/boards/SConscript +++ b/src/boards/SConscript @@ -9,6 +9,8 @@ my_list = Split(""" 121.cpp 15.cpp 164.cpp +175.cpp +176.cpp 177.cpp 178.cpp 179.cpp @@ -46,6 +48,7 @@ bmc70in1.cpp bonza.cpp bs-5.cpp copyfami_mmc3.cpp +dance.cpp datalatch.cpp deirom.cpp dream.cpp @@ -69,6 +72,7 @@ n106.cpp n625092.cpp novel.cpp sachen.cpp +sc-127.cpp sheroes.cpp sl1632.cpp smb2j.cpp diff --git a/src/boards/copyfami_mmc3.cpp b/src/boards/copyfami_mmc3.cpp index 0f23c4dc..4dd5eb5d 100644 --- a/src/boards/copyfami_mmc3.cpp +++ b/src/boards/copyfami_mmc3.cpp @@ -45,7 +45,7 @@ D6-D0 - Small Page High Address (D6,D5,D4,D3,D2,D1,D0,A11,A10,A9,A8,A7,A6,A5,A4, static uint8 reg[3]; -static uint8 *CHRRAM=NULL; +//static uint8 *CHRRAM=NULL; // already declared in mmc3.h. static != extern static uint32 CHRRAMSIZE; static SFORMAT StateRegs[]= diff --git a/src/boards/sheroes.cpp b/src/boards/sheroes.cpp index 3b4a1b36..2bb1ce17 100644 --- a/src/boards/sheroes.cpp +++ b/src/boards/sheroes.cpp @@ -21,7 +21,7 @@ #include "mapinc.h" #include "mmc3.h" -static uint8 *CHRRAM; +//static uint8 *CHRRAM; // already declared in mmc3.h. static != extern static uint8 tekker; static void MSHCW(uint32 A, uint8 V) diff --git a/src/boards/super24.cpp b/src/boards/super24.cpp index 745e723e..18ae7457 100644 --- a/src/boards/super24.cpp +++ b/src/boards/super24.cpp @@ -21,7 +21,7 @@ #include "mapinc.h" #include "mmc3.h" -static uint8 *CHRRAM = NULL; +//static uint8 *CHRRAM = NULL; // CHRRAM is already declared in mmc3.h. Besides, static and extern don't really go well together. static int masko8[8]={63,31,15,1,3,0,0,0}; static void Super24PW(uint32 A, uint8 V) diff --git a/src/drivers/sdl/config.cpp b/src/drivers/sdl/config.cpp index 59692e78..f15eefb4 100644 --- a/src/drivers/sdl/config.cpp +++ b/src/drivers/sdl/config.cpp @@ -115,12 +115,12 @@ InitConfig() // sound options config->addOption('s', "sound", "SDL.Sound", 1); - config->addOption("volume", "SDL.SoundVolume", 100); - config->addOption("trianglevol", "SDL.TriangleVolume", 100); - config->addOption("square1vol", "SDL.Square1Volume", 100); - config->addOption("square2vol", "SDL.Square2Volume", 100); - config->addOption("noisevol", "SDL.NoiseVolume", 100); - config->addOption("pcmvol", "SDL.PCMVolume", 100); + config->addOption("volume", "SDL.SoundVolume", 150); + config->addOption("trianglevol", "SDL.TriangleVolume", 256); + config->addOption("square1vol", "SDL.Square1Volume", 256); + config->addOption("square2vol", "SDL.Square2Volume", 256); + config->addOption("noisevol", "SDL.NoiseVolume", 256); + config->addOption("pcmvol", "SDL.PCMVolume", 256); config->addOption("soundrate", "SDL.SoundRate", 11000); config->addOption("soundq", "SDL.SoundQuality", 1); config->addOption("soundrecord", "SDL.SoundRecordFile", ""); @@ -358,8 +358,9 @@ UpdateEMUCore(Config *config) config->getOption("SDL.DisableSpriteLimit", &flag); FCEUI_DisableSpriteLimitation(flag ? 1 : 0); - config->getOption("SDL.SnapName", &flag); - FCEUI_SetSnapName(flag ? true : false); + //Not used anymore. + //config->getOption("SDL.SnapName", &flag); + //FCEUI_SetSnapName(flag ? true : false); config->getOption("SDL.ScanLineStart", &start); config->getOption("SDL.ScanLineEnd", &end); diff --git a/src/drivers/sdl/sdl.cpp b/src/drivers/sdl/sdl.cpp index 9b129195..630a3fcd 100644 --- a/src/drivers/sdl/sdl.cpp +++ b/src/drivers/sdl/sdl.cpp @@ -92,12 +92,12 @@ char *DriverUsage="\ --soundrate x Sets sound playback rate to x Hz.\n\ --soundq {0|1} Enables high sound quality.\n\ --soundbufsize x Sets sound buffer size to x ms.\n\ ---volume {0-100} Sets volume.\n\ ---trianglevol {0-100} Sets Triangle volume.\n\ ---square1vol {0-100} Sets Square 1 volume.\n\ ---square2vol {0-100} Sets Square 2 volume.\n\ ---noisevol {0-100} Sets Noise volume.\n\ ---pcmvol {0-100} Sets PCM volume.\n\ +--volume {0-150} Sets volume.\n\ +--trianglevol {0-256} Sets Triangle volume.\n\ +--square1vol {0-256} Sets Square 1 volume.\n\ +--square2vol {0-256} Sets Square 2 volume.\n\ +--noisevol {0-256} Sets Noise volume.\n\ +--pcmvol {0-256} Sets PCM volume.\n\ --lowpass {0|1} Enables low-pass filter if x is nonzero.\n\ --soundrecord f Records sound to file f.\n\ --input(1,2) d Set the input device for input 1 or 2.\n\