This prevents issues with using standard C functions, where microsoft would otherwise spit out pointless warnings to encourage using microsoft-specific functions instead.
@@ -60,7 +60,7 @@ elseif(MSVC)
endif()
if(WIN32)
- add_definitions(-DUNICODE -D_UNICODE)
+ add_definitions(-DUNICODE -D_UNICODE -D_CRT_SECURE_NO_WARNINGS)
if(MSVC)
@@ -1,4 +1,3 @@
-#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <windows.h>
#include "../d3d8-api/d3d8.h"
#include <d3d9.h>
#include <d3d10.h>
#include <dxgi.h>
#include <inttypes.h>
#include <d3d11.h>
#include "graphics-hook.h"
#include <d3d10_1.h>
@@ -1,5 +1,3 @@
-
#ifdef _MSC_VER
#pragma warning(disable : 4214) /* nonstandard extension, non-int bitfield */
#pragma warning(disable : 4054) /* function pointer to data pointer */
#include <psapi.h>
#include <stdlib.h>
#include <wchar.h>
#include <obs-module.h>
#include <util/windows/win-version.h>
#include <util/platform.h>
#pragma warning(disable : 4152) /* casting func ptr to void */
#endif