Skip to content

Commit

Permalink
Remove version(all) and fix older compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
dkorpel committed Jul 3, 2023
1 parent 702cd9c commit 30a6f05
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
4 changes: 3 additions & 1 deletion source/glfw3/internal.d
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,9 @@ struct _GLFWmutex
}

// Don't want to emit 137Kb init symbol
static assert(__traits(isZeroInit, _GLFWlibrary), _GLFWlibrary.init);
static if (__VERSION__ >= 2100) {
static assert(__traits(isZeroInit, _GLFWlibrary), _GLFWlibrary.init);
}

// Library global data
//
Expand Down
20 changes: 9 additions & 11 deletions source/glfw3/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@ public {
import glfw3.apinative;
}

version(all) {
import glfw3.context;
import glfw3.init;
import glfw3.input;
import glfw3.monitor;
import glfw3.vulkan;
import glfw3.window;
import glfw3.mappings;
import glfw3.internal;
import glfw3.api;
}
import glfw3.context;
import glfw3.init;
import glfw3.input;
import glfw3.monitor;
import glfw3.vulkan;
import glfw3.window;
import glfw3.mappings;
import glfw3.internal;
import glfw3.api;

version(_GLFW_WAYLAND) {
import glfw3.wl_platform;
Expand Down
5 changes: 3 additions & 2 deletions source/glfw3/win32_platform.d
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,10 @@ struct _GLFWlibraryWin32 {
char* clipboardString;
int[512] keycodes;
int[GLFW_KEY_LAST + 1] scancodes;
char[5][GLFW_KEY_LAST + 1] keynames;
char[5][GLFW_KEY_LAST + 1] keynames = void;
// Where to place the cursor when re-enabled
double restoreCursorPosX;double restoreCursorPosY;
double restoreCursorPosX = 0.0;
double restoreCursorPosY = 0.0;
// The window whose disabled cursor mode is active
_GLFWwindow* disabledCursorWindow;
RAWINPUT* rawInput;
Expand Down
2 changes: 1 addition & 1 deletion source/glfw3/x11_platform.d
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ struct _GLFWlibraryX11 {
// Clipboard string (while the selection is owned)
char* clipboardString;
// Key name string
char[5][GLFW_KEY_LAST + 1] keynames = '\0';
char[5][GLFW_KEY_LAST + 1] keynames = void; // ='\0'; older dmd versions can't initialize 2D static array with element
// X11 keycode to GLFW key LUT
int[256] keycodes;
// GLFW key to X11 keycode LUT
Expand Down

0 comments on commit 30a6f05

Please sign in to comment.