Removed the crashdump code from the Dev branch and added the -R/--crashdump parameter to activate it, and also made the makefiles not build pcap_if.exe by default.

This commit is contained in:
OBattler
2020-04-17 02:20:02 +02:00
parent 4bc41197b9
commit 13a9477b6d
6 changed files with 14 additions and 33 deletions

View File

@@ -120,6 +120,7 @@ extern int hdd_format_type; /* (C) hard disk file format */
#ifdef USE_DISCORD
extern int enable_discord; /* (C) enable Discord integration */
#endif
extern int enable_crashdump; /* (C) enable crash dump */
extern int is_pentium; /* TODO: Move back to cpu/cpu.h when it's figured out,
how to remove that hack from the ET4000/W32p. */

View File

@@ -90,9 +90,7 @@ extern WCHAR wopenfilestring[512];
extern uint8_t filterindex;
#ifdef USE_CRASHDUMP
extern void InitCrashDump(void);
#endif
extern HICON LoadIconEx(PCTSTR pszIconName);

View File

@@ -131,6 +131,7 @@ int time_sync = 0; /* (C) enable time sync */
#ifdef USE_DISCORD
int enable_discord = 0; /* (C) enable Discord integration */
#endif
int enable_crashdump = 0; /* (C) enable crash dump */
/* Statistics. */
extern int
@@ -354,6 +355,7 @@ usage:
#ifdef _WIN32
printf("-H or --hwnd id,hwnd - sends back the main dialog's hwnd\n");
#endif
printf("-R or --crashdump - enables crashdump on exception\n");
printf("\nA config file can be specified. If none is, the default file will be used.\n");
return(0);
} else if (!wcscasecmp(argv[c], L"--dumpcfg") ||
@@ -383,6 +385,9 @@ usage:
} else if (!wcscasecmp(argv[c], L"--noconfirm") ||
!wcscasecmp(argv[c], L"-N")) {
no_quit_confirm = 1;
} else if (!wcscasecmp(argv[c], L"--crashdump") ||
!wcscasecmp(argv[c], L"-R")) {
enable_crashdump = 1;
#ifdef _WIN32
} else if (!wcscasecmp(argv[c], L"--hwnd") ||
!wcscasecmp(argv[c], L"-H")) {

View File

@@ -44,9 +44,6 @@ ifeq ($(DEV_BUILD), y)
ifndef CL5422
CL5422 := y
endif
ifndef CRASHDUMP
CRASHDUMP := y
endif
ifndef LASERXT
LASERXT := y
endif
@@ -105,9 +102,6 @@ else
ifndef CL5422
CL5422 := n
endif
ifndef CRASHDUMP
CRASHDUMP := n
endif
ifndef LASERXT
LASERXT := n
endif
@@ -421,11 +415,6 @@ ifeq ($(CL5422), y)
OPTS += -DUSE_CL5422
endif
ifeq ($(CRASHDUMPOBJ), y)
OPTS += -DUSE_CRASHDUMP
DEVBROBJ += win_crashdump.o
endif
ifeq ($(LASERXT), y)
OPTS += -DUSE_LASERXT
DEVBROBJ += m_xt_laserxt.o
@@ -674,7 +663,7 @@ VIDOBJ := video.o \
PLATOBJ := win.o \
win_dynld.o win_thread.o \
win_cdrom.o win_keyboard.o \
win_midi.o \
win_crashdump.o win_midi.o \
win_mouse.o
ifeq ($(DINPUT), y)
@@ -704,7 +693,7 @@ endif
ifneq ($(WX), n)
LIBS += $(WX_LIBS) -lm
endif
LIBS += -lpng -lz -lwsock32 -lshell32 -liphlpapi -lSDL2 -limm32 -lhid -lsetupapi -loleaut32 -lversion -lwinmm -static -lstdc++
LIBS += -lpng -lz -lwsock32 -lshell32 -liphlpapi -lpsapi -lSDL2 -limm32 -lhid -lsetupapi -loleaut32 -lversion -lwinmm -static -lstdc++
ifneq ($(X64), y)
LIBS += -Wl,--large-address-aware
endif
@@ -754,7 +743,7 @@ else
endif
all: $(PROG).exe pcap_if.exe
all: $(PROG).exe
86Box.res: 86Box.rc

View File

@@ -44,9 +44,6 @@ ifeq ($(DEV_BUILD), y)
ifndef CL5422
CL5422 := y
endif
ifndef CRASHDUMP
CRASHDUMP := y
endif
ifndef LASERXT
LASERXT := y
endif
@@ -105,9 +102,6 @@ else
ifndef CL5422
CL5422 := n
endif
ifndef CRASHDUMP
CRASHDUMP := n
endif
ifndef LASERXT
LASERXT := n
endif
@@ -430,11 +424,6 @@ ifeq ($(CL5422), y)
OPTS += -DUSE_CL5422
endif
ifeq ($(CRASHDUMPOBJ), y)
OPTS += -DUSE_CRASHDUMP
DEVBROBJ += win_crashdump.o
endif
ifeq ($(LASERXT), y)
OPTS += -DUSE_LASERXT
DEVBROBJ += m_xt_laserxt.o
@@ -678,7 +667,7 @@ VIDOBJ := video.o \
PLATOBJ := win.o \
win_dynld.o win_thread.o \
win_cdrom.o win_keyboard.o \
win_midi.o \
win_crashdump.o win_midi.o \
win_mouse.o
ifeq ($(DINPUT), y)
@@ -705,7 +694,7 @@ endif
ifneq ($(WX), n)
LIBS += $(WX_LIBS) -lm
endif
LIBS += -lpng -lz -lwsock32 -lshell32 -liphlpapi -lSDL2 -limm32 -lhid -lsetupapi -loleaut32 -lversion -lwinmm -static -lstdc++
LIBS += -lpng -lz -lwsock32 -lshell32 -liphlpapi -lpsapi -lSDL2 -limm32 -lhid -lsetupapi -loleaut32 -lversion -lwinmm -static -lstdc++
ifneq ($(X64), y)
LIBS += -Wl,--large-address-aware
endif
@@ -755,7 +744,7 @@ else
endif
all: $(PROG).exe pcap_if.exe
all: $(PROG).exe
86Box.res: 86Box.rc

View File

@@ -354,10 +354,9 @@ WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpszArg, int nCmdShow)
/* Set the application version ID string. */
sprintf(emu_version, "%s v%s", EMU_NAME, EMU_VERSION);
#ifdef USE_CRASHDUMP
/* Enable crash dump services. */
InitCrashDump();
#endif
if (enable_crashdump)
InitCrashDump();
/* First, set our (default) language. */
set_language(0x0409);