From 45d941d62e2accea92f5b5183afe760e69a618ac Mon Sep 17 00:00:00 2001 From: Jannik Vogel Date: Sat, 3 Dec 2016 21:08:02 +0100 Subject: Support mingw cross-compile --- src/citra/citra.cpp | 2 +- src/citra/citra.rc | 2 +- src/citra_qt/citra-qt.rc | 2 +- src/common/bit_set.h | 2 +- src/common/logging/text_formatter.cpp | 2 +- src/common/string_util.cpp | 2 +- src/common/thread.cpp | 2 +- src/common/timer.cpp | 3 ++- src/core/gdbstub/gdbstub.cpp | 3 ++- 9 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/citra/citra.cpp b/src/citra/citra.cpp index f9387e61c..3114a71db 100644 --- a/src/citra/citra.cpp +++ b/src/citra/citra.cpp @@ -18,7 +18,7 @@ #endif #ifdef _WIN32 -#include +#include #endif #include "citra/config.h" diff --git a/src/citra/citra.rc b/src/citra/citra.rc index b0edb2e6b..86ad2c643 100644 --- a/src/citra/citra.rc +++ b/src/citra/citra.rc @@ -5,5 +5,5 @@ // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -GLFW_ICON ICON "..\\..\\dist\\citra.ico" +GLFW_ICON ICON "../../dist/citra.ico" diff --git a/src/citra_qt/citra-qt.rc b/src/citra_qt/citra-qt.rc index 3c7239853..6a61ff811 100644 --- a/src/citra_qt/citra-qt.rc +++ b/src/citra_qt/citra-qt.rc @@ -5,5 +5,5 @@ // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -IDI_ICON1 ICON "..\\..\\dist\\citra.ico" +IDI_ICON1 ICON "../../dist/citra.ico" diff --git a/src/common/bit_set.h b/src/common/bit_set.h index c48b3b769..3059d0cb0 100644 --- a/src/common/bit_set.h +++ b/src/common/bit_set.h @@ -16,7 +16,7 @@ namespace Common { // Helper functions: -#ifdef _WIN32 +#ifdef _MSC_VER template static inline int CountSetBits(T v) { // from https://graphics.stanford.edu/~seander/bithacks.html diff --git a/src/common/logging/text_formatter.cpp b/src/common/logging/text_formatter.cpp index d61c1696b..9d423766f 100644 --- a/src/common/logging/text_formatter.cpp +++ b/src/common/logging/text_formatter.cpp @@ -7,7 +7,7 @@ #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN -#include +#include #endif #include "common/assert.h" diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp index df1008180..bad311793 100644 --- a/src/common/string_util.cpp +++ b/src/common/string_util.cpp @@ -14,7 +14,7 @@ #ifdef _WIN32 #include -#include +#include #include "common/common_funcs.h" #else #include diff --git a/src/common/thread.cpp b/src/common/thread.cpp index 9bb2f4e1d..9e207118f 100644 --- a/src/common/thread.cpp +++ b/src/common/thread.cpp @@ -6,7 +6,7 @@ #ifdef __APPLE__ #include #elif defined(_WIN32) -#include +#include #else #if defined(__Bitrig__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__OpenBSD__) #include diff --git a/src/common/timer.cpp b/src/common/timer.cpp index e843cbd9c..c9803109e 100644 --- a/src/common/timer.cpp +++ b/src/common/timer.cpp @@ -4,7 +4,8 @@ #include #ifdef _WIN32 -#include +#include +// windows.h needs to be included before other windows headers #include #include #else diff --git a/src/core/gdbstub/gdbstub.cpp b/src/core/gdbstub/gdbstub.cpp index aea43e92b..aa849ab4b 100644 --- a/src/core/gdbstub/gdbstub.cpp +++ b/src/core/gdbstub/gdbstub.cpp @@ -15,7 +15,8 @@ #include #ifdef _WIN32 -#include +#include +// winsock2.h needs to be included first to prevent winsock.h being included by other includes #include #include #include -- cgit v1.2.3 From d2c39bdb295fae07c700975f89e9a06a9ef3f7f2 Mon Sep 17 00:00:00 2001 From: Jannik Vogel Date: Sun, 4 Dec 2016 23:34:44 +0100 Subject: Unify Windows ICON resource name --- src/citra/citra.rc | 2 +- src/citra_qt/citra-qt.rc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/citra/citra.rc b/src/citra/citra.rc index 86ad2c643..fea603004 100644 --- a/src/citra/citra.rc +++ b/src/citra/citra.rc @@ -5,5 +5,5 @@ // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -GLFW_ICON ICON "../../dist/citra.ico" +CITRA_ICON ICON "../../dist/citra.ico" diff --git a/src/citra_qt/citra-qt.rc b/src/citra_qt/citra-qt.rc index 6a61ff811..fea603004 100644 --- a/src/citra_qt/citra-qt.rc +++ b/src/citra_qt/citra-qt.rc @@ -5,5 +5,5 @@ // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -IDI_ICON1 ICON "../../dist/citra.ico" +CITRA_ICON ICON "../../dist/citra.ico" -- cgit v1.2.3 From 0aee903adab317a11209aed4f4cb176cf62ca6d9 Mon Sep 17 00:00:00 2001 From: Jannik Vogel Date: Mon, 5 Dec 2016 15:09:14 +0100 Subject: gdbstub: Remove unused include --- src/core/gdbstub/gdbstub.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/core/gdbstub/gdbstub.cpp b/src/core/gdbstub/gdbstub.cpp index aa849ab4b..21d941363 100644 --- a/src/core/gdbstub/gdbstub.cpp +++ b/src/core/gdbstub/gdbstub.cpp @@ -17,7 +17,6 @@ #ifdef _WIN32 #include // winsock2.h needs to be included first to prevent winsock.h being included by other includes -#include #include #include #include -- cgit v1.2.3