mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 05:25:14 +00:00
Fix --help and improve console launch param
This commit is contained in:
parent
31a67658ec
commit
836a7cbdd7
2 changed files with 4 additions and 6 deletions
2
Makefile
2
Makefile
|
@ -856,7 +856,7 @@ ifeq ($(TARGET_N64),1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(WINDOWS_BUILD),1)
|
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),)
|
ifeq ($(CROSS),)
|
||||||
LDFLAGS += -no-pie
|
LDFLAGS += -no-pie
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -338,12 +338,10 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
// Handle Windows console
|
// Handle Windows console
|
||||||
if (gCLIOpts.Console && AllocConsole()) {
|
if (!gCLIOpts.Console) {
|
||||||
FILE* fDummy;
|
FreeConsole();
|
||||||
freopen_s(&fDummy, "CONOUT$", "w", stdout);
|
|
||||||
freopen_s(&fDummy, "CONOUT$", "w", stderr);
|
|
||||||
freopen_s(&fDummy, "CONIN$", "r", stdin);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Create the window straight away
|
// Create the window straight away
|
||||||
|
|
Loading…
Reference in a new issue