MinGW - fix some possible build issues and compile time errors
This commit is contained in:
parent
ed575d0ff5
commit
d9be086126
|
@ -6,7 +6,14 @@ option(FCEUX_FORCE_LE "Build for a little-endian target" OFF)
|
||||||
option(FCEUX_FORCE_BE "Build for a big-endian target" OFF)
|
option(FCEUX_FORCE_BE "Build for a big-endian target" OFF)
|
||||||
option(FCEUX_FRAMESKIP "Build legacy frameskip code" OFF)
|
option(FCEUX_FRAMESKIP "Build legacy frameskip code" OFF)
|
||||||
|
|
||||||
if(NOT WIN32)
|
if(WIN32)
|
||||||
|
OPTION (NOWIN32 "Replace Win32 support with SDL" OFF)
|
||||||
|
if (NOWIN32)
|
||||||
|
set(WIN32 OFF)
|
||||||
|
endif(NOWIN32)
|
||||||
|
endif(WIN32)
|
||||||
|
|
||||||
|
if (NOT WIN32)
|
||||||
option(FCEUX_SDL_OPENGL "Build with OpenGL support" ON)
|
option(FCEUX_SDL_OPENGL "Build with OpenGL support" ON)
|
||||||
find_package(SDL REQUIRED)
|
find_package(SDL REQUIRED)
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
|
@ -32,6 +39,7 @@ set(SRC_CORE
|
||||||
${CMAKE_SOURCE_DIR}/src/movie.cpp
|
${CMAKE_SOURCE_DIR}/src/movie.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/netplay.cpp
|
${CMAKE_SOURCE_DIR}/src/netplay.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/nsf.cpp
|
${CMAKE_SOURCE_DIR}/src/nsf.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/oldmovie.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/palette.cpp
|
${CMAKE_SOURCE_DIR}/src/palette.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/ppu.cpp
|
${CMAKE_SOURCE_DIR}/src/ppu.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/sound.cpp
|
${CMAKE_SOURCE_DIR}/src/sound.cpp
|
||||||
|
@ -42,9 +50,20 @@ set(SRC_CORE
|
||||||
${CMAKE_SOURCE_DIR}/src/wave.cpp
|
${CMAKE_SOURCE_DIR}/src/wave.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/x6502.cpp
|
${CMAKE_SOURCE_DIR}/src/x6502.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/01-222.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/01-222.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/103.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/106.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/108.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/112.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/112.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/117.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/117.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/120.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/121.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/15.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/164.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/164.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/175.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/176.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/177.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/178.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/179.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/183.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/183.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/185.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/185.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/186.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/186.cpp
|
||||||
|
@ -53,47 +72,68 @@ set(SRC_CORE
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/199.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/199.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/208.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/208.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/222.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/222.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/23.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/235.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/235.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/253.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/3d-block.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/411120-c.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/43.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/43.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/57.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/57.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/603-5052.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/603-5052.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/68.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/8157.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/8157.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/8237.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/8237.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/830118C.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/88.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/88.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/90.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/90.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/95.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/95.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/__dummy_mapper.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/__dummy_mapper.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/a9711.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/a9711.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/a9746.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/addrlatch.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/addrlatch.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/ax5705.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/bandai.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/bmc13in1jy110.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/bmc13in1jy110.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/bmc42in1r.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/bmc42in1r.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/bmc64in1nr.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/bmc64in1nr.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/bmc70in1.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/bmc70in1.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/bonza.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/bonza.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/bs-5.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/copyfami_mmc3.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/dance.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/datalatch.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/datalatch.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/deirom.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/deirom.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/dream.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/dream.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/edu2000.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/edu2000.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/fk23c.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/fk23c.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/ghostbusters63in1.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/gs-2004.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/gs-2013.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/h2288.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/h2288.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/karaoke.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/karaoke.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/kof97.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/kof97.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/konami-qtai.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/konami-qtai.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/ks7032.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/malee.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/malee.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/mmc1.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/mmc1.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/mmc3.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/mmc3.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/mmc5.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/mmc5.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/n-c22m.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/n-c22m.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/n106.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/n106.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/n625092.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/novel.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/novel.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/sachen.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/sachen.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/sc-127.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/sheroes.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/sheroes.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/sl1632.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/sl1632.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/smb2j.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/subor.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/subor.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/super24.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/super24.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/supervision.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/supervision.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/t-227-1.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/t-262.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/t-262.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/boards/tengen.cpp
|
${CMAKE_SOURCE_DIR}/src/boards/tengen.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/boards/tf-1201.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/input/arkanoid.cpp
|
${CMAKE_SOURCE_DIR}/src/input/arkanoid.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/input/bworld.cpp
|
${CMAKE_SOURCE_DIR}/src/input/bworld.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/input/cursor.cpp
|
${CMAKE_SOURCE_DIR}/src/input/cursor.cpp
|
||||||
|
@ -109,13 +149,11 @@ set(SRC_CORE
|
||||||
${CMAKE_SOURCE_DIR}/src/input/suborkb.cpp
|
${CMAKE_SOURCE_DIR}/src/input/suborkb.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/input/toprider.cpp
|
${CMAKE_SOURCE_DIR}/src/input/toprider.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/input/zapper.cpp
|
${CMAKE_SOURCE_DIR}/src/input/zapper.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/15.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/151.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/151.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/16.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/16.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/17.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/17.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/18.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/18.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/193.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/193.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/200.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/201.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/201.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/202.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/202.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/203.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/203.cpp
|
||||||
|
@ -131,12 +169,10 @@ set(SRC_CORE
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/227.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/227.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/228.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/228.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/229.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/229.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/23.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/230.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/230.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/231.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/231.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/232.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/232.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/234.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/234.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/240.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/241.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/241.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/242.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/242.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/244.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/244.cpp
|
||||||
|
@ -150,7 +186,6 @@ set(SRC_CORE
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/40.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/40.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/41.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/41.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/42.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/42.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/43.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/46.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/46.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/50.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/50.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/51.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/51.cpp
|
||||||
|
@ -161,7 +196,6 @@ set(SRC_CORE
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/62.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/62.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/65.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/65.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/67.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/67.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/68.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/69.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/69.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/71.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/71.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/72.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/72.cpp
|
||||||
|
@ -181,10 +215,10 @@ set(SRC_CORE
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/92.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/92.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/97.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/97.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/99.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/99.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/__226.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/emu2413.c
|
${CMAKE_SOURCE_DIR}/src/mappers/emu2413.c
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/mmc2and4.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/mmc2and4.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/mappers/simple.cpp
|
${CMAKE_SOURCE_DIR}/src/mappers/simple.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/utils/ConvertUTF.c
|
||||||
${CMAKE_SOURCE_DIR}/src/utils/crc32.cpp
|
${CMAKE_SOURCE_DIR}/src/utils/crc32.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/utils/endian.cpp
|
${CMAKE_SOURCE_DIR}/src/utils/endian.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/utils/general.cpp
|
${CMAKE_SOURCE_DIR}/src/utils/general.cpp
|
||||||
|
@ -224,9 +258,40 @@ if(FCEUX_SDL_OPENGL)
|
||||||
endif(FCEUX_SDL_OPENGL)
|
endif(FCEUX_SDL_OPENGL)
|
||||||
|
|
||||||
set(SRC_DRIVERS_WIN
|
set(SRC_DRIVERS_WIN
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua-engine.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/lapi.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/lauxlib.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/lbaselib.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/lcode.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/ldblib.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/ldebug.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/ldo.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/ldump.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/lfunc.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/lgc.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/linit.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/liolib.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/llex.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/lmathlib.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/lmem.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/loadlib.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/lobject.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/lopcodes.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/loslib.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/lparser.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/lstate.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/lstring.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/lstrlib.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/ltable.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/ltablib.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/ltm.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/lundump.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/lvm.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/lzio.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/lua/src/print.c
|
||||||
|
${CMAKE_SOURCE_DIR}/src/drivers/win/archive.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/args.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/args.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/aviout.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/aviout.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/basicbot.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/cdlogger.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/cdlogger.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/cheat.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/cheat.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/common.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/common.cpp
|
||||||
|
@ -241,11 +306,13 @@ set(SRC_DRIVERS_WIN
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/joystick.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/joystick.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/keyboard.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/keyboard.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/log.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/log.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/drivers/win/luaconsole.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/main.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/main.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/mapinput.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/mapinput.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/memview.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/memview.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/memviewsp.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/memviewsp.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/memwatch.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/memwatch.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/drivers/win/movieoptions.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/monitor.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/monitor.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/netplay.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/netplay.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/ntview.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/ntview.cpp
|
||||||
|
@ -253,17 +320,22 @@ set(SRC_DRIVERS_WIN
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/palette.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/palette.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/ppuview.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/ppuview.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/pref.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/pref.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/drivers/win/ram_search.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/drivers/win/ramwatch.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/replay.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/replay.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/res.rc
|
${CMAKE_SOURCE_DIR}/src/drivers/win/res.rc
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/sound.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/sound.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/state.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/state.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/tasedit.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/tasedit.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/drivers/win/taseditlib/taseditproj.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/drivers/win/texthook.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/throttle.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/throttle.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/timing.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/timing.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/tracer.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/tracer.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/video.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/video.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/wave.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/wave.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/window.cpp
|
${CMAKE_SOURCE_DIR}/src/drivers/win/window.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/src/drivers/win/Win32InputBox.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/zlib/adler32.c
|
${CMAKE_SOURCE_DIR}/src/drivers/win/zlib/adler32.c
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/zlib/compress.c
|
${CMAKE_SOURCE_DIR}/src/drivers/win/zlib/compress.c
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/zlib/crc32.c
|
${CMAKE_SOURCE_DIR}/src/drivers/win/zlib/crc32.c
|
||||||
|
@ -278,6 +350,7 @@ set(SRC_DRIVERS_WIN
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/zlib/trees.c
|
${CMAKE_SOURCE_DIR}/src/drivers/win/zlib/trees.c
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/zlib/uncompr.c
|
${CMAKE_SOURCE_DIR}/src/drivers/win/zlib/uncompr.c
|
||||||
${CMAKE_SOURCE_DIR}/src/drivers/win/zlib/zutil.c
|
${CMAKE_SOURCE_DIR}/src/drivers/win/zlib/zutil.c
|
||||||
|
# ${CMAKE_SOURCE_DIR}/src/drivers/res.rc
|
||||||
)
|
)
|
||||||
|
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
@ -349,14 +422,46 @@ add_executable( ${FCEUX_EXE_NAME} ${SOURCES} )
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
add_dependencies( ${FCEUX_EXE_NAME} InstallHelpFile )
|
add_dependencies( ${FCEUX_EXE_NAME} InstallHelpFile )
|
||||||
|
#add_dependencies( ${FCEUX_EXE_NAME} res.o)
|
||||||
|
#add_custom_command(
|
||||||
|
# OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/res.o
|
||||||
|
# COMMAND windres
|
||||||
|
# ARGS ${CMAKE_SOURCE_DIR}/src/drivers/win/res.rc ${CMAKE_CURRENT_BINARY_DIR}/res.o --use-temp-file -D_WIN_IE=0x300
|
||||||
|
# MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/src/drivers/win/res.rc
|
||||||
|
#)
|
||||||
|
set(OUTPUT_RES_RC_O CMakeFiles/${FCEUX_EXE_NAME}.dir/__/__/__/src/drivers/win/res.rc.o)
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT ${OUTPUT_RES_RC_O}
|
||||||
|
COMMAND windres -o ${OUTPUT_RES_RC_O} ${CMAKE_SOURCE_DIR}/src/drivers/win/res.rc
|
||||||
|
DEPENDS ${CMAKE_SOURCE_DIR}/src/drivers/win/res.rc
|
||||||
|
VERBATIM
|
||||||
|
)
|
||||||
|
add_custom_target(
|
||||||
|
BuildResourceFileFor${FCEUX_EXE_NAME}
|
||||||
|
DEPENDS ${OUTPUT_RES_RC_O}
|
||||||
|
)
|
||||||
|
set(DEFINED_BUILD_RESOURCE_FILE TRUE CACHE GLOBAL "This is a hack to get CMake to build the .rc file")
|
||||||
|
|
||||||
target_link_libraries( ${FCEUX_EXE_NAME} rpcrt4 comctl32 vfw32 winmm ws2_32 htmlhelp
|
add_dependencies( ${FCEUX_EXE_NAME} BuildResourceFileFor${FCEUX_EXE_NAME} )
|
||||||
|
set_property(
|
||||||
|
TARGET ${FCEUX_EXE_NAME}
|
||||||
|
PROPERTY LINK_FLAGS ${OUTPUT_RES_RC_O}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries( ${FCEUX_EXE_NAME} rpcrt4 comctl32 vfw32 winmm ws2_32
|
||||||
comdlg32 ole32 gdi32
|
comdlg32 ole32 gdi32
|
||||||
dsound dxguid ddraw dinput
|
dsound dxguid ddraw dinput
|
||||||
)
|
)
|
||||||
|
if(MINGW)
|
||||||
|
include_directories(${CMAKE_SOURCE_DIR}/src/drivers/win/lua/include/)
|
||||||
|
else(MINGW)
|
||||||
|
target_link_libraries( ${FCEUX_EXE_NAME} htmlhelp)
|
||||||
|
endif(MINGW)
|
||||||
else(WIN32)
|
else(WIN32)
|
||||||
target_link_libraries( ${FCEUX_EXE_NAME} ${SDL_LIBRARY} ${ZLIB_LIBRARIES} )
|
target_link_libraries( ${FCEUX_EXE_NAME} ${SDL_LIBRARY} ${ZLIB_LIBRARIES} )
|
||||||
if(FCEUX_SDL_OPENGL)
|
if(FCEUX_SDL_OPENGL)
|
||||||
target_link_libraries( ${FCEUX_EXE_NAME} ${OPENGL_gl_LIBRARY} )
|
target_link_libraries( ${FCEUX_EXE_NAME} ${OPENGL_gl_LIBRARY} )
|
||||||
endif(FCEUX_SDL_OPENGL)
|
endif(FCEUX_SDL_OPENGL)
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ CreateDirs(const std::string &dir)
|
||||||
std::string subdir;
|
std::string subdir;
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
#ifdef WIN32
|
#if defined(WIN32) || defined(NEED_MINGW_HACKS)
|
||||||
mkdir(dir.c_str());
|
mkdir(dir.c_str());
|
||||||
for(x = 0; x < 6; x++) {
|
for(x = 0; x < 6; x++) {
|
||||||
subdir = dir + PSS + subs[x];
|
subdir = dir + PSS + subs[x];
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
#define _AFXRES_H
|
#define _AFXRES_H
|
||||||
#if __GNUC__ >= 3
|
#if __GNUC__ >= 3
|
||||||
#pragma GCC system_header
|
#pragma GCC system_header
|
||||||
|
|
||||||
|
// MINGW hack for Commctrl.h
|
||||||
|
#define _WIN32_IE 0x0600
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -246,7 +246,7 @@ public:
|
||||||
|
|
||||||
if (origin < 3)
|
if (origin < 3)
|
||||||
{
|
{
|
||||||
std::ios::off_type offtype;
|
std::ios::seekdir offtype;
|
||||||
switch(origin)
|
switch(origin)
|
||||||
{
|
{
|
||||||
case 0: offtype = std::ios::beg; break;
|
case 0: offtype = std::ios::beg; break;
|
||||||
|
|
|
@ -16,19 +16,6 @@
|
||||||
#define DIRECTDRAW_VERSION 0x0700
|
#define DIRECTDRAW_VERSION 0x0700
|
||||||
#define DIRECTINPUT_VERSION 0x700
|
#define DIRECTINPUT_VERSION 0x700
|
||||||
|
|
||||||
#ifdef NEED_MINGW_HACKS
|
|
||||||
typedef struct _HD_HITTESTINFO HDHITTESTINFO;
|
|
||||||
// Pulled from wine's commctrl.h:
|
|
||||||
typedef struct tagNMLVODSTATECHANGE
|
|
||||||
{
|
|
||||||
NMHDR hdr;
|
|
||||||
int iFrom;
|
|
||||||
int iTo;
|
|
||||||
UINT uNewState;
|
|
||||||
UINT uOldState;
|
|
||||||
} NMLVODSTATECHANGE, *LPNMLVODSTATECHANGE;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//#define FCEUDEF_DEBUGGER //mbg merge 7/17/06 removing conditional compiles
|
//#define FCEUDEF_DEBUGGER //mbg merge 7/17/06 removing conditional compiles
|
||||||
#include "../../types.h"
|
#include "../../types.h"
|
||||||
#include "../../file.h"
|
#include "../../file.h"
|
||||||
|
|
|
@ -1,5 +1,17 @@
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "help.h"
|
#include "help.h"
|
||||||
|
|
||||||
|
#ifdef NEED_MINGW_HACKS
|
||||||
|
|
||||||
|
using std::string;
|
||||||
|
|
||||||
|
void OpenHelpWindow(string subpage)
|
||||||
|
{
|
||||||
|
// TODO: Implement replacement for MinGW.
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
#include <htmlhelp.h>
|
#include <htmlhelp.h>
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
|
@ -12,3 +24,5 @@ void OpenHelpWindow(string subpage)
|
||||||
helpFileName = helpFileName + "::/" + subpage + ".htm";
|
helpFileName = helpFileName + "::/" + subpage + ".htm";
|
||||||
HtmlHelp(GetDesktopWindow(), helpFileName.c_str(), HH_DISPLAY_TOPIC, (DWORD)NULL);
|
HtmlHelp(GetDesktopWindow(), helpFileName.c_str(), HH_DISPLAY_TOPIC, (DWORD)NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
|
@ -422,7 +422,9 @@ void DoFCEUExit()
|
||||||
|
|
||||||
FCEUI_StopMovie();
|
FCEUI_StopMovie();
|
||||||
FCEUD_AviStop();
|
FCEUD_AviStop();
|
||||||
|
#ifdef _S9XLUA_H
|
||||||
FCEU_LuaStop(); // kill lua script before the gui dies
|
FCEU_LuaStop(); // kill lua script before the gui dies
|
||||||
|
#endif
|
||||||
|
|
||||||
exiting = 1;
|
exiting = 1;
|
||||||
closeGame = true;//mbg 6/30/06 - for housekeeping purposes we need to exit after the emulation cycle finishes
|
closeGame = true;//mbg 6/30/06 - for housekeeping purposes we need to exit after the emulation cycle finishes
|
||||||
|
|
|
@ -120,6 +120,9 @@ LRESULT CALLBACK MemViewCallB(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||||
BOOL CALLBACK MemFindCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
BOOL CALLBACK MemFindCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||||
void FindNext();
|
void FindNext();
|
||||||
void OpenFindDialog();
|
void OpenFindDialog();
|
||||||
|
static int GetFileData(uint32 offset);
|
||||||
|
static int WriteFileData(uint32 offset,int data);
|
||||||
|
|
||||||
|
|
||||||
HWND hMemView, hMemFind;
|
HWND hMemView, hMemFind;
|
||||||
HDC mDC;
|
HDC mDC;
|
||||||
|
@ -138,7 +141,7 @@ int MemFind_wndx, MemFind_wndy;
|
||||||
int MemViewSizeX=625,MemViewSizeY=242;
|
int MemViewSizeX=625,MemViewSizeY=242;
|
||||||
static RECT newMemViewRect;
|
static RECT newMemViewRect;
|
||||||
|
|
||||||
char chartable[256];
|
static char chartable[256];
|
||||||
|
|
||||||
//SCROLLINFO memsi;
|
//SCROLLINFO memsi;
|
||||||
//HBITMAP HDataBmp;
|
//HBITMAP HDataBmp;
|
||||||
|
|
|
@ -6,10 +6,6 @@ void ChangeMemViewFocus(int newEditingMode, int StartOffset,int EndOffset);
|
||||||
|
|
||||||
void ApplyPatch(int addr,int size, uint8* data);
|
void ApplyPatch(int addr,int size, uint8* data);
|
||||||
void UndoLastPatch();
|
void UndoLastPatch();
|
||||||
int GetFileData(uint32 offset);
|
|
||||||
int WriteFileData(uint32 offset,int data);
|
|
||||||
int GetRomFileSize();
|
|
||||||
void FlushUndoBuffer();
|
|
||||||
|
|
||||||
extern HWND hMemView;
|
extern HWND hMemView;
|
||||||
extern int EditingMode;
|
extern int EditingMode;
|
||||||
|
|
|
@ -970,7 +970,7 @@ LRESULT CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
||||||
Item->item.pszText = num;
|
Item->item.pszText = num;
|
||||||
} return true;
|
} return true;
|
||||||
case 2:
|
case 2:
|
||||||
Item->item.pszText = rswatches[iNum].comment ? rswatches[iNum].comment : "";
|
Item->item.pszText = rswatches[iNum].comment ? rswatches[iNum].comment : (char*)"";
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -355,8 +355,7 @@ BOOL CALLBACK ReplayMetadataDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
|
||||||
//Display Subtitle Heading
|
//Display Subtitle Heading
|
||||||
if (currSubtitles.size() > 0) //If no subtitles, don't bother with this heading
|
if (currSubtitles.size() > 0) //If no subtitles, don't bother with this heading
|
||||||
{
|
{
|
||||||
string Heading = "SUBTITLES";
|
std::wstring rHeading = mbstowcs(string("SUBTITLES"));
|
||||||
std::wstring& rHeading = mbstowcs(Heading);
|
|
||||||
|
|
||||||
LVITEM lvSubtitle;
|
LVITEM lvSubtitle;
|
||||||
lvSubtitle.iItem = 0;
|
lvSubtitle.iItem = 0;
|
||||||
|
|
|
@ -88,10 +88,6 @@ static void GetDispInfo(NMLVDISPINFO* nmlvDispInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CDDS_ITEMPREPAINT (CDDS_ITEM | CDDS_PREPAINT)
|
|
||||||
#define CDDS_ITEMPOSTPAINT (CDDS_ITEM | CDDS_POSTPAINT)
|
|
||||||
#define CDDS_ITEMPREERASE (CDDS_ITEM | CDDS_PREERASE)
|
|
||||||
#define CDDS_ITEMPOSTERASE (CDDS_ITEM | CDDS_POSTERASE)
|
|
||||||
#define CDDS_SUBITEMPREPAINT (CDDS_SUBITEM | CDDS_ITEMPREPAINT)
|
#define CDDS_SUBITEMPREPAINT (CDDS_SUBITEM | CDDS_ITEMPREPAINT)
|
||||||
#define CDDS_SUBITEMPOSTPAINT (CDDS_SUBITEM | CDDS_ITEMPOSTPAINT)
|
#define CDDS_SUBITEMPOSTPAINT (CDDS_SUBITEM | CDDS_ITEMPOSTPAINT)
|
||||||
#define CDDS_SUBITEMPREERASE (CDDS_SUBITEM | CDDS_ITEMPREERASE)
|
#define CDDS_SUBITEMPREERASE (CDDS_SUBITEM | CDDS_ITEMPREERASE)
|
||||||
|
@ -677,7 +673,7 @@ static LRESULT APIENTRY HeaderWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lP
|
||||||
case WM_LBUTTONDOWN:
|
case WM_LBUTTONDOWN:
|
||||||
{
|
{
|
||||||
//perform hit test
|
//perform hit test
|
||||||
HDHITTESTINFO info;
|
HD_HITTESTINFO info;
|
||||||
info.pt.x = GET_X_LPARAM(lParam);
|
info.pt.x = GET_X_LPARAM(lParam);
|
||||||
info.pt.y = GET_Y_LPARAM(lParam);
|
info.pt.y = GET_Y_LPARAM(lParam);
|
||||||
SendMessage(hWnd,HDM_HITTEST,0,(LPARAM)&info);
|
SendMessage(hWnd,HDM_HITTEST,0,(LPARAM)&info);
|
||||||
|
|
|
@ -71,7 +71,7 @@ uint8 tileToggles[32][30]; //keeps track of which tiles in the selection window
|
||||||
uint8 pausedTileToggles[32][30]; //same as above, but is used during the emulator's paused state
|
uint8 pausedTileToggles[32][30]; //same as above, but is used during the emulator's paused state
|
||||||
int lmousedown = 0; //keeps track of the the left mousebuttons down state (for click/drag selection)
|
int lmousedown = 0; //keeps track of the the left mousebuttons down state (for click/drag selection)
|
||||||
int drawingorerasing = 1; //keeps track of whether the user is selecting or deselecting on the selection window
|
int drawingorerasing = 1; //keeps track of whether the user is selecting or deselecting on the selection window
|
||||||
char chartable[256][4]; //used for table mappings
|
static char chartable[256][4]; //used for table mappings
|
||||||
static int TableFileLoaded = 0; //boolean for whether a table file is loaded or not
|
static int TableFileLoaded = 0; //boolean for whether a table file is loaded or not
|
||||||
uint16 tile = 0x0000; //used to store the value of a tile at a given x,y location
|
uint16 tile = 0x0000; //used to store the value of a tile at a given x,y location
|
||||||
int tileattr = 0; //used to store the corresponding attribute location for tile (see getTextHookerTile)
|
int tileattr = 0; //used to store the corresponding attribute location for tile (see getTextHookerTile)
|
||||||
|
@ -781,7 +781,7 @@ BOOL CALLBACK TextHookerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|
||||||
char str[2048];
|
char str[2048];
|
||||||
char bufferstr[10240]; //holds the entire buffer, so it needs to be big...
|
char bufferstr[10240]; //holds the entire buffer, so it needs to be big...
|
||||||
char bufferstrtemp[10240];
|
char bufferstrtemp[10240];
|
||||||
void* found = "\0";
|
void* found = (void*)"\0";
|
||||||
char binstring[165];
|
char binstring[165];
|
||||||
char byteline[165];
|
char byteline[165];
|
||||||
int bytecounter;
|
int bytecounter;
|
||||||
|
|
|
@ -513,6 +513,7 @@ void UpdateContextMenuItems(HMENU context, int whichContext)
|
||||||
EnableMenuItem(context,FCEUX_CONTEXT_RECENTROM1,MF_BYCOMMAND | MF_GRAYED);
|
EnableMenuItem(context,FCEUX_CONTEXT_RECENTROM1,MF_BYCOMMAND | MF_GRAYED);
|
||||||
|
|
||||||
//Add Lua separator if either lua condition is true (yeah, a little ugly but it works)
|
//Add Lua separator if either lua condition is true (yeah, a little ugly but it works)
|
||||||
|
#ifdef _S9XLUA_H
|
||||||
if (recent_lua[0] || FCEU_LuaRunning())
|
if (recent_lua[0] || FCEU_LuaRunning())
|
||||||
InsertMenu(context, 0xFFFF, MF_SEPARATOR, 0, "");
|
InsertMenu(context, 0xFFFF, MF_SEPARATOR, 0, "");
|
||||||
|
|
||||||
|
@ -523,6 +524,7 @@ void UpdateContextMenuItems(HMENU context, int whichContext)
|
||||||
//If lua is loaded, add a stop lua item
|
//If lua is loaded, add a stop lua item
|
||||||
if (FCEU_LuaRunning())
|
if (FCEU_LuaRunning())
|
||||||
InsertMenu(context, 0xFFFF, MF_BYCOMMAND, FCEUX_CONTEXT_CLOSELUAWINDOWS, "Close All Script Windows");
|
InsertMenu(context, 0xFFFF, MF_BYCOMMAND, FCEUX_CONTEXT_CLOSELUAWINDOWS, "Close All Script Windows");
|
||||||
|
#endif
|
||||||
|
|
||||||
//If menu is hidden, add an Unhide menu option
|
//If menu is hidden, add an Unhide menu option
|
||||||
if (tog)
|
if (tog)
|
||||||
|
@ -1355,8 +1357,10 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
||||||
//-------------------------------------------------------
|
//-------------------------------------------------------
|
||||||
//Check if Lua file
|
//Check if Lua file
|
||||||
//-------------------------------------------------------
|
//-------------------------------------------------------
|
||||||
|
#ifdef _S9XLUA_H
|
||||||
else if (!(fileDropped.find(".lua") == string::npos) && (fileDropped.find(".lua") == fileDropped.length()-4))
|
else if (!(fileDropped.find(".lua") == string::npos) && (fileDropped.find(".lua") == fileDropped.length()-4))
|
||||||
FCEU_LoadLuaCode(ftmp);
|
FCEU_LoadLuaCode(ftmp);
|
||||||
|
#endif
|
||||||
//-------------------------------------------------------
|
//-------------------------------------------------------
|
||||||
//Check if Ram Watch file
|
//Check if Ram Watch file
|
||||||
//-------------------------------------------------------
|
//-------------------------------------------------------
|
||||||
|
@ -1403,6 +1407,7 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
||||||
}
|
}
|
||||||
|
|
||||||
// A menu item for the recent lua files menu was clicked.
|
// A menu item for the recent lua files menu was clicked.
|
||||||
|
#ifdef _S9XLUA_H
|
||||||
if(wParam >= LUA_FIRST_RECENT_FILE && wParam <= LUA_FIRST_RECENT_FILE + MAX_NUMBER_OF_LUA_RECENT_FILES - 1)
|
if(wParam >= LUA_FIRST_RECENT_FILE && wParam <= LUA_FIRST_RECENT_FILE + MAX_NUMBER_OF_LUA_RECENT_FILES - 1)
|
||||||
{
|
{
|
||||||
char*& fname = recent_lua[wParam - LUA_FIRST_RECENT_FILE];
|
char*& fname = recent_lua[wParam - LUA_FIRST_RECENT_FILE];
|
||||||
|
@ -1420,6 +1425,7 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// A menu item for the recent movie files menu was clicked.
|
// A menu item for the recent movie files menu was clicked.
|
||||||
if(wParam >= MOVIE_FIRST_RECENT_FILE && wParam <= MOVIE_FIRST_RECENT_FILE + MAX_NUMBER_OF_MOVIE_RECENT_FILES - 1)
|
if(wParam >= MOVIE_FIRST_RECENT_FILE && wParam <= MOVIE_FIRST_RECENT_FILE + MAX_NUMBER_OF_MOVIE_RECENT_FILES - 1)
|
||||||
|
@ -1529,6 +1535,7 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
||||||
PostMessage(LuaConsoleHWnd, WM_CLOSE, 0, 0);
|
PostMessage(LuaConsoleHWnd, WM_CLOSE, 0, 0);
|
||||||
break;
|
break;
|
||||||
//Recent Lua 1
|
//Recent Lua 1
|
||||||
|
#ifdef _S9XLUA_H
|
||||||
case FCEUX_CONTEXT_LOADLASTLUA:
|
case FCEUX_CONTEXT_LOADLASTLUA:
|
||||||
if(recent_lua[0])
|
if(recent_lua[0])
|
||||||
{
|
{
|
||||||
|
@ -1544,6 +1551,7 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case MENU_EXIT:
|
case MENU_EXIT:
|
||||||
DoFCEUExit();
|
DoFCEUExit();
|
||||||
|
@ -1716,10 +1724,12 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_CONFIG_SAVECONFIGFILE:
|
case ID_CONFIG_SAVECONFIGFILE:
|
||||||
|
{
|
||||||
extern string cfgFile;
|
extern string cfgFile;
|
||||||
sprintf(TempArray, "%s/%s", BaseDirectory.c_str(),cfgFile.c_str());
|
sprintf(TempArray, "%s/%s", BaseDirectory.c_str(),cfgFile.c_str());
|
||||||
SaveConfig(TempArray);
|
SaveConfig(TempArray);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
//Tools Menu---------------------------------------------------------------
|
//Tools Menu---------------------------------------------------------------
|
||||||
case MENU_CHEATS:
|
case MENU_CHEATS:
|
||||||
|
|
|
@ -95,7 +95,7 @@ FCEUGI::~FCEUGI()
|
||||||
if(archiveFilename) delete archiveFilename;
|
if(archiveFilename) delete archiveFilename;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void CloseGame(void)
|
static void FCEU_CloseGame(void)
|
||||||
{
|
{
|
||||||
if(GameInfo)
|
if(GameInfo)
|
||||||
{
|
{
|
||||||
|
@ -352,7 +352,7 @@ static DECLFR(ARAMH)
|
||||||
|
|
||||||
void ResetGameLoaded(void)
|
void ResetGameLoaded(void)
|
||||||
{
|
{
|
||||||
if(GameInfo) CloseGame();
|
if(GameInfo) FCEU_CloseGame();
|
||||||
EmulationPaused = 0; //mbg 5/8/08 - loading games while paused was bad news. maybe this fixes it
|
EmulationPaused = 0; //mbg 5/8/08 - loading games while paused was bad news. maybe this fixes it
|
||||||
GameStateRestore=0;
|
GameStateRestore=0;
|
||||||
PPU_hook=0;
|
PPU_hook=0;
|
||||||
|
@ -413,7 +413,7 @@ FCEUGI *FCEUI_LoadGameVirtual(const char *name, int OverwriteVidMode)
|
||||||
for (AutosaveIndex=0; AutosaveIndex<AutosaveQty; ++AutosaveIndex)
|
for (AutosaveIndex=0; AutosaveIndex<AutosaveQty; ++AutosaveIndex)
|
||||||
AutosaveStatus[AutosaveIndex] = 0;
|
AutosaveStatus[AutosaveIndex] = 0;
|
||||||
|
|
||||||
CloseGame();
|
FCEU_CloseGame();
|
||||||
GameInfo = new FCEUGI();
|
GameInfo = new FCEUGI();
|
||||||
memset(GameInfo, 0, sizeof(FCEUGI));
|
memset(GameInfo, 0, sizeof(FCEUGI));
|
||||||
|
|
||||||
|
@ -706,7 +706,7 @@ void FCEUI_CloseGame(void)
|
||||||
if(!FCEU_IsValidUI(FCEUI_CLOSEGAME))
|
if(!FCEU_IsValidUI(FCEUI_CLOSEGAME))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CloseGame();
|
FCEU_CloseGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ResetNES(void)
|
void ResetNES(void)
|
||||||
|
|
|
@ -1566,7 +1566,11 @@ struct TieredRegion
|
||||||
{
|
{
|
||||||
unsigned int start;
|
unsigned int start;
|
||||||
unsigned int end;
|
unsigned int end;
|
||||||
|
#ifdef NEED_MINGW_HACKS
|
||||||
|
bool Contains(unsigned int address, int size) const { return address < end && address+size > start; }
|
||||||
|
#else
|
||||||
__forceinline bool Contains(unsigned int address, int size) const { return address < end && address+size > start; }
|
__forceinline bool Contains(unsigned int address, int size) const { return address < end && address+size > start; }
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
std::vector<Island> islands;
|
std::vector<Island> islands;
|
||||||
|
|
||||||
|
@ -4534,7 +4538,7 @@ int FCEU_LoadLuaCode(const char *filename) {
|
||||||
|
|
||||||
L = lua_open();
|
L = lua_open();
|
||||||
luaL_openlibs(L);
|
luaL_openlibs(L);
|
||||||
#ifdef WIN32
|
#if defined( WIN32) && !defined(NEED_MINGW_HACKS)
|
||||||
iuplua_open(L);
|
iuplua_open(L);
|
||||||
iupcontrolslua_open(L);
|
iupcontrolslua_open(L);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -117,6 +117,10 @@ typedef uint32_t uint32;
|
||||||
#define PSS ":"
|
#define PSS ":"
|
||||||
#define PS ':'
|
#define PS ':'
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#error PSS_STYLE undefined or invalid; see "types.h" for possible values, and add as compile-time option.
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue