Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/CMakeLists.txt b/CMakeLists.txt
- index b66b45a..b762b05 100644
- --- a/CMakeLists.txt
- +++ b/CMakeLists.txt
- @@ -102,7 +102,7 @@ if(NOT MSVC)
- endif(NOT MSVC)
- # gcc uses some optimizations which might break stuff without this flag
- -add_definitions(-fno-strict-aliasing -fno-exceptions -Wno-psabi)
- +add_definitions(-fno-strict-aliasing -fno-exceptions)
- include(CheckCXXCompilerFlag)
- diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt
- index 858e05b..fa8f09b 100644
- --- a/Source/Core/DolphinWX/CMakeLists.txt
- +++ b/Source/Core/DolphinWX/CMakeLists.txt
- @@ -91,8 +91,6 @@ else()
- set(SRCS ${SRCS} Src/GLInterface/GLW.cpp)
- elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
- if(USE_WX)
- - set(SRCS ${SRCS} Src/GLInterface/WX.cpp)
- - else()
- set(SRCS ${SRCS} Src/GLInterface/AGL.cpp)
- endif()
- else()
- diff --git a/Source/Core/DolphinWX/Src/GLInterface.h b/Source/Core/DolphinWX/Src/GLInterface.h
- index a81f171..1267074 100644
- --- a/Source/Core/DolphinWX/Src/GLInterface.h
- +++ b/Source/Core/DolphinWX/Src/GLInterface.h
- @@ -21,14 +21,8 @@
- #if defined(USE_EGL) && USE_EGL
- #include "GLInterface/EGL.h"
- -#elif defined(USE_WX) && USE_WX
- -#include "GLInterface/WX.h"
- #elif defined(__APPLE__)
- #include "GLInterface/AGL.h"
- -#elif defined(_WIN32)
- -#include "GLInterface/WGL.h"
- -#elif defined(HAVE_X11) && HAVE_X11
- -#include "GLInterface/GLX.h"
- #endif
- typedef struct {
- @@ -46,10 +40,6 @@ typedef struct {
- std::thread xEventThread;
- int x, y;
- unsigned int width, height;
- -#elif defined(USE_WX) && USE_WX
- - wxGLCanvas *glCanvas;
- - wxGLContext *glCtxt;
- - wxPanel *panel;
- #elif defined(__APPLE__)
- NSWindow *cocoaWin;
- NSOpenGLContext *cocoaCtx;
- diff --git a/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp b/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp
- index e12e061..65f766d 100644
- --- a/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp
- +++ b/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp
- @@ -48,7 +48,7 @@ bool cInterfaceAGL::Create(void *&window_handle)
- NSRect size;
- NSUInteger style = NSMiniaturizableWindowMask;
- - NSOpenGLPixelFormatAttribute attr[2] = { NSOpenGLPFADoubleBuffer, 0 };
- + NSOpenGLPixelFormatAttribute attr[4] = { NSOpenGLPFADoubleBuffer, NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core, 0 };
- NSOpenGLPixelFormat *fmt = [[NSOpenGLPixelFormat alloc]
- initWithAttributes: attr];
- if (fmt == nil) {
- @@ -57,7 +57,7 @@ bool cInterfaceAGL::Create(void *&window_handle)
- }
- GLWin.cocoaCtx = [[NSOpenGLContext alloc]
- - initWithFormat: fmt shareContext: nil kCGLPFAOpenGLProfile: kCGLOGLPVersion_3_2_Core ];
- + initWithFormat: fmt shareContext: nil];
- [fmt release];
- if (GLWin.cocoaCtx == nil) {
- ERROR_LOG(VIDEO, "failed to create context");
- @@ -97,7 +97,7 @@ bool cInterfaceAGL::MakeCurrent()
- width = [[GLWin.cocoaWin contentView] frame].size.width;
- height = [[GLWin.cocoaWin contentView] frame].size.height;
- if (width == s_backbuffer_width && height == s_backbuffer_height)
- - return;
- + return true;
- [GLWin.cocoaCtx setView: [GLWin.cocoaWin contentView]];
- [GLWin.cocoaCtx update];
- diff --git a/Source/Core/DolphinWX/Src/GLInterface/WX.cpp b/Source/Core/DolphinWX/Src/GLInterface/WX.cpp
- deleted file mode 100644
- index d5415c8..0000000
- --- a/Source/Core/DolphinWX/Src/GLInterface/WX.cpp
- +++ /dev/null
- @@ -1,83 +0,0 @@
- -// Copyright (C) 2003 Dolphin Project.
- -
- -// This program is free software: you can redistribute it and/or modify
- -// it under the terms of the GNU General Public License as published by
- -// the Free Software Foundation, version 2.0.
- -
- -// This program is distributed in the hope that it will be useful,
- -// but WITHOUT ANY WARRANTY; without even the implied warranty of
- -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- -// GNU General Public License 2.0 for more details.
- -
- -// A copy of the GPL 2.0 should have been included with the program.
- -// If not, see http://www.gnu.org/licenses/
- -
- -// Official SVN repository and contact information can be found at
- -// http://code.google.com/p/dolphin-emu/
- -
- -#include "VideoConfig.h"
- -#include "Host.h"
- -#include "RenderBase.h"
- -
- -#include "VertexShaderManager.h"
- -#include "../GLInterface.h"
- -#include "WX.h"
- -
- -void cInterfaceWX::Swap()
- -{
- - GLWin.glCanvas->SwapBuffers();
- -}
- -
- -void cInterfaceWX::UpdateFPSDisplay(const char *text)
- -{
- - // Handled by Host_UpdateTitle()
- -}
- -
- -// Create rendering window.
- -// Call browser: Core.cpp:EmuThread() > main.cpp:Video_Initialize()
- -bool cInterfaceWX::Create(void *&window_handle)
- -{
- - int _tx, _ty, _twidth, _theight;
- - Host_GetRenderWindowSize(_tx, _ty, _twidth, _theight);
- -
- - // Control window size and picture scaling
- - s_backbuffer_width = _twidth;
- - s_backbuffer_height = _theight;
- -
- - GLWin.panel = (wxPanel *)window_handle;
- - GLWin.glCanvas = new wxGLCanvas(GLWin.panel, wxID_ANY, NULL,
- - wxPoint(0, 0), wxSize(_twidth, _theight));
- - GLWin.glCanvas->Show(true);
- - if (GLWin.glCtxt == NULL) // XXX dirty hack
- - GLWin.glCtxt = new wxGLContext(GLWin.glCanvas);
- - return true;
- -}
- -
- -bool cInterfaceWX::MakeCurrent()
- -{
- - return GLWin.glCanvas->SetCurrent(*GLWin.glCtxt);
- -}
- -
- -// Update window width, size and etc. Called from Render.cpp
- -void cInterfaceWX::Update()
- -{
- - int width, height;
- -
- - GLWin.panel->GetSize(&width, &height);
- - if (width == s_backbuffer_width && height == s_backbuffer_height)
- - return;
- -
- - GLWin.glCanvas->SetFocus();
- - GLWin.glCanvas->SetSize(0, 0, width, height);
- - GLWin.glCtxt->SetCurrent(*GLWin.glCanvas);
- - s_backbuffer_width = width;
- - s_backbuffer_height = height;
- -}
- -
- -// Close backend
- -void cInterfaceWX::Shutdown()
- -{
- - GLWin.glCanvas->Hide();
- -}
- -
- -
- diff --git a/Source/Core/DolphinWX/Src/GLInterface/WX.h b/Source/Core/DolphinWX/Src/GLInterface/WX.h
- deleted file mode 100644
- index 7772f86..0000000
- --- a/Source/Core/DolphinWX/Src/GLInterface/WX.h
- +++ /dev/null
- @@ -1,47 +0,0 @@
- -// Copyright (C) 2003 Dolphin Project.
- -
- -// This program is free software: you can redistribute it and/or modify
- -// it under the terms of the GNU General Public License as published by
- -// the Free Software Foundation, version 2.0.
- -
- -// This program is distributed in the hope that it will be useful,
- -// but WITHOUT ANY WARRANTY; without even the implied warranty of
- -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- -// GNU General Public License 2.0 for more details.
- -
- -// A copy of the GPL 2.0 should have been included with the program.
- -// If not, see http://www.gnu.org/licenses/
- -
- -// Official SVN repository and contact information can be found at
- -// http://code.google.com/p/dolphin-emu/
- -#ifndef _INTERFACEWX_H_
- -#define _INTERFACEWX_H_
- -
- -#if defined HAVE_X11 && HAVE_X11
- -#include <GL/glxew.h>
- -#include <GL/gl.h>
- -#elif defined __APPLE__
- -#include <GL/glew.h>
- -#import <AppKit/AppKit.h>
- -#endif
- -
- -#if defined USE_WX && USE_WX
- -#include "wx/wx.h"
- -#include "wx/glcanvas.h"
- -#endif
- -
- -#include "InterfaceBase.h"
- -
- -class cInterfaceWX : public cInterfaceBase
- -{
- -public:
- - void Swap();
- - void UpdateFPSDisplay(const char *Text);
- - bool Create(void *&window_handle);
- - bool MakeCurrent();
- - void Shutdown();
- -
- - void Update();
- -};
- -#endif
- -
- diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp
- index e0303d4..3598f55 100644
- --- a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp
- +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp
- @@ -56,8 +56,6 @@ void InitInterface()
- {
- #if defined(USE_EGL) && USE_EGL
- GLInterface = new cInterfaceEGL;
- - #elif defined(USE_WX) && USE_WX
- - GLInterface = new cInterfaceWX;
- #elif defined(__APPLE__)
- GLInterface = new cInterfaceAGL;
- #elif defined(_WIN32)
- diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
- index 46b0856..b83e19f 100644
- --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
- +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
- @@ -335,7 +335,7 @@ Renderer::Renderer()
- #ifdef __APPLE__
- int swapInterval = g_ActiveConfig.bVSync ? 1 : 0;
- #if defined USE_WX && USE_WX
- - NSOpenGLContext *ctx = GLWin.glCtxt->GetWXGLContext();
- + NSOpenGLContext *ctx = GLWin.cocoaCtx;
- #else
- NSOpenGLContext *ctx = GLWin.cocoaCtx;
- #endif
- diff --git a/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp b/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp
- index dd9d592..293e035 100644
- --- a/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp
- +++ b/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp
- @@ -41,7 +41,7 @@ StreamBuffer::StreamBuffer(u32 type, size_t size, StreamType uploadType)
- if(g_Config.backend_info.bSupportsGLPinnedMemory && g_Config.backend_info.bSupportsGLSync)
- m_uploadtype = PINNED_MEMORY;
- else if(g_Config.backend_info.bSupportsGLSync)
- - m_uploadtype = MAP_AND_RISK;
- + m_uploadtype = MAP_AND_ORPHAN;
- else
- m_uploadtype = MAP_AND_ORPHAN;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement