allow avi recording to be turned off in makefile
This commit is contained in:
parent
693927ebb8
commit
cbec71190c
3
makefile
3
makefile
|
@ -33,6 +33,9 @@ BUILD_X86_ASM = 1
|
||||||
# Include 7-zip support
|
# Include 7-zip support
|
||||||
INCLUDE_7Z_SUPPORT = 1
|
INCLUDE_7Z_SUPPORT = 1
|
||||||
|
|
||||||
|
# Include AVI recording support (uses Video For Windows)
|
||||||
|
INCLUDE_AVI_RECORDING = 1
|
||||||
|
|
||||||
# Include Toaplan sound sample hacks for games without MCU dumps
|
# Include Toaplan sound sample hacks for games without MCU dumps
|
||||||
TOAPLAN_SOUND_SAMPLES_HACK = 1
|
TOAPLAN_SOUND_SAMPLES_HACK = 1
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ alldir += burner burner/win32 dep/kaillera/client dep/libs/libpng dep/libs/lib7
|
||||||
intf/video/scalers intf/video/win32 intf/audio intf/audio/win32 intf/input intf/input/win32 intf/cd intf/cd/win32 \
|
intf/video/scalers intf/video/win32 intf/audio intf/audio/win32 intf/input intf/input/win32 intf/cd intf/cd/win32 \
|
||||||
intf/perfcount intf/perfcount/win32 dep/generated
|
intf/perfcount intf/perfcount/win32 dep/generated
|
||||||
|
|
||||||
depobj += about.o avi.o bzip.o cona.o debugger.o drv.o dwmapi_core.o dynhuff.o fba_kaillera.o gameinfo.o image_win32.o inpc.o \
|
depobj += about.o bzip.o cona.o debugger.o drv.o dwmapi_core.o dynhuff.o fba_kaillera.o gameinfo.o image_win32.o inpc.o \
|
||||||
inpcheat.o inpd.o inpdipsw.o inps.o ips_manager.o localise.o localise_download.o localise_gamelist.o main.o mdi.o \
|
inpcheat.o inpd.o inpdipsw.o inps.o ips_manager.o localise.o localise_download.o localise_gamelist.o main.o mdi.o \
|
||||||
media.o memcard.o menu.o misc_win32.o neocdlist.o neocdsel.o numdial.o numpluscommas.o paletteviewer.o popup_win32.o \
|
media.o memcard.o menu.o misc_win32.o neocdlist.o neocdsel.o numdial.o numpluscommas.o paletteviewer.o popup_win32.o \
|
||||||
progress.o replay.o res.o roms.o run.o scrn.o sel.o sfactd.o splash.o stated.o support_paths.o systeminfo.o wave.o \
|
progress.o replay.o res.o roms.o run.o scrn.o sel.o sfactd.o splash.o stated.o support_paths.o systeminfo.o wave.o \
|
||||||
|
@ -31,6 +31,10 @@ depobj += un7z.o \
|
||||||
7zBuf.o 7zBuf2.o 7zCrc.o 7zCrcOpt.o 7zDec.o 7zIn.o Bcj2.o Bra.o Bra86.o CpuArch.o LzmaDec.o Lzma2Dec.o Ppmd7.o \
|
7zBuf.o 7zBuf2.o 7zCrc.o 7zCrcOpt.o 7zDec.o 7zIn.o Bcj2.o Bra.o Bra86.o CpuArch.o LzmaDec.o Lzma2Dec.o Ppmd7.o \
|
||||||
Ppmd7Dec.o 7zStream.o
|
Ppmd7Dec.o 7zStream.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef INCLUDE_AVI_RECORDING
|
||||||
|
depobj += avi.o
|
||||||
|
endif
|
||||||
|
|
||||||
autobj += $(depobj)
|
autobj += $(depobj)
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,11 @@ ifdef UNICODE
|
||||||
# lib = -lunicows
|
# lib = -lunicows
|
||||||
endif
|
endif
|
||||||
|
|
||||||
lib += -luser32 -lgdi32 -lcomdlg32 -lcomctl32 -lshell32 -lwinmm -lshlwapi -ladvapi32 -lsetupapi -lole32 -luuid -lwininet -lvfw32
|
lib += -luser32 -lgdi32 -lcomdlg32 -lcomctl32 -lshell32 -lwinmm -lshlwapi -ladvapi32 -lsetupapi -lole32 -luuid -lwininet
|
||||||
|
|
||||||
|
ifdef INCLUDE_AVI_RECORDING
|
||||||
|
lib += -lvfw32
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
depobj += resource.o \
|
depobj += resource.o \
|
||||||
|
@ -316,6 +320,10 @@ ifdef INCLUDE_7Z_SUPPORT
|
||||||
DEF := $(DEF) -DINCLUDE_7Z_SUPPORT
|
DEF := $(DEF) -DINCLUDE_7Z_SUPPORT
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef INCLUDE_AVI_RECORDING
|
||||||
|
DEF := $(DEF) -DINCLUDE_AVI_RECORDING
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef TOAPLAN_SOUND_SAMPLES_HACK
|
ifdef TOAPLAN_SOUND_SAMPLES_HACK
|
||||||
DEF := $(DEF) -DTOAPLAN_SOUND_SAMPLES_HACK
|
DEF := $(DEF) -DTOAPLAN_SOUND_SAMPLES_HACK
|
||||||
endif
|
endif
|
||||||
|
|
10
makefile.vc
10
makefile.vc
|
@ -107,7 +107,11 @@ ifdef UNICODE
|
||||||
# lib = unicows.lib
|
# lib = unicows.lib
|
||||||
endif
|
endif
|
||||||
|
|
||||||
lib += user32.lib gdi32.lib comdlg32.lib comctl32.lib shell32.lib winmm.lib ole32.lib shlwapi.lib advapi32.lib setupapi.lib wininet.lib vfw32.lib
|
lib += user32.lib gdi32.lib comdlg32.lib comctl32.lib shell32.lib winmm.lib ole32.lib shlwapi.lib advapi32.lib setupapi.lib wininet.lib
|
||||||
|
|
||||||
|
ifdef INCLUDE_AVI_RECORDING
|
||||||
|
lib += vfw32.lib
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef BUILD_X86_ASM
|
ifdef BUILD_X86_ASM
|
||||||
autobj += hq3xs.o hq_shared32.o
|
autobj += hq3xs.o hq_shared32.o
|
||||||
|
@ -195,6 +199,10 @@ ifdef INCLUDE_7Z_SUPPORT
|
||||||
DEF := $(DEF) /DINCLUDE_7Z_SUPPORT
|
DEF := $(DEF) /DINCLUDE_7Z_SUPPORT
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef INCLUDE_AVI_RECORDING
|
||||||
|
DEF := $(DEF) /DINCLUDE_AVI_RECORDING
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef TOAPLAN_SOUND_SAMPLES_HACK
|
ifdef TOAPLAN_SOUND_SAMPLES_HACK
|
||||||
DEF := $(DEF) /DTOAPLAN_SOUND_SAMPLES_HACK
|
DEF := $(DEF) /DTOAPLAN_SOUND_SAMPLES_HACK
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -811,9 +811,11 @@ BEGIN
|
||||||
END
|
END
|
||||||
MENUITEM "Restore full state on load", MENU_ALLRAM
|
MENUITEM "Restore full state on load", MENU_ALLRAM
|
||||||
END
|
END
|
||||||
|
#ifdef INCLUDE_AVI_RECORDING
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "Record AVI", MENU_AVISTART, GRAYED
|
MENUITEM "Record AVI", MENU_AVISTART, GRAYED
|
||||||
MENUITEM "Stop recording", MENU_AVISTOP, GRAYED
|
MENUITEM "Stop recording", MENU_AVISTOP, GRAYED
|
||||||
|
#endif
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "Exit emulator\tAlt+F4", MENU_EXIT
|
MENUITEM "Exit emulator\tAlt+F4", MENU_EXIT
|
||||||
END
|
END
|
||||||
|
|
|
@ -465,6 +465,7 @@ TCHAR* FormatCommasNumber(__int64);
|
||||||
#define _uInt64ToCommaFormattedTCHAR(szOUT, nIN) \
|
#define _uInt64ToCommaFormattedTCHAR(szOUT, nIN) \
|
||||||
_stprintf(szOUT, _T("%s"), FormatCommasNumber(nIN));
|
_stprintf(szOUT, _T("%s"), FormatCommasNumber(nIN));
|
||||||
|
|
||||||
|
#ifdef INCLUDE_AVI_RECORDING
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// AVI recording
|
// AVI recording
|
||||||
|
|
||||||
|
@ -474,4 +475,4 @@ int AviRecordFrame(int bDraw);
|
||||||
void AviStop();
|
void AviStop();
|
||||||
extern unsigned char *pAviBuffer;
|
extern unsigned char *pAviBuffer;
|
||||||
extern int nAviStatus;
|
extern int nAviStatus;
|
||||||
|
#endif
|
||||||
|
|
|
@ -1349,6 +1349,7 @@ void MenuEnableItems()
|
||||||
EnableMenuItem(hMenu, MENU_STATE_LOAD_DIALOG, MF_ENABLED | MF_BYCOMMAND);
|
EnableMenuItem(hMenu, MENU_STATE_LOAD_DIALOG, MF_ENABLED | MF_BYCOMMAND);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef INCLUDE_AVI_RECORDING
|
||||||
if (nAviStatus) {
|
if (nAviStatus) {
|
||||||
EnableMenuItem(hMenu, MENU_AVISTART, MF_GRAYED | MF_BYCOMMAND);
|
EnableMenuItem(hMenu, MENU_AVISTART, MF_GRAYED | MF_BYCOMMAND);
|
||||||
EnableMenuItem(hMenu, MENU_AVISTOP, MF_ENABLED | MF_BYCOMMAND);
|
EnableMenuItem(hMenu, MENU_AVISTOP, MF_ENABLED | MF_BYCOMMAND);
|
||||||
|
@ -1356,7 +1357,7 @@ void MenuEnableItems()
|
||||||
EnableMenuItem(hMenu, MENU_AVISTART, MF_ENABLED | MF_BYCOMMAND);
|
EnableMenuItem(hMenu, MENU_AVISTART, MF_ENABLED | MF_BYCOMMAND);
|
||||||
EnableMenuItem(hMenu, MENU_AVISTOP, MF_GRAYED | MF_BYCOMMAND);
|
EnableMenuItem(hMenu, MENU_AVISTOP, MF_GRAYED | MF_BYCOMMAND);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
bAltPause = 0;
|
bAltPause = 0;
|
||||||
|
|
||||||
|
@ -1407,9 +1408,10 @@ void MenuEnableItems()
|
||||||
EnableMenuItem(hMenu, MENU_SNAPFACT, MF_GRAYED | MF_BYCOMMAND);
|
EnableMenuItem(hMenu, MENU_SNAPFACT, MF_GRAYED | MF_BYCOMMAND);
|
||||||
EnableMenuItem(hMenu, MENU_PALETTEVIEWER, MF_GRAYED | MF_BYCOMMAND);
|
EnableMenuItem(hMenu, MENU_PALETTEVIEWER, MF_GRAYED | MF_BYCOMMAND);
|
||||||
EnableMenuItem(hMenu, MENU_SAVEGAMEINPUTNOW, MF_GRAYED | MF_BYCOMMAND);
|
EnableMenuItem(hMenu, MENU_SAVEGAMEINPUTNOW, MF_GRAYED | MF_BYCOMMAND);
|
||||||
|
#ifdef INCLUDE_AVI_RECORDING
|
||||||
EnableMenuItem(hMenu, MENU_AVISTART, MF_GRAYED | MF_BYCOMMAND);
|
EnableMenuItem(hMenu, MENU_AVISTART, MF_GRAYED | MF_BYCOMMAND);
|
||||||
EnableMenuItem(hMenu, MENU_AVISTOP, MF_GRAYED | MF_BYCOMMAND);
|
EnableMenuItem(hMenu, MENU_AVISTOP, MF_GRAYED | MF_BYCOMMAND);
|
||||||
|
#endif
|
||||||
EnableMenuItem(hMenu, MENU_CDIMAGE, MF_ENABLED | MF_BYCOMMAND);
|
EnableMenuItem(hMenu, MENU_CDIMAGE, MF_ENABLED | MF_BYCOMMAND);
|
||||||
|
|
||||||
EnableMenuItem(hMenu, MENU_AUD_PLUGIN_1, MF_ENABLED | MF_BYCOMMAND);
|
EnableMenuItem(hMenu, MENU_AUD_PLUGIN_1, MF_ENABLED | MF_BYCOMMAND);
|
||||||
|
|
|
@ -181,11 +181,13 @@ static int RunFrame(int bDraw, int bPause)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef INCLUDE_AVI_RECORDING
|
||||||
if (nAviStatus) {
|
if (nAviStatus) {
|
||||||
if (AviRecordFrame(bDraw)) {
|
if (AviRecordFrame(bDraw)) {
|
||||||
AviStop();
|
AviStop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bPrevPause = bPause;
|
bPrevPause = bPause;
|
||||||
bPrevDraw = bDraw;
|
bPrevDraw = bDraw;
|
||||||
|
|
|
@ -818,7 +818,9 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
||||||
SplashDestroy(1);
|
SplashDestroy(1);
|
||||||
StopReplay();
|
StopReplay();
|
||||||
|
|
||||||
|
#ifdef INCLUDE_AVI_RECORDING
|
||||||
AviStop();
|
AviStop();
|
||||||
|
#endif
|
||||||
|
|
||||||
InputSetCooperativeLevel(false, bAlwaysProcessKeyboardInput);
|
InputSetCooperativeLevel(false, bAlwaysProcessKeyboardInput);
|
||||||
|
|
||||||
|
@ -923,7 +925,9 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
||||||
AudBlankSound();
|
AudBlankSound();
|
||||||
SplashDestroy(1);
|
SplashDestroy(1);
|
||||||
StopReplay();
|
StopReplay();
|
||||||
|
#ifdef INCLUDE_AVI_RECORDING
|
||||||
AviStop();
|
AviStop();
|
||||||
|
#endif
|
||||||
DrvExit();
|
DrvExit();
|
||||||
DoNetGame();
|
DoNetGame();
|
||||||
MenuEnableItems();
|
MenuEnableItems();
|
||||||
|
@ -955,7 +959,8 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
||||||
StopReplay();
|
StopReplay();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_AVISTART:
|
#ifdef INCLUDE_AVI_RECORDING
|
||||||
|
case MENU_AVISTART:
|
||||||
if (AviStart()) {
|
if (AviStart()) {
|
||||||
AviStop();
|
AviStop();
|
||||||
}
|
}
|
||||||
|
@ -965,7 +970,8 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
||||||
AviStop();
|
AviStop();
|
||||||
VidSNewShortMsg(FBALoadStringEx(hAppInst, IDS_STOP_AVI, true), 0xFF3F3F);
|
VidSNewShortMsg(FBALoadStringEx(hAppInst, IDS_STOP_AVI, true), 0xFF3F3F);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case MENU_QUIT:
|
case MENU_QUIT:
|
||||||
AudBlankSound();
|
AudBlankSound();
|
||||||
if (nVidFullscreen) {
|
if (nVidFullscreen) {
|
||||||
|
@ -974,7 +980,9 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
||||||
}
|
}
|
||||||
if (bDrvOkay) {
|
if (bDrvOkay) {
|
||||||
StopReplay();
|
StopReplay();
|
||||||
|
#ifdef INCLUDE_AVI_RECORDING
|
||||||
AviStop();
|
AviStop();
|
||||||
|
#endif
|
||||||
DrvExit();
|
DrvExit();
|
||||||
if (kNetGame) {
|
if (kNetGame) {
|
||||||
kNetGame = 0;
|
kNetGame = 0;
|
||||||
|
@ -997,7 +1005,9 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
||||||
|
|
||||||
case MENU_EXIT:
|
case MENU_EXIT:
|
||||||
StopReplay();
|
StopReplay();
|
||||||
|
#ifdef INCLUDE_AVI_RECORDING
|
||||||
AviStop();
|
AviStop();
|
||||||
|
#endif
|
||||||
if (kNetGame) {
|
if (kNetGame) {
|
||||||
kNetGame = 0;
|
kNetGame = 0;
|
||||||
// kailleraEndGame();
|
// kailleraEndGame();
|
||||||
|
|
|
@ -274,7 +274,9 @@ INT32 VidExit()
|
||||||
if (pVidTransImage) {
|
if (pVidTransImage) {
|
||||||
free(pVidTransImage);
|
free(pVidTransImage);
|
||||||
pVidTransImage = NULL;
|
pVidTransImage = NULL;
|
||||||
|
#ifdef INCLUDE_AVI_RECORDING
|
||||||
pAviBuffer = NULL;
|
pAviBuffer = NULL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return nRet;
|
return nRet;
|
||||||
|
@ -303,7 +305,9 @@ static INT32 VidDoFrame(bool bRedraw)
|
||||||
bVidRecalcPalette = false;
|
bVidRecalcPalette = false;
|
||||||
}
|
}
|
||||||
pBurnDraw = pVidTransImage;
|
pBurnDraw = pVidTransImage;
|
||||||
|
#ifdef INCLUDE_AVI_RECORDING
|
||||||
pAviBuffer = pVidImage;
|
pAviBuffer = pVidImage;
|
||||||
|
#endif
|
||||||
nBurnPitch = nVidImageWidth * 2;
|
nBurnPitch = nVidImageWidth * 2;
|
||||||
|
|
||||||
nRet = pVidOut[nVidActive]->Frame(bRedraw);
|
nRet = pVidOut[nVidActive]->Frame(bRedraw);
|
||||||
|
@ -335,7 +339,9 @@ static INT32 VidDoFrame(bool bRedraw)
|
||||||
} else {
|
} else {
|
||||||
pBurnDraw = pVidImage;
|
pBurnDraw = pVidImage;
|
||||||
nBurnPitch = nVidImagePitch;
|
nBurnPitch = nVidImagePitch;
|
||||||
|
#ifdef INCLUDE_AVI_RECORDING
|
||||||
pAviBuffer = pBurnDraw;
|
pAviBuffer = pBurnDraw;
|
||||||
|
#endif
|
||||||
|
|
||||||
nRet = pVidOut[nVidActive]->Frame(bRedraw);
|
nRet = pVidOut[nVidActive]->Frame(bRedraw);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue