aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar archshift <admin@archshift.com>2014-06-09 16:51:09 -0700
committerGravatar bunnei <ericbunnie@gmail.com>2014-06-12 06:10:55 -0400
commitee4717aaaed6302aacd6d378bf0c75b811957c40 (patch)
treea103ab1c58e1d19ce0d0e28516cb8bcad63b8da1
parent06ef8f001a904c9c6e300a488503fa76177ebe10 (diff)
Preprocessor: #if's out OSX-specific GL changes on other platforms
-rw-r--r--src/citra/emu_window/emu_window_glfw.cpp5
-rw-r--r--src/common/platform.h2
-rw-r--r--src/video_core/video_core.cpp3
3 files changed, 9 insertions, 1 deletions
diff --git a/src/citra/emu_window/emu_window_glfw.cpp b/src/citra/emu_window/emu_window_glfw.cpp
index 73c11637..f882a825 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 944bb030..b02b52cd 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 cbd540bd..3b8039de 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();