From 1d2ef1253db35ebbdc4432a68885a4130b7bb610 Mon Sep 17 00:00:00 2001 From: archshift Date: Mon, 9 Jun 2014 16:51:09 -0700 Subject: [PATCH 1/4] Preprocessor: #if's out OSX-specific GL changes on other platforms --- src/citra/emu_window/emu_window_glfw.cpp | 5 +++++ src/common/platform.h | 2 +- src/video_core/video_core.cpp | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/citra/emu_window/emu_window_glfw.cpp b/src/citra/emu_window/emu_window_glfw.cpp index 73c116373..f882a825e 100644 --- a/src/citra/emu_window/emu_window_glfw.cpp +++ b/src/citra/emu_window/emu_window_glfw.cpp @@ -28,8 +28,13 @@ EmuWindow_GLFW::EmuWindow_GLFW() { } glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2); + +#if EMU_PLATFORM == PLATFORM_MACOSX + // GLFW on OSX requires these window hints to be set to create a 3.2+ GL context. glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); +#endif + m_render_window = glfwCreateWindow(VideoCore::kScreenTopWidth, (VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight), m_window_title.c_str(), NULL, NULL); diff --git a/src/common/platform.h b/src/common/platform.h index 1e8dffbd4..2b36ab991 100644 --- a/src/common/platform.h +++ b/src/common/platform.h @@ -47,7 +47,7 @@ #define EMU_PLATFORM PLATFORM_WINDOWS #elif defined( __APPLE__ ) || defined( __APPLE_CC__ ) -#define EMU_PLATFORM PLATFORM_MAXOSX +#define EMU_PLATFORM PLATFORM_MACOSX #elif defined(__linux__) #define EMU_PLATFORM PLATFORM_LINUX diff --git a/src/video_core/video_core.cpp b/src/video_core/video_core.cpp index cbd540bdf..3b8039de4 100644 --- a/src/video_core/video_core.cpp +++ b/src/video_core/video_core.cpp @@ -30,8 +30,11 @@ void Start() { /// Initialize the video core void Init(EmuWindow* emu_window) { + +#if EMU_PLATFORM == PLATFORM_MACOSX // Known problem with GLEW prevents contexts above 2.x on OSX unless glewExperimental is enabled. glewExperimental = GL_TRUE; +#endif g_emu_window = emu_window; g_emu_window->MakeCurrent(); From 2e9f13f4ebdb1d0ee7e3fd6a89a2b4bb51ea73c9 Mon Sep 17 00:00:00 2001 From: bunnei Date: Mon, 9 Jun 2014 20:54:28 -0400 Subject: [PATCH 2/4] Common: Removed duplicate "LONG" and "MAX_PATH" definitions. --- src/common/platform.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/common/platform.h b/src/common/platform.h index 1e8dffbd4..944bb0303 100644 --- a/src/common/platform.h +++ b/src/common/platform.h @@ -87,7 +87,6 @@ inline struct tm* localtime_r(const time_t *clock, struct tm *result) { #define __stdcall #define __cdecl -#define LONG long #define BOOL bool #define DWORD u32 @@ -97,7 +96,6 @@ inline struct tm* localtime_r(const time_t *clock, struct tm *result) { // TODO: Hacks.. #include -#define MAX_PATH PATH_MAX #include #define stricmp(str1, str2) strcasecmp(str1, str2) From 12845baec6483a47b06162c54425a53cea7d3797 Mon Sep 17 00:00:00 2001 From: bunnei Date: Mon, 9 Jun 2014 23:01:25 -0400 Subject: [PATCH 3/4] Removed definition of MAX_PATH, this is already defined in common_paths.h. --- src/common/common.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/common/common.h b/src/common/common.h index 2578d0010..09027cae1 100644 --- a/src/common/common.h +++ b/src/common/common.h @@ -96,8 +96,6 @@ private: // Windows compatibility #ifndef _WIN32 -#include -#define MAX_PATH PATH_MAX #ifdef _LP64 #define _M_X64 1 #else From 0b39535bed2772ee078df71d2752004067ab9192 Mon Sep 17 00:00:00 2001 From: bunnei Date: Tue, 10 Jun 2014 22:49:11 -0400 Subject: [PATCH 4/4] VFP: Removed duplicate basic type definitions. --- src/core/arm/interpreter/vfp/vfp_helper.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/core/arm/interpreter/vfp/vfp_helper.h b/src/core/arm/interpreter/vfp/vfp_helper.h index b222e79f1..13c52c877 100644 --- a/src/core/arm/interpreter/vfp/vfp_helper.h +++ b/src/core/arm/interpreter/vfp/vfp_helper.h @@ -40,13 +40,6 @@ #include "core/arm/interpreter/armdefs.h" -#define u16 uint16_t -#define u32 uint32_t -#define u64 uint64_t -#define s16 int16_t -#define s32 int32_t -#define s64 int64_t - #define pr_info //printf #define pr_debug //printf