--- MilkyTracker-1.03.00/src/ppui/sdl/DisplayDevice_SDL.cpp 2021-04-27 15:17:42.529000000 +1000 +++ MilkyTracker-1.03.00/src/ppui/sdl/DisplayDevice_SDL.cpp 2021-04-27 15:17:42.529000000 +1000 @@ -26,30 +26,8 @@ SDL_Window* PPDisplayDevice::CreateWindow(pp_int32& w, pp_int32& h, pp_int32& bpp, Uint32 flags) { size_t namelen = 0; - char rendername[256] = { 0 }; - PFNGLGETSTRINGPROC glGetStringAPI = NULL; - - for (int it = 0; it < SDL_GetNumRenderDrivers(); it++) - { - SDL_RendererInfo info; - SDL_GetRenderDriverInfo(it, &info); - - namelen += strlen(info.name) + 1; - strncat(rendername, info.name, sizeof(rendername) - namelen); - strncat(rendername, " ", sizeof(rendername) - namelen); - - if (strncmp("opengles2", info.name, 9) == 0) - { - drv_index = it; - SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); - SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2); - SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0); - SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 1); - } - } - // Create SDL window - SDL_Window* theWindow = SDL_CreateWindow("MilkyTracker", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, w, h, SDL_WINDOW_OPENGL | flags); + SDL_Window* theWindow = SDL_CreateWindow("MilkyTracker", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, w, h, flags); if (theWindow == NULL) { @@ -59,7 +37,7 @@ w = getDefaultWidth(); h = getDefaultHeight(); - theWindow = SDL_CreateWindow("MilkyTracker", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, w, h, SDL_WINDOW_OPENGL | flags); + theWindow = SDL_CreateWindow("MilkyTracker", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, w, h, flags); if (theWindow == NULL) { @@ -69,21 +47,6 @@ } } - SDL_GLContext ctx = SDL_GL_CreateContext(theWindow); - SDL_GL_MakeCurrent(theWindow, ctx); - - glGetStringAPI = (PFNGLGETSTRINGPROC)SDL_GL_GetProcAddress("glGetString"); - - fprintf(stdout, "Available Renderers: %s\n", rendername); - if (glGetStringAPI) - { - fprintf(stdout, "Vendor : %s\n", glGetStringAPI(GL_VENDOR)); - fprintf(stdout, "Renderer : %s\n", glGetStringAPI(GL_RENDERER)); - fprintf(stdout, "Version : %s\n", glGetStringAPI(GL_VERSION)); -#ifdef DEBUG - fprintf(stdout, "Extensions : %s\n", glGetStringAPI(GL_EXTENSIONS)); -#endif - } // Prevent window from being resized below minimum SDL_SetWindowMinimumSize(theWindow, w, h); fprintf(stderr, "SDL: Minimum window size set to %dx%d.\n", w, h); @@ -105,7 +68,6 @@ bFullScreen = fullScreen; - drv_index = -1; initMousePointers(); }