mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-11 16:04:57 +00:00
Fix MSVC-related #defines and add CMakeLists comment
This commit is contained in:
parent
8ba9ac0f74
commit
5d10b212ec
6 changed files with 11 additions and 11 deletions
|
@ -24,7 +24,7 @@ if (APPLE)
|
||||||
target_link_libraries(citra iconv ${COREFOUNDATION_LIBRARY})
|
target_link_libraries(citra iconv ${COREFOUNDATION_LIBRARY})
|
||||||
elseif (WIN32)
|
elseif (WIN32)
|
||||||
target_link_libraries(citra winmm)
|
target_link_libraries(citra winmm)
|
||||||
if (MINGW)
|
if (MINGW) # GCC does not support codecvt, so use iconv instead
|
||||||
target_link_libraries(citra iconv)
|
target_link_libraries(citra iconv)
|
||||||
endif()
|
endif()
|
||||||
else() # Unix
|
else() # Unix
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "common/msg_handler.h"
|
#include "common/msg_handler.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
|
|
||||||
#ifdef MSVC_VER
|
#ifdef _MSC_VER
|
||||||
#ifndef __func__
|
#ifndef __func__
|
||||||
#define __func__ __FUNCTION__
|
#define __func__ __FUNCTION__
|
||||||
#endif
|
#endif
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
#define _assert_(_a_) _dbg_assert_(MASTER_LOG, _a_)
|
#define _assert_(_a_) _dbg_assert_(MASTER_LOG, _a_)
|
||||||
|
|
||||||
#ifndef GEKKO
|
#ifndef GEKKO
|
||||||
#ifdef _WIN32
|
#ifdef _MSC_VER
|
||||||
#define _assert_msg_(_t_, _a_, _fmt_, ...) \
|
#define _assert_msg_(_t_, _a_, _fmt_, ...) \
|
||||||
if (!(_a_)) {\
|
if (!(_a_)) {\
|
||||||
if (!PanicYesNo(_fmt_, __VA_ARGS__)) {Crash();} \
|
if (!PanicYesNo(_fmt_, __VA_ARGS__)) {Crash();} \
|
||||||
|
|
|
@ -30,7 +30,7 @@ extern bool MsgAlert(bool yes_no, int Style, const char* format, ...)
|
||||||
void SetEnableAlert(bool enable);
|
void SetEnableAlert(bool enable);
|
||||||
|
|
||||||
#ifndef GEKKO
|
#ifndef GEKKO
|
||||||
#ifdef MSVC_VER
|
#ifdef _MSC_VER
|
||||||
#define SuccessAlert(format, ...) MsgAlert(false, INFORMATION, format, __VA_ARGS__)
|
#define SuccessAlert(format, ...) MsgAlert(false, INFORMATION, format, __VA_ARGS__)
|
||||||
#define PanicAlert(format, ...) MsgAlert(false, WARNING, format, __VA_ARGS__)
|
#define PanicAlert(format, ...) MsgAlert(false, WARNING, format, __VA_ARGS__)
|
||||||
#define PanicYesNo(format, ...) MsgAlert(true, WARNING, format, __VA_ARGS__)
|
#define PanicYesNo(format, ...) MsgAlert(true, WARNING, format, __VA_ARGS__)
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
#endif
|
#endif
|
||||||
#define EMU_FASTCALL __fastcall
|
#define EMU_FASTCALL __fastcall
|
||||||
|
|
||||||
#ifdef _MSVC_VER
|
#ifdef _MSC_VER
|
||||||
inline struct tm* localtime_r(const time_t *clock, struct tm *result) {
|
inline struct tm* localtime_r(const time_t *clock, struct tm *result) {
|
||||||
if (localtime_s(result, clock) == 0)
|
if (localtime_s(result, clock) == 0)
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include "common/common.h"
|
#include "common/common.h"
|
||||||
#include "common/string_util.h"
|
#include "common/string_util.h"
|
||||||
|
|
||||||
#ifdef MSVC_VER
|
#ifdef _MSC_VER
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#include <codecvt>
|
#include <codecvt>
|
||||||
#else
|
#else
|
||||||
|
@ -45,7 +45,7 @@ bool CharArrayFromFormatV(char* out, int outsize, const char* format, va_list ar
|
||||||
{
|
{
|
||||||
int writtenCount;
|
int writtenCount;
|
||||||
|
|
||||||
#ifdef MSVC_VER
|
#ifdef _MSC_VER
|
||||||
// You would think *printf are simple, right? Iterate on each character,
|
// You would think *printf are simple, right? Iterate on each character,
|
||||||
// if it's a format specifier handle it properly, etc.
|
// if it's a format specifier handle it properly, etc.
|
||||||
//
|
//
|
||||||
|
@ -410,7 +410,7 @@ std::string UriEncode(const std::string & sSrc)
|
||||||
return sResult;
|
return sResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MSVC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
||||||
std::string UTF16ToUTF8(const std::u16string& input)
|
std::string UTF16ToUTF8(const std::u16string& input)
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace Common
|
||||||
|
|
||||||
int CurrentThreadId()
|
int CurrentThreadId()
|
||||||
{
|
{
|
||||||
#ifdef MSVC_VER
|
#ifdef _MSC_VER
|
||||||
return GetCurrentThreadId();
|
return GetCurrentThreadId();
|
||||||
#elif defined __APPLE__
|
#elif defined __APPLE__
|
||||||
return mach_thread_self();
|
return mach_thread_self();
|
||||||
|
@ -34,7 +34,7 @@ void SleepCurrentThread(int ms)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MSVC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
||||||
void SetThreadAffinity(std::thread::native_handle_type thread, u32 mask)
|
void SetThreadAffinity(std::thread::native_handle_type thread, u32 mask)
|
||||||
{
|
{
|
||||||
|
@ -121,7 +121,7 @@ void SwitchCurrentThread()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// MinGW with the POSIX threading model does not support pthread_setname_np
|
// MinGW with the POSIX threading model does not support pthread_setname_np
|
||||||
#if !defined(_WIN32) || defined(MSVC_VER)
|
#if !defined(_WIN32) || defined(_MSC_VER)
|
||||||
void SetCurrentThreadName(const char* szThreadName)
|
void SetCurrentThreadName(const char* szThreadName)
|
||||||
{
|
{
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
|
Loading…
Reference in a new issue