Synchronize Linux build. (PR #1037)

. remove OutputDebugStringA()
. push changes to StdAfx.h
. mention g_strSaveStatePathname in the error message for loading save-state
This commit is contained in:
Andrea 2022-02-14 20:37:18 +00:00 committed by GitHub
parent 9a3832084a
commit 48dd638d33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 32 additions and 10 deletions

View File

@ -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

View File

@ -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

View File

@ -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);
}

View File

@ -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;

View File

@ -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");

View File

@ -1,3 +1,5 @@
#ifdef _MSC_VER
#include <tchar.h>
#include <crtdbg.h>
@ -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 <cmath>
#include <map>
#include <stack>
#include <stdexcept>
#include <cstdarg>
#include <cstring>
#include <algorithm>
#include <string>
#include <vector>
#include "windows.h"
//#define USE_SPEECH_API
#define SIZE_T_FMT "zu"
#define PTRDIFF_T_FMT "td"
#endif

View File

@ -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

View File

@ -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();