diff --git a/core/rend/CustomTexture.cpp b/core/rend/CustomTexture.cpp index c2ca54d8e..254fb5c0b 100644 --- a/core/rend/CustomTexture.cpp +++ b/core/rend/CustomTexture.cpp @@ -109,7 +109,7 @@ bool CustomTexture::Init() DIR *dir = flycast::opendir(textures_path.c_str()); if (dir != nullptr) { - INFO_LOG(RENDERER, "Found custom textures directory: %s", textures_path.c_str()); + NOTICE_LOG(RENDERER, "Found custom textures directory: %s", textures_path.c_str()); custom_textures_available = true; flycast::closedir(dir); loader_thread.Start(); diff --git a/core/rend/gles/gles.cpp b/core/rend/gles/gles.cpp index f9d1df245..d70e97237 100644 --- a/core/rend/gles/gles.cpp +++ b/core/rend/gles/gles.cpp @@ -488,17 +488,28 @@ void findGLVersion() #if !defined(GLES2) if (gl.gl_major >= 3) { - for (u32 i = 0; ; i++) + bool anisotropicExtension = false; + const char *extensions = (const char *)glGetString(GL_EXTENSIONS); + // glGetString(GL_EXTENSIONS) is deprecated and might return NULL in core contexts. + // In that case, use glGetStringi instead + if (extensions == nullptr) { - const char* extension = (const char *)glGetStringi(GL_EXTENSIONS, i); - if (extension == nullptr) - break; - if (!strcmp(extension, "GL_EXT_texture_filter_anisotropic")) + GLint n = 0; + glGetIntegerv(GL_NUM_EXTENSIONS, &n); + for (GLint i = 0; i < n; i++) { - glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY, &gl.max_anisotropy); - break; + const char* extension = (const char *)glGetStringi(GL_EXTENSIONS, i); + if (!strcmp(extension, "GL_EXT_texture_filter_anisotropic")) + { + anisotropicExtension = true; + break; + } } } + else if (strstr(extensions, "GL_EXT_texture_filter_anisotropic") != nullptr) + anisotropicExtension = true; + if (anisotropicExtension) + glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY, &gl.max_anisotropy); } #endif gl.mesa_nouveau = strstr((const char *)glGetString(GL_VERSION), "Mesa") != nullptr && !strcmp((const char *)glGetString(GL_VENDOR), "nouveau"); diff --git a/shell/apple/emulator-osx/reicast-osx.xcodeproj/project.pbxproj b/shell/apple/emulator-osx/reicast-osx.xcodeproj/project.pbxproj index ae65a5076..e06e4c3e3 100644 --- a/shell/apple/emulator-osx/reicast-osx.xcodeproj/project.pbxproj +++ b/shell/apple/emulator-osx/reicast-osx.xcodeproj/project.pbxproj @@ -520,7 +520,6 @@ 84B7BE131B72720100F9733F /* decoder_opcodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = decoder_opcodes.h; sourceTree = ""; }; 84B7BE141B72720100F9733F /* driver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = driver.cpp; sourceTree = ""; }; 84B7BE151B72720100F9733F /* ngen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ngen.h; sourceTree = ""; }; - 84B7BE171B72720100F9733F /* regalloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = regalloc.h; sourceTree = ""; }; 84B7BE181B72720100F9733F /* shil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = shil.cpp; sourceTree = ""; }; 84B7BE191B72720100F9733F /* shil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = shil.h; sourceTree = ""; }; 84B7BE1A1B72720100F9733F /* shil_canonical.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = shil_canonical.h; sourceTree = ""; }; @@ -1675,7 +1674,6 @@ 84B7BE131B72720100F9733F /* decoder_opcodes.h */, 84B7BE141B72720100F9733F /* driver.cpp */, 84B7BE151B72720100F9733F /* ngen.h */, - 84B7BE171B72720100F9733F /* regalloc.h */, 84B7BE181B72720100F9733F /* shil.cpp */, 84B7BE191B72720100F9733F /* shil.h */, 84B7BE1A1B72720100F9733F /* shil_canonical.h */,