mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-05 06:25:46 +00:00
Fixed bug when a X display connection cannot be established
This commit is contained in:
parent
24ac909558
commit
6113da5083
1 changed files with 4 additions and 1 deletions
|
|
@ -443,7 +443,7 @@ JNIEXPORT jobjectArray JNICALL Java_org_lwjgl_Display_getAvailableDisplayModes
|
|||
int num_modes, i;
|
||||
|
||||
Display *disp = XOpenDisplay(NULL);
|
||||
int screen = DefaultScreen(disp);
|
||||
int screen;
|
||||
XF86VidModeModeInfo **avail_modes;
|
||||
|
||||
if (disp == NULL) {
|
||||
|
|
@ -453,6 +453,9 @@ JNIEXPORT jobjectArray JNICALL Java_org_lwjgl_Display_getAvailableDisplayModes
|
|||
XCloseDisplay(disp);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int screen = DefaultScreen(disp);
|
||||
|
||||
if (!loadGL(disp, screen)) {
|
||||
#ifdef _DEBUG
|
||||
printf("Could not load GL\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue