diff options
| author | 2014-12-29 19:59:14 -0800 | |
|---|---|---|
| committer | 2014-12-29 20:12:03 -0800 | |
| commit | 5d10b212ecebb15fb1463edc08c725d8e29fa44a (patch) | |
| tree | 206a1417e59815789eca81249734b0eb5497d5e3 /src | |
| parent | Fix merge conflicts (diff) | |
| download | yuzu-5d10b212ecebb15fb1463edc08c725d8e29fa44a.tar.gz yuzu-5d10b212ecebb15fb1463edc08c725d8e29fa44a.tar.xz yuzu-5d10b212ecebb15fb1463edc08c725d8e29fa44a.zip | |
Fix MSVC-related #defines and add CMakeLists comment
Diffstat (limited to 'src')
| -rw-r--r-- | src/citra/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/common/log.h | 4 | ||||
| -rw-r--r-- | src/common/msg_handler.h | 2 | ||||
| -rw-r--r-- | src/common/platform.h | 2 | ||||
| -rw-r--r-- | src/common/string_util.cpp | 6 | ||||
| -rw-r--r-- | src/common/thread.cpp | 6 |
6 files changed, 11 insertions, 11 deletions
diff --git a/src/citra/CMakeLists.txt b/src/citra/CMakeLists.txt index 0e03212d7..dc5e04bfc 100644 --- a/src/citra/CMakeLists.txt +++ b/src/citra/CMakeLists.txt | |||
| @@ -24,7 +24,7 @@ if (APPLE) | |||
| 24 | target_link_libraries(citra iconv ${COREFOUNDATION_LIBRARY}) | 24 | target_link_libraries(citra iconv ${COREFOUNDATION_LIBRARY}) |
| 25 | elseif (WIN32) | 25 | elseif (WIN32) |
| 26 | target_link_libraries(citra winmm) | 26 | target_link_libraries(citra winmm) |
| 27 | if (MINGW) | 27 | if (MINGW) # GCC does not support codecvt, so use iconv instead |
| 28 | target_link_libraries(citra iconv) | 28 | target_link_libraries(citra iconv) |
| 29 | endif() | 29 | endif() |
| 30 | else() # Unix | 30 | else() # Unix |
diff --git a/src/common/log.h b/src/common/log.h index c6a023552..667f2fbb9 100644 --- a/src/common/log.h +++ b/src/common/log.h | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | #include "common/msg_handler.h" | 8 | #include "common/msg_handler.h" |
| 9 | #include "common/logging/log.h" | 9 | #include "common/logging/log.h" |
| 10 | 10 | ||
| 11 | #ifdef MSVC_VER | 11 | #ifdef _MSC_VER |
| 12 | #ifndef __func__ | 12 | #ifndef __func__ |
| 13 | #define __func__ __FUNCTION__ | 13 | #define __func__ __FUNCTION__ |
| 14 | #endif | 14 | #endif |
| @@ -40,7 +40,7 @@ | |||
| 40 | #define _assert_(_a_) _dbg_assert_(MASTER_LOG, _a_) | 40 | #define _assert_(_a_) _dbg_assert_(MASTER_LOG, _a_) |
| 41 | 41 | ||
| 42 | #ifndef GEKKO | 42 | #ifndef GEKKO |
| 43 | #ifdef _WIN32 | 43 | #ifdef _MSC_VER |
| 44 | #define _assert_msg_(_t_, _a_, _fmt_, ...) \ | 44 | #define _assert_msg_(_t_, _a_, _fmt_, ...) \ |
| 45 | if (!(_a_)) {\ | 45 | if (!(_a_)) {\ |
| 46 | if (!PanicYesNo(_fmt_, __VA_ARGS__)) {Crash();} \ | 46 | if (!PanicYesNo(_fmt_, __VA_ARGS__)) {Crash();} \ |
diff --git a/src/common/msg_handler.h b/src/common/msg_handler.h index b4f380782..5a483ddb4 100644 --- a/src/common/msg_handler.h +++ b/src/common/msg_handler.h | |||
| @@ -30,7 +30,7 @@ extern bool MsgAlert(bool yes_no, int Style, const char* format, ...) | |||
| 30 | void SetEnableAlert(bool enable); | 30 | void SetEnableAlert(bool enable); |
| 31 | 31 | ||
| 32 | #ifndef GEKKO | 32 | #ifndef GEKKO |
| 33 | #ifdef MSVC_VER | 33 | #ifdef _MSC_VER |
| 34 | #define SuccessAlert(format, ...) MsgAlert(false, INFORMATION, format, __VA_ARGS__) | 34 | #define SuccessAlert(format, ...) MsgAlert(false, INFORMATION, format, __VA_ARGS__) |
| 35 | #define PanicAlert(format, ...) MsgAlert(false, WARNING, format, __VA_ARGS__) | 35 | #define PanicAlert(format, ...) MsgAlert(false, WARNING, format, __VA_ARGS__) |
| 36 | #define PanicYesNo(format, ...) MsgAlert(true, WARNING, format, __VA_ARGS__) | 36 | #define PanicYesNo(format, ...) MsgAlert(true, WARNING, format, __VA_ARGS__) |
diff --git a/src/common/platform.h b/src/common/platform.h index ce5550520..ce9cfd4a2 100644 --- a/src/common/platform.h +++ b/src/common/platform.h | |||
| @@ -76,7 +76,7 @@ | |||
| 76 | #endif | 76 | #endif |
| 77 | #define EMU_FASTCALL __fastcall | 77 | #define EMU_FASTCALL __fastcall |
| 78 | 78 | ||
| 79 | #ifdef _MSVC_VER | 79 | #ifdef _MSC_VER |
| 80 | inline struct tm* localtime_r(const time_t *clock, struct tm *result) { | 80 | inline struct tm* localtime_r(const time_t *clock, struct tm *result) { |
| 81 | if (localtime_s(result, clock) == 0) | 81 | if (localtime_s(result, clock) == 0) |
| 82 | return result; | 82 | return result; |
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp index 0dd2d2349..b3b772bd9 100644 --- a/src/common/string_util.cpp +++ b/src/common/string_util.cpp | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | #include "common/common.h" | 7 | #include "common/common.h" |
| 8 | #include "common/string_util.h" | 8 | #include "common/string_util.h" |
| 9 | 9 | ||
| 10 | #ifdef MSVC_VER | 10 | #ifdef _MSC_VER |
| 11 | #include <Windows.h> | 11 | #include <Windows.h> |
| 12 | #include <codecvt> | 12 | #include <codecvt> |
| 13 | #else | 13 | #else |
| @@ -45,7 +45,7 @@ bool CharArrayFromFormatV(char* out, int outsize, const char* format, va_list ar | |||
| 45 | { | 45 | { |
| 46 | int writtenCount; | 46 | int writtenCount; |
| 47 | 47 | ||
| 48 | #ifdef MSVC_VER | 48 | #ifdef _MSC_VER |
| 49 | // You would think *printf are simple, right? Iterate on each character, | 49 | // You would think *printf are simple, right? Iterate on each character, |
| 50 | // if it's a format specifier handle it properly, etc. | 50 | // if it's a format specifier handle it properly, etc. |
| 51 | // | 51 | // |
| @@ -410,7 +410,7 @@ std::string UriEncode(const std::string & sSrc) | |||
| 410 | return sResult; | 410 | return sResult; |
| 411 | } | 411 | } |
| 412 | 412 | ||
| 413 | #ifdef MSVC_VER | 413 | #ifdef _MSC_VER |
| 414 | 414 | ||
| 415 | std::string UTF16ToUTF8(const std::u16string& input) | 415 | std::string UTF16ToUTF8(const std::u16string& input) |
| 416 | { | 416 | { |
diff --git a/src/common/thread.cpp b/src/common/thread.cpp index 04e33101b..8bf005857 100644 --- a/src/common/thread.cpp +++ b/src/common/thread.cpp | |||
| @@ -17,7 +17,7 @@ namespace Common | |||
| 17 | 17 | ||
| 18 | int CurrentThreadId() | 18 | int CurrentThreadId() |
| 19 | { | 19 | { |
| 20 | #ifdef MSVC_VER | 20 | #ifdef _MSC_VER |
| 21 | return GetCurrentThreadId(); | 21 | return GetCurrentThreadId(); |
| 22 | #elif defined __APPLE__ | 22 | #elif defined __APPLE__ |
| 23 | return mach_thread_self(); | 23 | return mach_thread_self(); |
| @@ -34,7 +34,7 @@ void SleepCurrentThread(int ms) | |||
| 34 | } | 34 | } |
| 35 | #endif | 35 | #endif |
| 36 | 36 | ||
| 37 | #ifdef MSVC_VER | 37 | #ifdef _MSC_VER |
| 38 | 38 | ||
| 39 | void SetThreadAffinity(std::thread::native_handle_type thread, u32 mask) | 39 | void SetThreadAffinity(std::thread::native_handle_type thread, u32 mask) |
| 40 | { | 40 | { |
| @@ -121,7 +121,7 @@ void SwitchCurrentThread() | |||
| 121 | #endif | 121 | #endif |
| 122 | 122 | ||
| 123 | // MinGW with the POSIX threading model does not support pthread_setname_np | 123 | // MinGW with the POSIX threading model does not support pthread_setname_np |
| 124 | #if !defined(_WIN32) || defined(MSVC_VER) | 124 | #if !defined(_WIN32) || defined(_MSC_VER) |
| 125 | void SetCurrentThreadName(const char* szThreadName) | 125 | void SetCurrentThreadName(const char* szThreadName) |
| 126 | { | 126 | { |
| 127 | #ifdef __APPLE__ | 127 | #ifdef __APPLE__ |