let windows terminals use Nix ConsoleListener, fix windows timestamp
This commit is contained in:
parent
8ada1d5320
commit
255d19d40f
|
@ -1,7 +1,8 @@
|
|||
// Copyright 2015 Dolphin Emulator Project
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
#ifdef __ANDROID__
|
||||
#if defined(__ANDROID__) && !defined(LOG_TO_PTY)
|
||||
|
||||
|
||||
#include <android/log.h>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright 2015 Dolphin Emulator Project
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
#if !defined(_WIN32) && !defined(__ANDROID__)
|
||||
#if (!defined(_WIN32) && !defined(__ANDROID__)) || defined(LOG_TO_PTY)
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
|
@ -14,7 +14,11 @@
|
|||
|
||||
ConsoleListener::ConsoleListener()
|
||||
{
|
||||
#ifdef LOG_TO_PTY
|
||||
m_use_color = 1;
|
||||
#else
|
||||
m_use_color = !!isatty(fileno(stderr));
|
||||
#endif
|
||||
}
|
||||
|
||||
ConsoleListener::~ConsoleListener()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright 2015 Dolphin Emulator Project
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) && !defined(LOG_TO_PTY)
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
|
|
|
@ -729,6 +729,10 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
|
|||
char* cmd_line = GetCommandLineA();
|
||||
char** argv = CommandLineToArgvA(cmd_line, &argc);
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && defined(LOG_TO_PTY)
|
||||
setbuf(stderr,NULL);
|
||||
#endif
|
||||
LogManager::Init();
|
||||
|
||||
|
@ -791,7 +795,8 @@ double os_GetSeconds()
|
|||
LARGE_INTEGER time_now;
|
||||
|
||||
QueryPerformanceCounter(&time_now);
|
||||
return time_now.QuadPart*qpfd;
|
||||
static LARGE_INTEGER time_now_base = time_now;
|
||||
return (time_now.QuadPart - time_now_base.QuadPart)*qpfd;
|
||||
}
|
||||
|
||||
void os_DebugBreak()
|
||||
|
|
|
@ -422,6 +422,11 @@ ifdef ASAN
|
|||
LDFLAGS += -fsanitize=address -static-libasan
|
||||
endif
|
||||
|
||||
ifdef LOG_TO_PTY
|
||||
CFLAGS += -D LOG_TO_PTY
|
||||
endif
|
||||
|
||||
|
||||
EXECUTABLE_STRIPPED=nosym-reicast.$(PLATFORM_EXT)
|
||||
DC_PLATFORM=dreamcast
|
||||
EXECUTABLE=reicast.$(PLATFORM_EXT)
|
||||
|
|
Loading…
Reference in New Issue