Add VS2013 workaround to every project, since they all use static CRT.

master
Richard Stanway 2014-04-25 11:28:44 +02:00
parent 8fe24f103a
commit 9977a22646
9 changed files with 70 additions and 4 deletions

View File

@ -2322,8 +2322,14 @@ CTSTR GetPluginDescription()
BOOL CALLBACK DllMain(HINSTANCE hInst, DWORD dwReason, LPVOID lpBla)
{
if(dwReason == DLL_PROCESS_ATTACH)
if (dwReason == DLL_PROCESS_ATTACH)
{
#if defined _M_X64 && _MSC_VER == 1800
//workaround AVX2 bug in VS2013, http://connect.microsoft.com/VisualStudio/feedback/details/811093
_set_FMA3_enable(0);
#endif
hinstMain = hInst;
}
return TRUE;
}

View File

@ -476,8 +476,14 @@ CTSTR GetPluginDescription()
BOOL CALLBACK DllMain(HINSTANCE hInst, DWORD dwReason, LPVOID lpBla)
{
if(dwReason == DLL_PROCESS_ATTACH)
if (dwReason == DLL_PROCESS_ATTACH)
{
#if defined _M_X64 && _MSC_VER == 1800
//workaround AVX2 bug in VS2013, http://connect.microsoft.com/VisualStudio/feedback/details/811093
_set_FMA3_enable(0);
#endif
hinstMain = hInst;
}
return TRUE;
}

View File

@ -503,6 +503,11 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpBlah)
HANDLE hThread = NULL;
hinstMain = hinstDLL;
#if defined _M_X64 && _MSC_VER == 1800
//workaround AVX2 bug in VS2013, http://connect.microsoft.com/VisualStudio/feedback/details/811093
_set_FMA3_enable(0);
#endif
GetModuleFileNameW(hinstDLL, name, 4096);
LoadLibrary(name);

View File

@ -625,7 +625,13 @@ CTSTR GetPluginDescription()
BOOL CALLBACK DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if(fdwReason == DLL_PROCESS_ATTACH)
if (fdwReason == DLL_PROCESS_ATTACH)
{
#if defined _M_X64 && _MSC_VER == 1800
//workaround AVX2 bug in VS2013, http://connect.microsoft.com/VisualStudio/feedback/details/811093
_set_FMA3_enable(0);
#endif
NoiseGate::hinstDLL = hinstDLL;
}
return TRUE;
}

View File

@ -425,3 +425,16 @@ void MixAudio(float *bufferDest, float *bufferSrc, UINT totalFloats, bool bForce
}
}
}
BOOL CALLBACK DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH)
{
#if defined _M_X64 && _MSC_VER == 1800
//workaround AVX2 bug in VS2013, http://connect.microsoft.com/VisualStudio/feedback/details/811093
_set_FMA3_enable(0);
#endif
}
return TRUE;
}

View File

@ -87,3 +87,16 @@ bool stringToGuid(const String &string, GUID *guid)
{
return CLSIDFromString(string.Array(), guid) == NOERROR;
}
BOOL CALLBACK DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH)
{
#if defined _M_X64 && _MSC_VER == 1800
//workaround AVX2 bug in VS2013, http://connect.microsoft.com/VisualStudio/feedback/details/811093
_set_FMA3_enable(0);
#endif
}
return TRUE;
}

View File

@ -244,8 +244,14 @@ CTSTR GetPluginDescription()
BOOL CALLBACK DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if(fdwReason == DLL_PROCESS_ATTACH)
if (fdwReason == DLL_PROCESS_ATTACH)
{
#if defined _M_X64 && _MSC_VER == 1800
//workaround AVX2 bug in VS2013, http://connect.microsoft.com/VisualStudio/feedback/details/811093
_set_FMA3_enable(0);
#endif
hInstance = hinstDLL;
}
return TRUE;
}

View File

@ -79,6 +79,11 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pCmdLine,
{
using namespace std;
#if defined _M_X64 && _MSC_VER == 1800
//workaround AVX2 bug in VS2013, http://connect.microsoft.com/VisualStudio/feedback/details/811093
_set_FMA3_enable(0);
#endif
wstringstream cmdss(GetCommandLineW());
wstring wstr;
cmdss >> wstr;

View File

@ -21,6 +21,7 @@
#include <windows.h>
#include <shellapi.h>
#include <stdbool.h>
#include <math.h>
#ifdef _WIN64
typedef unsigned __int64 UPARAM;
@ -228,6 +229,11 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pCmdLine,
const wchar_t pDLLName[] = L"GraphicsCaptureHook.dll";
#endif
#if defined _M_X64 && _MSC_VER == 1800
//workaround AVX2 bug in VS2013, http://connect.microsoft.com/VisualStudio/feedback/details/811093
_set_FMA3_enable(0);
#endif
/* -------------------------- */
LPWSTR *pCommandLineArgs = CommandLineToArgvW(pCommandLineW, &numArgs);