Skip to content

Commit

Permalink
Upgrade binbc dependencies to latest version. issue #681
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadim Lopatin committed Feb 28, 2024
1 parent 47d764b commit 2f0ae83
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
30 changes: 15 additions & 15 deletions dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@
"versions-windows": ["Unicode"],
"libs-windows": ["opengl32"],
"dependencies": {
"bindbc-opengl": "~>1.0.0",
"bindbc-freetype": "~>1.0.0",
"bindbc-sdl": "~>1.0.0"
"bindbc-opengl": "~>1.1.0",
"bindbc-freetype": "~>1.1.1",
"bindbc-sdl": "~>1.4.5"
},
"copyFiles-windows-x86_64": [
"libs/windows/x86_64/libfreetype-6.dll"
Expand All @@ -80,8 +80,8 @@
"versions": ["USE_EXTERNAL"],
"libs-windows": ["opengl32"],
"dependencies": {
"bindbc-opengl": "~>1.0.0",
"bindbc-freetype": "~>1.0.0"
"bindbc-opengl": "~>1.1.0",
"bindbc-freetype": "~>1.1.1"
}
},
{
Expand All @@ -91,9 +91,9 @@
"versions-windows": ["Unicode" ,"NO_OPENGL"],
"libs-windows": ["opengl32"],
"dependencies": {
"bindbc-opengl": "~>1.0.0",
"bindbc-freetype": "~>1.0.0",
"bindbc-sdl": "~>1.0.0",
"bindbc-opengl": "~>1.1.0",
"bindbc-freetype": "~>1.1.1",
"bindbc-sdl": "~>1.4.5",
"icontheme": "~>1.2.3"
}
},
Expand All @@ -102,9 +102,9 @@
"versions": ["USE_SDL", "USE_OPENGL", "USE_FREETYPE", "EmbedStandardResources", "GL_32", "SDL_204"],
"versions-windows": ["Unicode"],
"dependencies": {
"bindbc-opengl": "~>1.0.0",
"bindbc-freetype": "~>1.0.0",
"bindbc-sdl": "~>1.0.0",
"bindbc-opengl": "~>1.1.0",
"bindbc-freetype": "~>1.1.1",
"bindbc-sdl": "~>1.4.5",
"icontheme": "~>1.2.3"
},
"copyFiles-windows-x86_64": [
Expand All @@ -122,8 +122,8 @@
"versions-windows": ["Unicode"],
"libs-posix": ["GLX"],
"dependencies": {
"bindbc-opengl": "~>1.0.0",
"bindbc-freetype": "~>1.0.0",
"bindbc-opengl": "~>1.1.0",
"bindbc-freetype": "~>1.1.1",
"x11": "~>1.0.21",
"icontheme": "~>1.2.3",
"glx-d": "~>1.1.0"
Expand All @@ -134,8 +134,8 @@
"versions": ["USE_DSFML", "USE_OPENGL", "USE_FREETYPE", "EmbedStandardResources", "GL_32"],
"versions-windows": ["Unicode"],
"dependencies": {
"bindbc-opengl": "~>1.0.0",
"bindbc-freetype": "~>1.0.0",
"bindbc-opengl": "~>1.1.0",
"bindbc-freetype": "~>1.1.1",
"dsfml": "~>2.1.0",
"icontheme": "~>1.2.3"
},
Expand Down
7 changes: 5 additions & 2 deletions src/dlangui/platforms/sdl/sdlapp.d
Original file line number Diff line number Diff line change
Expand Up @@ -1605,9 +1605,12 @@ version (Windows) {
}
}

SDLSupport sdlVer;


/// try to get screen resolution and update SCREEN_DPI; returns true if SCREEN_DPI is changed (when custom override DPI value is not set)
bool sdlUpdateScreenDpi(int displayIndex = 0) {
if (SDL_GetDisplayDPI is null) {
if (sdlVer < SDLSupport.v2_0_4) {
Log.w("SDL_GetDisplayDPI is not found: cannot detect screen DPI");
return false;
}
Expand Down Expand Up @@ -1654,7 +1657,7 @@ int sdlmain(string[] args) {
import std.exception;
//DerelictSDL2.missingSymbolCallback = &missingSymFunc;
// Load the SDL 2 library.
auto sdlVer = loadSDL();
sdlVer = loadSDL();
enforce(sdlVer != SDLSupport.noLibrary && sdlVer != SDLSupport.badLibrary, "bindbc-sdl unable to find SDL2 library");
sdlCheckMissingSymFunc(loader.errors);
} catch (Exception e) {
Expand Down

0 comments on commit 2f0ae83

Please sign in to comment.