From cef88965d742182adc95d18720c3e6302a1f6982 Mon Sep 17 00:00:00 2001
From: Cameron Cawley <ccawley2011@gmail.com>
Date: Fri, 6 Apr 2018 20:27:47 +0100
Subject: [PATCH] citra-room: Use the default OpenGL loader instead of
 SDL_GL_GetProcAddress Fixes #3538

---
 src/dedicated_room/CMakeLists.txt | 2 +-
 src/dedicated_room/citra-room.cpp | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/dedicated_room/CMakeLists.txt b/src/dedicated_room/CMakeLists.txt
index d956c20cc..cbd5d9726 100644
--- a/src/dedicated_room/CMakeLists.txt
+++ b/src/dedicated_room/CMakeLists.txt
@@ -12,7 +12,7 @@ target_link_libraries(citra-room PRIVATE glad)
 if (MSVC)
     target_link_libraries(citra-room PRIVATE getopt)
 endif()
-target_link_libraries(citra-room PRIVATE ${PLATFORM_LIBRARIES} SDL2 Threads::Threads)
+target_link_libraries(citra-room PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
 
 if(UNIX AND NOT APPLE)
     install(TARGETS citra-room RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
diff --git a/src/dedicated_room/citra-room.cpp b/src/dedicated_room/citra-room.cpp
index 370098af5..bd3ebfbc1 100644
--- a/src/dedicated_room/citra-room.cpp
+++ b/src/dedicated_room/citra-room.cpp
@@ -8,8 +8,6 @@
 #include <regex>
 #include <string>
 #include <thread>
-#define SDL_MAIN_HANDLED
-#include <SDL.h>
 #include <glad/glad.h>
 
 #ifdef _MSC_VER
@@ -60,7 +58,7 @@ int main(int argc, char** argv) {
     char* endarg;
 
     // This is just to be able to link against core
-    gladLoadGLLoader(static_cast<GLADloadproc>(SDL_GL_GetProcAddress));
+    gladLoadGL();
 
     std::string room_name;
     std::string password;