Fix --help and improve console launch param
This commit is contained in:
parent
31a67658ec
commit
836a7cbdd7
2
Makefile
2
Makefile
|
@ -856,7 +856,7 @@ ifeq ($(TARGET_N64),1)
|
|||
endif
|
||||
|
||||
ifeq ($(WINDOWS_BUILD),1)
|
||||
LDFLAGS := $(BITS) -march=$(TARGET_ARCH) -Llib -lpthread $(BACKEND_LDFLAGS) -static
|
||||
LDFLAGS := $(BITS) -march=$(TARGET_ARCH) -Llib -lpthread $(BACKEND_LDFLAGS) -static -mconsole
|
||||
ifeq ($(CROSS),)
|
||||
LDFLAGS += -no-pie
|
||||
endif
|
||||
|
|
|
@ -338,12 +338,10 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
// Handle Windows console
|
||||
if (gCLIOpts.Console && AllocConsole()) {
|
||||
FILE* fDummy;
|
||||
freopen_s(&fDummy, "CONOUT$", "w", stdout);
|
||||
freopen_s(&fDummy, "CONOUT$", "w", stderr);
|
||||
freopen_s(&fDummy, "CONIN$", "r", stdin);
|
||||
if (!gCLIOpts.Console) {
|
||||
FreeConsole();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// Create the window straight away
|
||||
|
|
Loading…
Reference in New Issue