mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
msvc: enable /Zc:preprocessor and make build compile cleanly
This commit is contained in:
@ -32,39 +32,6 @@ bool MsgAlert(bool yes_no, MsgType style, const char* format, ...)
|
||||
void SetEnableAlert(bool enable);
|
||||
} // namespace Common
|
||||
|
||||
#if defined(_WIN32) && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL == 1)
|
||||
#define SuccessAlert(format, ...) \
|
||||
Common::MsgAlert(false, Common::MsgType::Information, format, __VA_ARGS__)
|
||||
|
||||
#define PanicAlert(format, ...) \
|
||||
Common::MsgAlert(false, Common::MsgType::Warning, format, __VA_ARGS__)
|
||||
|
||||
#define PanicYesNo(format, ...) \
|
||||
Common::MsgAlert(true, Common::MsgType::Warning, format, __VA_ARGS__)
|
||||
|
||||
#define AskYesNo(format, ...) Common::MsgAlert(true, Common::MsgType::Question, format, __VA_ARGS__)
|
||||
|
||||
#define CriticalAlert(format, ...) \
|
||||
Common::MsgAlert(false, Common::MsgType::Critical, format, __VA_ARGS__)
|
||||
|
||||
// Use these macros (that do the same thing) if the message should be translated.
|
||||
|
||||
#define SuccessAlertT(format, ...) \
|
||||
Common::MsgAlert(false, Common::MsgType::Information, format, __VA_ARGS__)
|
||||
|
||||
#define PanicAlertT(format, ...) \
|
||||
Common::MsgAlert(false, Common::MsgType::Warning, format, __VA_ARGS__)
|
||||
|
||||
#define PanicYesNoT(format, ...) \
|
||||
Common::MsgAlert(true, Common::MsgType::Warning, format, __VA_ARGS__)
|
||||
|
||||
#define AskYesNoT(format, ...) \
|
||||
Common::MsgAlert(true, Common::MsgType::Question, format, __VA_ARGS__)
|
||||
|
||||
#define CriticalAlertT(format, ...) \
|
||||
Common::MsgAlert(false, Common::MsgType::Critical, format, __VA_ARGS__)
|
||||
|
||||
#else
|
||||
#define SuccessAlert(format, ...) \
|
||||
Common::MsgAlert(false, Common::MsgType::Information, format, ##__VA_ARGS__)
|
||||
|
||||
@ -95,4 +62,3 @@ void SetEnableAlert(bool enable);
|
||||
|
||||
#define CriticalAlertT(format, ...) \
|
||||
Common::MsgAlert(false, Common::MsgType::Critical, format, ##__VA_ARGS__)
|
||||
#endif
|
||||
|
@ -15,12 +15,6 @@
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
|
||||
#define CHECK(cond, Message, ...) \
|
||||
if (!(cond)) \
|
||||
{ \
|
||||
PanicAlert("%s failed in %s at line %d: " Message, __func__, __FILE__, __LINE__, __VA_ARGS__); \
|
||||
}
|
||||
|
||||
namespace DX11
|
||||
{
|
||||
using Microsoft::WRL::ComPtr;
|
||||
|
@ -9,13 +9,6 @@
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "VideoBackends/D3DCommon/Common.h"
|
||||
|
||||
#define CHECK(cond, Message, ...) \
|
||||
if (!(cond)) \
|
||||
{ \
|
||||
PanicAlert(__FUNCTION__ " failed in %s at line %d: " Message, __FILE__, __LINE__, \
|
||||
__VA_ARGS__); \
|
||||
}
|
||||
|
||||
namespace DX12
|
||||
{
|
||||
using Microsoft::WRL::ComPtr;
|
||||
|
@ -12,6 +12,13 @@
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
#define CHECK(cond, Message, ...) \
|
||||
if (!(cond)) \
|
||||
{ \
|
||||
PanicAlert("%s failed in %s at line %d: " Message, __func__, __FILE__, __LINE__, \
|
||||
##__VA_ARGS__); \
|
||||
}
|
||||
|
||||
struct IDXGIFactory;
|
||||
|
||||
enum class AbstractTextureFormat : u32;
|
||||
|
@ -20,11 +20,7 @@ constexpr u32 MAX_XFB_WIDTH = 720;
|
||||
// that are next to each other in memory (TODO: handle that situation).
|
||||
constexpr u32 MAX_XFB_HEIGHT = 576;
|
||||
|
||||
#if defined(_WIN32) && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL == 1)
|
||||
#define PRIM_LOG(...) DEBUG_LOG(VIDEO, __VA_ARGS__)
|
||||
#else
|
||||
#define PRIM_LOG(...) DEBUG_LOG(VIDEO, ##__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
// warning: mapping buffer should be disabled to use this
|
||||
// #define LOG_VTX() DEBUG_LOG(VIDEO, "vtx: %f %f %f, ", ((float*)g_vertex_manager_write_ptr)[-3],
|
||||
|
Reference in New Issue
Block a user