diff --git a/SConstruct b/SConstruct index cc902a59..75b7c4cb 100644 --- a/SConstruct +++ b/SConstruct @@ -4,19 +4,23 @@ import sys # XXX path separator fixed right now opts = Options() opts.AddOptions( - BoolOption('PSS_STYLE', 'Path separator style', 1), + BoolOption('DEBUG', 'Build with debugging information', 1), + #BoolOption('PSS_STYLE', 'Path separator style', 1), BoolOption('LSB_FIRST', 'Least significant byte first?', None), - BoolOption('FRAMESKIP', 'Enable frameskipping', 1), - BoolOption('OPENGL', 'Enable OpenGL support', 1) + BoolOption('FRAMESKIP', 'Enable frameskipping', 0), + BoolOption('OPENGL', 'Enable OpenGL support (SDL only)', 1) ) -env = Environment(options = opts, - CPPDEFINES={'PSS_STYLE' : '${PSS_STYLE}'}) +env = Environment(options = opts) +if os.environ.has_key('PLATFORM'): + env.Replace(PLATFORM = os.environ['PLATFORM']) if os.environ.has_key('CC'): env.Replace(CC = os.environ['CC']) if os.environ.has_key('CXX'): env.Replace(CXX = os.environ['CXX']) +if os.environ.has_key('WINDRES'): + env.Append(WINDRES = os.environ['WINDRES']) if os.environ.has_key('CFLAGS'): env.Append(CCFLAGS = os.environ['CFLAGS']) if os.environ.has_key('LDFLAGS'): @@ -33,35 +37,47 @@ if env['PLATFORM'] == 'cygwin': env['LIBS'] = ['wsock32']; conf = Configure(env) -if not conf.CheckLib('SDL'): - print 'Did not find libSDL or SDL.lib, exiting!' - Exit(1) -if not conf.CheckLib('z', autoadd=1): - print 'Did not find libz or z.lib, exiting!' - Exit(1) -if conf.CheckFunc('asprintf'): - conf.env.Append(CCFLAGS = " -DHAVE_ASPRINTF") -if env['OPENGL'] and conf.CheckLibWithHeader('GL', 'GL/gl.h', 'c++', autoadd=1): - conf.env.Append(CCFLAGS = " -DOPENGL") +if env['PLATFORM'] == 'win32': + conf.env.Append(CPPPATH = [".", "drivers/win/", "drivers/common/", "drivers/", "drivers/win/zlib", "drivers/win/directx"]) + conf.env.Append(CPPDEFINES = ["PSS_STYLE=2", "WIN32", "_USE_SHARED_MEMORY_", "NETWORK", "FCEUDEF_DEBUGGER", "NOMINMAX", "_WIN32_IE=0x0300"]) + conf.env.Append(LIBS = ["rpcrt4", "comctl32", "vfw32", "winmm", "ws2_32", "comdlg32", "ole32", "gdi32"]) + if env.has_key('DEBUG'): + if env['DEBUG']: + conf.env.Append(CCFLAGS = " -g") + conf.env.Append(CPPDEFINES = ["_DEBUG"]) + else: # Should we do this? + conf.env.Append(CCFLAGS = " -O3 -fomit-frame-pointer") +else: + if not conf.CheckLib('SDL'): + print 'Did not find libSDL or SDL.lib, exiting!' + Exit(1) + if not conf.CheckLib('z', autoadd=1): + print 'Did not find libz or z.lib, exiting!' + Exit(1) + if conf.CheckFunc('asprintf'): + conf.env.Append(CCFLAGS = " -DHAVE_ASPRINTF") + if env['OPENGL'] and conf.CheckLibWithHeader('GL', 'GL/gl.h', 'c++', autoadd=1): + conf.env.Append(CCFLAGS = " -DOPENGL") + # parse SDL cflags/libs + env.ParseConfig('sdl-config --cflags --libs') + conf.env.Append(CPPDEFINES = " PSS_STYLE=1") env = conf.Finish() # option specified if env.has_key('LSB_FIRST'): if env['LSB_FIRST']: - env.Append(CCFLAGS = ' -DLSB_FIRST') + env.Append(CPPDEFINES = ['LSB_FIRST']) # option not specified, check host system -elif sys.byteorder == 'little': - env.Append(CCFLAGS = ' -DLSB_FIRST') +elif sys.byteorder == 'little' or env['PLATFORM'] == 'win32': + env.Append(CPPDEFINES = ['LSB_FIRST']) if env['FRAMESKIP']: - env.Append(CCFLAGS = ' -DFRAMESKIP') + env.Append(CPPDEFINES = ['FRAMESKIP']) -# parse SDL cflags/libs -env.ParseConfig('sdl-config --cflags --libs') - -print "LIBS:",env['CCFLAGS'] -#env['IBS'] = ['wsock32', 'SDL', 'z', 'mingw32', 'SDL'] +print "CPPDEFINES:",env['CPPDEFINES'] +print "CCFLAGS:",env['CCFLAGS'] +#print "LIBS:",env['LIBS'] Export('env') SConscript(['src/SConscript']) diff --git a/src/SConscript b/src/SConscript index ffb44c1b..cc138915 100644 --- a/src/SConscript +++ b/src/SConscript @@ -29,7 +29,6 @@ movie.cpp subdirs = Split(""" boards drivers/common -drivers/sdl fir input utils @@ -42,6 +41,11 @@ Export('env') for dir in subdirs: subdir_files = SConscript('%s/SConscript' % dir) file_list.append(subdir_files) +if env['PLATFORM'] == 'win32': + platform_files = SConscript('drivers/win/SConscript') +else: + platform_files = SConscript('drivers/sdl/SConscript') +file_list.append(platform_files) print env['LINKFLAGS'] diff --git a/src/drivers/sdl/input.cpp b/src/drivers/sdl/input.cpp index f975a53c..5d0d4ec9 100644 --- a/src/drivers/sdl/input.cpp +++ b/src/drivers/sdl/input.cpp @@ -208,7 +208,7 @@ KeyboardCommands() // f5 to save state, Shift-f5 to save movie if(keyonly(F5)) { if(is_shift) { - FCEUI_SaveMovie(NULL,0,NULL); + FCEUI_SaveMovie(NULL,0); } else { FCEUI_SaveState(NULL); } diff --git a/src/drivers/sdl/sdl.cpp b/src/drivers/sdl/sdl.cpp index f1f86222..6f303c2f 100644 --- a/src/drivers/sdl/sdl.cpp +++ b/src/drivers/sdl/sdl.cpp @@ -532,4 +532,4 @@ void FCEUI_AviVideoUpdate(const unsigned char* buffer) { } int FCEUD_ShowStatusIcon(void) {return 0;} int FCEUI_AviIsRecording(void) {return 0;} void FCEUI_UseInputPreset(int preset) { } - +bool FCEUD_PauseAfterPlayback() { return false; } diff --git a/src/drivers/win/SConscript b/src/drivers/win/SConscript new file mode 100644 index 00000000..57e7d87e --- /dev/null +++ b/src/drivers/win/SConscript @@ -0,0 +1,59 @@ +Import('env') + +my_list = Split(""" +args.cpp +aviout.cpp +basicbot.cpp +cdlogger.cpp +cheat.cpp +common.cpp +config.cpp +debugger.cpp +debuggersp.cpp +directories.cpp +gui.cpp +guiconfig.cpp +input.cpp +joystick.cpp +keyboard.cpp +log.cpp +main.cpp +mapinput.cpp +memview.cpp +memviewsp.cpp +memwatch.cpp +monitor.cpp +netplay.cpp +ntview.cpp +OutputDS.cpp +palette.cpp +ppuview.cpp +pref.cpp +replay.cpp +sound.cpp +state.cpp +tasedit.cpp +throttle.cpp +timing.cpp +tracer.cpp +video.cpp +wave.cpp +window.cpp +""") + +# TODO this is probably .obj if built on a Windows system... +my_list.append('res.o') +env.Command('res.o', 'res.rc', env['WINDRES'] + ' -o $TARGET $SOURCE') + +subdirs = Split(""" +directx +zlib""") + +for x in range(len(my_list)): + my_list[x] = 'drivers/win/' + my_list[x] + +for dir in subdirs: + subdir_files = SConscript('%s/SConscript' % dir) + my_list.append(subdir_files) + +Return('my_list') diff --git a/src/drivers/win/cdlogger.cpp b/src/drivers/win/cdlogger.cpp index a6692cbc..dac4dd00 100644 --- a/src/drivers/win/cdlogger.cpp +++ b/src/drivers/win/cdlogger.cpp @@ -19,16 +19,16 @@ */ #include "common.h" -#include "..\..\fceu.h" -#include "..\..\cart.h" //mbg merge 7/18/06 moved beneath fceu.h -#include "..\..\x6502.h" -#include "..\..\debug.h" +#include "../../fceu.h" +#include "../../cart.h" //mbg merge 7/18/06 moved beneath fceu.h +#include "../../x6502.h" +#include "../../debug.h" #include "debugger.h" #include "tracer.h" #include "cdlogger.h" #define INESPRIV -#include "..\..\ines.h" +#include "../../ines.h" void LoadCDLogFile(); void SaveCDLogFileAs(); diff --git a/src/drivers/win/cheat.cpp b/src/drivers/win/cheat.cpp index f697a7df..e7675dfd 100644 --- a/src/drivers/win/cheat.cpp +++ b/src/drivers/win/cheat.cpp @@ -23,8 +23,8 @@ #include "memview.h" #include "memwatch.h" #include "debugger.h" -#include "..\..\fceu.h" -#include "..\..\cart.h" +#include "../../fceu.h" +#include "../../cart.h" HWND hCheat; //mbg merge 7/19/06 had to add int CheatWindow; diff --git a/src/drivers/win/debugger.cpp b/src/drivers/win/debugger.cpp index be5fe189..c3b3926f 100644 --- a/src/drivers/win/debugger.cpp +++ b/src/drivers/win/debugger.cpp @@ -19,15 +19,16 @@ */ #include "common.h" -#include "..\..\utils/xstring.h" +#include "../../utils/xstring.h" +#include "../../types.h" #include "debugger.h" -#include "..\..\x6502.h" -#include "..\..\fceu.h" -#include "..\..\debug.h" -#include "..\..\nsf.h" -#include "..\..\cart.h" -#include "..\..\ines.h" -#include "..\..\asm.h" +#include "../../x6502.h" +#include "../../fceu.h" +#include "../../debug.h" +#include "../../nsf.h" +#include "../../cart.h" +#include "../../ines.h" +#include "../../asm.h" #include "tracer.h" #include "memview.h" #include "cheat.h" diff --git a/src/drivers/win/directx/SConscript b/src/drivers/win/directx/SConscript new file mode 100644 index 00000000..7635d53b --- /dev/null +++ b/src/drivers/win/directx/SConscript @@ -0,0 +1,10 @@ +my_list = Split(""" +dsound.lib +dxguid.lib +ddraw.lib +dinput.lib +""") + +for x in range(len(my_list)): + my_list[x] = 'drivers/win/directx/' + my_list[x] +Return('my_list') diff --git a/src/drivers/win/input.h b/src/drivers/win/input.h index 820a818e..11f7c7bc 100644 --- a/src/drivers/win/input.h +++ b/src/drivers/win/input.h @@ -63,11 +63,10 @@ void SetEmulationSpeed(int type); int FCEUD_TestCommandState(int c); void FCEUD_UpdateInput(); -extern const char* ScanNames[]; extern CFGSTRUCT HotkeyConfig[]; extern int FCEUD_CommandMapping[EMUCMD_MAX]; #endif -#endif \ No newline at end of file +#endif diff --git a/src/drivers/win/main.cpp b/src/drivers/win/main.cpp index 862ad2c4..7c28a766 100644 --- a/src/drivers/win/main.cpp +++ b/src/drivers/win/main.cpp @@ -62,21 +62,32 @@ //--------------------------- //mbg merge 6/29/06 - new aboutbox -#ifdef _M_X64 - #define _MSVC_ARCH "x64" +#if defined(MSVC) + #ifdef _M_X64 + #define _MSVC_ARCH "x64" + #else + #define _MSVC_ARCH "x86" + #endif + #ifdef _DEBUG + #define _MSVC_BUILD "debug" + #else + #define _MSVC_BUILD "release" + #endif + #define __COMPILER__STRING__ "msvc " _Py_STRINGIZE(_MSC_VER) " " _MSVC_ARCH " " _MSVC_BUILD + #define _Py_STRINGIZE(X) _Py_STRINGIZE1((X)) + #define _Py_STRINGIZE1(X) _Py_STRINGIZE2 ## X + #define _Py_STRINGIZE2(X) #X + //re: http://72.14.203.104/search?q=cache:HG-okth5NGkJ:mail.python.org/pipermail/python-checkins/2002-November/030704.html+_msc_ver+compiler+version+string&hl=en&gl=us&ct=clnk&cd=5 +#elif defined(__GNUC__) + #ifdef _DEBUG + #define _GCC_BUILD "debug" + #else + #define _GCC_BUILD "release" + #endif + #define __COMPILER__STRING__ "gcc " __VERSION__ " " _GCC_BUILD #else - #define _MSVC_ARCH "x86" + #define __COMPILER__STRING__ "unknown" #endif -#ifdef _DEBUG - #define _MSVC_BUILD "debug" -#else - #define _MSVC_BUILD "release" -#endif -#define __COMPILER__STRING__ "msvc " _Py_STRINGIZE(_MSC_VER) " " _MSVC_ARCH " " _MSVC_BUILD -#define _Py_STRINGIZE(X) _Py_STRINGIZE1((X)) -#define _Py_STRINGIZE1(X) _Py_STRINGIZE2 ## X -#define _Py_STRINGIZE2(X) #X -//re: http://72.14.203.104/search?q=cache:HG-okth5NGkJ:mail.python.org/pipermail/python-checkins/2002-November/030704.html+_msc_ver+compiler+version+string&hl=en&gl=us&ct=clnk&cd=5 // External functions diff --git a/src/drivers/win/mapinput.cpp b/src/drivers/win/mapinput.cpp index e69f7a20..2579c737 100644 --- a/src/drivers/win/mapinput.cpp +++ b/src/drivers/win/mapinput.cpp @@ -5,6 +5,7 @@ #include "keyboard.h" #include "gui.h" #include "../../input.h" +#include void KeyboardUpdateState(void); //mbg merge 7/17/06 yech had to add this diff --git a/src/drivers/win/memview.cpp b/src/drivers/win/memview.cpp index 2cc6baf1..49ce4720 100644 --- a/src/drivers/win/memview.cpp +++ b/src/drivers/win/memview.cpp @@ -21,12 +21,12 @@ #include #include "common.h" -#include "..\..\types.h" -#include "..\..\debug.h" -#include "..\..\fceu.h" -#include "..\..\cheat.h" -#include "..\..\cart.h" -#include "..\..\ines.h" +#include "../../types.h" +#include "../../debug.h" +#include "../../fceu.h" +#include "../../cheat.h" +#include "../../cart.h" +#include "../../ines.h" #include "memview.h" #include "debugger.h" #include "cdlogger.h" diff --git a/src/drivers/win/memwatch.cpp b/src/drivers/win/memwatch.cpp index 089517b9..f3451428 100644 --- a/src/drivers/win/memwatch.cpp +++ b/src/drivers/win/memwatch.cpp @@ -19,9 +19,9 @@ */ #include "common.h" -#include "..\..\fceu.h" +#include "../../fceu.h" #include "memwatch.h" -#include "..\..\debug.h" +#include "../../debug.h" #include "debugger.h" const int NUMWATCHES = 24; diff --git a/src/drivers/win/monitor.cpp b/src/drivers/win/monitor.cpp index eb463143..d093d6c0 100644 --- a/src/drivers/win/monitor.cpp +++ b/src/drivers/win/monitor.cpp @@ -3,9 +3,9 @@ #include "debugger.h" #include "debuggersp.h" #include "memwatch.h" -#include "..\..\fceu.h" -#include "..\..\debug.h" -#include "..\..\conddebug.h" +#include "../../fceu.h" +#include "../../debug.h" +#include "../../conddebug.h" #include HWND hMonitor = 0; diff --git a/src/drivers/win/ntview.cpp b/src/drivers/win/ntview.cpp index faa8a04f..ce676e95 100644 --- a/src/drivers/win/ntview.cpp +++ b/src/drivers/win/ntview.cpp @@ -21,13 +21,13 @@ #include "common.h" #include "ntview.h" #include "debugger.h" -#include "..\..\fceu.h" -#include "..\..\debug.h" +#include "../../fceu.h" +#include "../../debug.h" #define INESPRIV -#include "..\..\cart.h" -#include "..\..\ines.h" -#include "..\..\palette.h" -#include "..\..\ppu.h" +#include "../../cart.h" +#include "../../ines.h" +#include "../../palette.h" +#include "../../ppu.h" HWND hNTView; diff --git a/src/drivers/win/res.rc b/src/drivers/win/res.rc index b2a23b82..95d1453a 100644 Binary files a/src/drivers/win/res.rc and b/src/drivers/win/res.rc differ diff --git a/src/drivers/win/sound.h b/src/drivers/win/sound.h index 46b40383..c84b4f6b 100644 --- a/src/drivers/win/sound.h +++ b/src/drivers/win/sound.h @@ -5,4 +5,4 @@ int InitSound(); void TrashSound(); void win_SoundSetScale(int scale); void win_SoundWriteData(int32 *buffer, int count); -void win_Throttle(); \ No newline at end of file +void win_Throttle(); diff --git a/src/drivers/win/tracer.cpp b/src/drivers/win/tracer.cpp index 863cb05a..bafee5cd 100644 --- a/src/drivers/win/tracer.cpp +++ b/src/drivers/win/tracer.cpp @@ -22,12 +22,12 @@ #include "common.h" #include "debugger.h" -#include "..\..\x6502.h" -#include "..\..\fceu.h" -#include "..\..\cart.h" //mbg merge 7/19/06 moved after fceu.h -#include "..\..\file.h" -#include "..\..\debug.h" -#include "..\..\asm.h" +#include "../../x6502.h" +#include "../../fceu.h" +#include "../../cart.h" //mbg merge 7/19/06 moved after fceu.h +#include "../../file.h" +#include "../../debug.h" +#include "../../asm.h" #include "cdlogger.h" #include "tracer.h" #include "memview.h" diff --git a/src/drivers/win/video.cpp b/src/drivers/win/video.cpp index 1315e9df..ba5bdb9c 100644 --- a/src/drivers/win/video.cpp +++ b/src/drivers/win/video.cpp @@ -627,7 +627,7 @@ static void BlitScreenFull(uint8 *XBuf) "decb %%bl\n\t" "jne akoop1\n\t" : - : "S" (XBuf+srendline*256+VNSCLIP), "D" (ScreenLoc+((240-totallines)/2)*pitch+(640-(VNSWID<<1))/2),"b" (totallines), "c" ((pitch-VNSWID)<<1) + : "S" (XBuf+FSettings.FirstSLine*256+VNSCLIP), "D" (ScreenLoc+((240-FSettings.TotalScanlines())/2)*pitch+(640-(VNSWID<<1))/2),"b" (FSettings.TotalScanlines()), "c" ((pitch-VNSWID)<<1) : "%al", "%edx", "%cc" ); } else @@ -649,7 +649,7 @@ static void BlitScreenFull(uint8 *XBuf) "decb %%bl\n\t" "jne koop1\n\t" : - : "S" (XBuf+srendline*256), "D" (ScreenLoc+((240-totallines)/2)*pitch+(640-512)/2),"b" (totallines), "c" (pitch-512+pitch) + : "S" (XBuf+FSettings.FirstSLine*256), "D" (ScreenLoc+((240-FSettings.TotalScanlines())/2)*pitch+(640-512)/2),"b" (FSettings.TotalScanlines()), "c" (pitch-512+pitch) : "%al", "%edx", "%cc" ); } } @@ -676,7 +676,7 @@ static void BlitScreenFull(uint8 *XBuf) "decb %%bl\n\t" "jne ayoop1\n\t" : - : "S" (XBuf+srendline*256+VNSCLIP), "D" (ScreenLoc+((240-totallines)/2)*pitch+(640-(VNSWID<<1))/2),"b" (totallines), "c" ((pitch-VNSWID)<<1) + : "S" (XBuf+FSettings.FirstSLine*256+VNSCLIP), "D" (ScreenLoc+((240-FSettings.TotalScanlines())/2)*pitch+(640-(VNSWID<<1))/2),"b" (FSettings.TotalScanlines()), "c" ((pitch-VNSWID)<<1) : "%al", "%edx", "%cc" ); } else @@ -699,7 +699,7 @@ static void BlitScreenFull(uint8 *XBuf) "decb %%bl\n\t" "jne yoop1\n\t" : - : "S" (XBuf+srendline*256), "D" (ScreenLoc+((240-totallines)/2)*pitch+(640-512)/2),"b" (totallines), "c" (pitch-512+pitch) + : "S" (XBuf+FSettings.FirstSLine*256), "D" (ScreenLoc+((240-FSettings.TotalScanlines())/2)*pitch+(640-512)/2),"b" (FSettings.TotalScanlines()), "c" (pitch-512+pitch) : "%al", "%edx", "%cc" ); } } diff --git a/src/drivers/win/window.cpp b/src/drivers/win/window.cpp index de7c7f61..126c4a17 100644 --- a/src/drivers/win/window.cpp +++ b/src/drivers/win/window.cpp @@ -1054,7 +1054,10 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam) // TODO: Proper stop logging { MENUITEMINFO mi; - char *str = CreateSoundSave() ? "Stop Sound Logging" : "Log Sound As..."; + // Evil: + char *strT = "Stop Sound Logging"; + char *strF = "Log Sound As..."; + char *str = CreateSoundSave() ? strT : strF; memset(&mi,0,sizeof(mi)); mi.fMask=MIIM_DATA|MIIM_TYPE; @@ -1511,4 +1514,4 @@ void FCEUD_CmdOpen(void) bool FCEUD_PauseAfterPlayback() { return pauseAfterPlayback!=0; -} \ No newline at end of file +} diff --git a/src/drivers/win/zlib/SConscript b/src/drivers/win/zlib/SConscript new file mode 100644 index 00000000..122f7afd --- /dev/null +++ b/src/drivers/win/zlib/SConscript @@ -0,0 +1,20 @@ +my_list = Split(""" +adler32.c +compress.c +crc32.c +deflate.c +gzio.c +infblock.c +infcodes.c +inffast.c +inflate.c +inftrees.c +infutil.c +trees.c +uncompr.c +zutil.c +""") + +for x in range(len(my_list)): + my_list[x] = 'drivers/win/zlib/' + my_list[x] +Return('my_list') diff --git a/src/movie.cpp b/src/movie.cpp index f524460e..47892f5c 100644 --- a/src/movie.cpp +++ b/src/movie.cpp @@ -6,7 +6,7 @@ #include #include -#ifdef MSVC +#ifdef WIN32 #include #endif @@ -391,7 +391,7 @@ void ParseGIInput(FCEUGI *GI); //mbg merge 7/17/06 - had to add. gross. void InitOtherInput(void); //mbg merge 7/17/06 - had to add. gross. static void ResetInputTypes() { -#ifdef MSVC +#ifdef WIN32 extern int UsrInputType[3]; UsrInputType[0] = SI_GAMEPAD; UsrInputType[1] = SI_GAMEPAD; diff --git a/src/state.cpp b/src/state.cpp index 364b952f..86ae3efb 100644 --- a/src/state.cpp +++ b/src/state.cpp @@ -263,7 +263,7 @@ static int ReadStateChunks(FILE *st, int32 totalsize) extern uint8 *XBackBuf; if(size != fread(XBackBuf,1,size,st)) ret = 0; -#ifdef MSVC +#ifdef WIN32 else { FCEUD_BlitScreen(XBuf); diff --git a/src/types.h b/src/types.h index 59bbbe71..831582a4 100644 --- a/src/types.h +++ b/src/types.h @@ -202,4 +202,4 @@ struct FCEU_Guid : public ValueArray } }; -#endif \ No newline at end of file +#endif diff --git a/src/utils/endian.h b/src/utils/endian.h index 5f82b39f..3dcaaff9 100644 --- a/src/utils/endian.h +++ b/src/utils/endian.h @@ -11,4 +11,4 @@ uint64 FCEU_de64lsb(uint8 *morp); uint32 FCEU_de32lsb(uint8 *morp); uint16 FCEU_de16lsb(uint8 *morp); -#endif \ No newline at end of file +#endif diff --git a/src/utils/xstring.h b/src/utils/xstring.h index d75200b9..0deb80d7 100644 --- a/src/utils/xstring.h +++ b/src/utils/xstring.h @@ -43,4 +43,4 @@ std::string BytesToString(void* data, int len); bool StringToBytes(std::string& str, void* data, int len); std::vector tokenize_str(const std::string & str,const std::string & delims); -void splitpath(const char* path, char* drv, char* dir, char* name, char* ext); \ No newline at end of file +void splitpath(const char* path, char* drv, char* dir, char* name, char* ext); diff --git a/src/video.cpp b/src/video.cpp index 71ee10b1..df5edfb9 100644 --- a/src/video.cpp +++ b/src/video.cpp @@ -151,7 +151,7 @@ void FCEU_PutImageDummy(void) FCEU_DrawSaveStates(XBuf); FCEU_DrawMovies(XBuf); } - if(howlong) howlong--; /* DrawMessage() */ + if(guiMessage.howlong) guiMessage.howlong--; /* DrawMessage() */ } #endif diff --git a/src/wave.cpp b/src/wave.cpp index 9dbe1b64..f00fbc65 100644 --- a/src/wave.cpp +++ b/src/wave.cpp @@ -23,7 +23,7 @@ void FCEU_WriteWaveData(int32 *Buffer, int Count) int16 *dest; int x; -#ifndef MSVC +#ifndef WIN32 if(!soundlog) return; #else if(!soundlog && !FCEUI_AviIsRecording()) return; @@ -45,7 +45,7 @@ void FCEU_WriteWaveData(int32 *Buffer, int Count) if(soundlog) wsize+=fwrite(temp,1,Count*sizeof(int16),soundlog); - #ifdef MSVC + #ifdef WIN32 if(FCEUI_AviIsRecording()) { FCEUI_AviSoundUpdate((void*)temp, Count); diff --git a/src/wave.h b/src/wave.h index 81065c5e..a2ea04ba 100644 --- a/src/wave.h +++ b/src/wave.h @@ -1,4 +1,4 @@ #include "types.h" void FCEU_WriteWaveData(int32 *Buffer, int Count); -int FCEUI_EndWaveRecord(); \ No newline at end of file +int FCEUI_EndWaveRecord();