diff --git a/source/Debugger/Debug.cpp b/source/Debugger/Debug.cpp index ac69d763..b9c96310 100644 --- a/source/Debugger/Debug.cpp +++ b/source/Debugger/Debug.cpp @@ -4753,7 +4753,7 @@ Update_t CmdNTSC (int nArgs) #if _DEBUG LogOutput( "Filename.length.1: %d\n", len1 ); LogOutput( "Filename.length.2: %d\n", len2 ); - OutputDebugStringA( sPaletteFilePath.c_str() ); + OutputDebugString( sPaletteFilePath.c_str() ); #endif // File path is too long // TODO: Need to split very long path names diff --git a/source/Debugger/Debugger_Color.cpp b/source/Debugger/Debugger_Color.cpp index 42715be4..7c5d6440 100644 --- a/source/Debugger/Debugger_Color.cpp +++ b/source/Debugger/Debugger_Color.cpp @@ -210,7 +210,7 @@ static void _SetupColorRamp(const int iPrimary, int & iColor_) #if DEBUG_COLOR_RAMP int len = snprintf_s(sText, _TRUNCATE, " // %d%d%d\n", bB, bG, bR); strRamp.append(sText, len); - OutputDebugStringA(strRamp.c_str()); + OutputDebugString(strRamp.c_str()); #endif } #endif // _DEBUG diff --git a/source/Log.cpp b/source/Log.cpp index cd94f2c8..28ff3407 100644 --- a/source/Log.cpp +++ b/source/Log.cpp @@ -93,7 +93,7 @@ void LogOutput(const char* format, ...) va_list args; va_start(args, format); - OutputDebugStringA(StrFormat(format, args).c_str()); + OutputDebugString(StrFormat(format, args).c_str()); va_end(args); } diff --git a/source/Memory.cpp b/source/Memory.cpp index a2ec8a47..f76e1d15 100644 --- a/source/Memory.cpp +++ b/source/Memory.cpp @@ -1095,7 +1095,7 @@ void SetMemMode(DWORD uNewMemMode) psz += sprintf(psz, "CX=%d " , SW_INTCXROM ? 1 : 0); psz += sprintf(psz, "WRAM=%d " , SW_WRITERAM ? 1 : 0); psz += sprintf(psz, "\n"); - OutputDebugStringA(szStr); + OutputDebugString(szStr); } #endif memmode = uNewMemMode; diff --git a/source/SaveState.cpp b/source/SaveState.cpp index 7d99fa63..d3a49457 100644 --- a/source/SaveState.cpp +++ b/source/SaveState.cpp @@ -376,7 +376,7 @@ static void Snapshot_LoadState_v2(void) try { if (!yamlHelper.InitParser( g_strSaveStatePathname.c_str() )) - throw std::runtime_error("Failed to initialize parser or open file"); + throw std::runtime_error("Failed to initialize parser or open file: " + g_strSaveStatePathname); if (ParseFileHdr() != SS_FILE_VER) throw std::runtime_error("Version mismatch"); diff --git a/source/StdAfx.h b/source/StdAfx.h index 7d4db036..50fa17e3 100644 --- a/source/StdAfx.h +++ b/source/StdAfx.h @@ -1,3 +1,5 @@ +#ifdef _MSC_VER + #include #include @@ -45,8 +47,7 @@ typedef UINT64 uint64_t; #define USE_SPEECH_API -#if (defined(_MSC_VER) && (_MSC_VER < 1900)) || \ - (!defined(_MSC_VER) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L)) +#if _MSC_VER < 1900 #ifdef _WIN64 #define SIZE_T_FMT "llu" #define PTRDIFF_T_FMT "lld" @@ -58,3 +59,24 @@ typedef UINT64 uint64_t; #define SIZE_T_FMT "zu" #define PTRDIFF_T_FMT "td" #endif + +#else + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "windows.h" + +//#define USE_SPEECH_API + +#define SIZE_T_FMT "zu" +#define PTRDIFF_T_FMT "td" + +#endif diff --git a/source/Tfe/tfearch.cpp b/source/Tfe/tfearch.cpp index 8120b025..8b926561 100644 --- a/source/Tfe/tfearch.cpp +++ b/source/Tfe/tfearch.cpp @@ -202,7 +202,7 @@ void debug_output( const char *text, BYTE *what, int count ) p += 3; } *(p-1) = '\n'; *p = 0; - OutputDebugStringA(buffer); + OutputDebugString(buffer); } while (len1>0); } #endif // #ifdef TFE_DEBUG_PKTDUMP diff --git a/source/Windows/WinFrame.cpp b/source/Windows/WinFrame.cpp index f51af7e4..f90f5af6 100644 --- a/source/Windows/WinFrame.cpp +++ b/source/Windows/WinFrame.cpp @@ -1646,9 +1646,9 @@ LRESULT Win32Frame::WndProc( case WM_SYSCOLORCHANGE: #if DEBUG_DD_PALETTE if( g_bIsFullScreen ) - OutputDebugStringA( "WM_SYSCOLORCHANGE: Full Screen\n" ); + OutputDebugString( "WM_SYSCOLORCHANGE: Full Screen\n" ); else - OutputDebugStringA( "WM_SYSCOLORCHANGE: Windowed\n" ); + OutputDebugString( "WM_SYSCOLORCHANGE: Windowed\n" ); #endif DeleteGdiObjects();