Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Rename our GLInterface class function 'GetProcAddress' in order to no…
…t have clashing function names due to Windows.
  • Loading branch information
Sonicadvance1 committed Jan 18, 2014
1 parent bea484e commit 5d26bf6
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Source/Core/DolphinWX/GLInterface/EGL.cpp
Expand Up @@ -35,7 +35,7 @@ void cInterfaceEGL::SwapInterval(int Interval)
eglSwapInterval(GLWin.egl_dpy, Interval);
}

void* cInterfaceEGL::GetProcAddress(std::string name)
void* cInterfaceEGL::GetFuncAddress(std::string name)
{
return (void*)eglGetProcAddress(name.c_str());
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/DolphinWX/GLInterface/EGL.h
Expand Up @@ -33,7 +33,7 @@ class cInterfaceEGL : public cInterfaceBase
void Swap();
void SetMode(u32 mode) { s_opengl_mode = GLInterfaceMode::MODE_DETECT; }
void UpdateFPSDisplay(const char *Text);
void* GetProcAddress(std::string name);
void* GetFuncAddress(std::string name);
bool Create(void *&window_handle);
bool MakeCurrent();
void Shutdown();
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/DolphinWX/GLInterface/GLX.cpp
Expand Up @@ -38,7 +38,7 @@ void cInterfaceGLX::SwapInterval(int Interval)
else
ERROR_LOG(VIDEO, "No support for SwapInterval (framerate clamped to monitor refresh rate).");
}
void* cInterfaceGLX::GetProcAddress(std::string name)
void* cInterfaceGLX::GetFuncAddress(std::string name)
{
return (void*)glXGetProcAddress((const GLubyte*)name.c_str());
}
Expand Down Expand Up @@ -123,7 +123,7 @@ bool cInterfaceGLX::Create(void *&window_handle)
PanicAlert("Unable to create GLX context.");
return false;
}
glXSwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC)GLInterface->GetProcAddress("glXSwapIntervalSGI");
glXSwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC)GLInterface->GetFuncAddress("glXSwapIntervalSGI");

GLWin.x = _tx;
GLWin.y = _ty;
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/DolphinWX/GLInterface/GLX.h
Expand Up @@ -29,7 +29,7 @@ class cInterfaceGLX : public cInterfaceBase
void SwapInterval(int Interval);
void Swap();
void UpdateFPSDisplay(const char *Text);
void* GetProcAddress(std::string name);
void* GetFuncAddress(std::string name);
bool Create(void *&window_handle);
bool MakeCurrent();
bool ClearCurrent();
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/DolphinWX/GLInterface/InterfaceBase.h
Expand Up @@ -24,7 +24,7 @@ class cInterfaceBase
virtual void UpdateFPSDisplay(const char *Text) {}
virtual void SetMode(u32 mode) { s_opengl_mode = GLInterfaceMode::MODE_OPENGL; }
virtual u32 GetMode() { return s_opengl_mode; }
virtual void* GetProcAddress(std::string name) { return NULL; }
virtual void* GetFuncAddress(std::string name) { return NULL; }
virtual bool Create(void *&window_handle) { return true; }
virtual bool MakeCurrent() { return true; }
virtual bool ClearCurrent() { return true; }
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/DolphinWX/GLInterface/WGL.cpp
Expand Up @@ -31,7 +31,7 @@ void cInterfaceWGL::Swap()
SwapBuffers(hDC);
}

void* cInterfaceWGL::GetProcAddress(std::string name)
void* cInterfaceWGL::GetFuncAddress(std::string name)
{
void* func = (void*)wglGetProcAddress((LPCSTR)name.c_str());
if (func == NULL)
Expand Down Expand Up @@ -83,7 +83,7 @@ bool cInterfaceWGL::Create(void *&window_handle)
Host_SysMessage("failed to create window");
return false;
}
wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)GLInterface->GetProcAddress("wglSwapIntervalEXT");
wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)GLInterface->GetFuncAddress("wglSwapIntervalEXT");

// Show the window
EmuWindow::Show();
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/DolphinWX/GLInterface/WGL.h
Expand Up @@ -13,7 +13,7 @@ class cInterfaceWGL : public cInterfaceBase
void SwapInterval(int Interval);
void Swap();
void UpdateFPSDisplay(const char *Text);
void* GetProcAddress(std::string name);
void* GetFuncAddress(std::string name);
bool Create(void *&window_handle);
bool MakeCurrent();
bool ClearCurrent();
Expand Down
Expand Up @@ -942,7 +942,7 @@ namespace GLExtensions

void* GetFuncAddress(std::string name, void **func)
{
*func = GLInterface->GetProcAddress(name);
*func = GLInterface->GetFuncAddress(name);
if (*func == NULL)
{
#if defined(__linux__) || defined(__APPLE__)
Expand Down

0 comments on commit 5d26bf6

Please sign in to comment.