upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui.cpp')
-rw-r--r--src/gui.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gui.cpp b/src/gui.cpp
index 6d81b9f..2210296 100644
--- a/src/gui.cpp
+++ b/src/gui.cpp
@@ -678,7 +678,10 @@ static void DrawAboutDialog()
678// --------------------------------------------------------------------------- 678// ---------------------------------------------------------------------------
679int RunGUI(int argc, char* argv[]) 679int RunGUI(int argc, char* argv[])
680{ 680{
681 if (!glfwInit()) return 1; 681 if (!glfwInit()) {
682 printf("GUI ERROR: glfwInit() failed -- no display or GL available. Run headless with -nogui.\n");
683 return 1;
684 }
682 glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); 685 glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
683 glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); 686 glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
684 glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); 687 glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
@@ -687,7 +690,13 @@ int RunGUI(int argc, char* argv[])
687#endif 690#endif
688 691
689 GLFWwindow* window = glfwCreateWindow(960, 640, "Bitflash", nullptr, nullptr); 692 GLFWwindow* window = glfwCreateWindow(960, 640, "Bitflash", nullptr, nullptr);
690 if (!window) { glfwTerminate(); return 1; } 693 if (!window) {
694 printf("GUI ERROR: could not create an OpenGL 3.3 window.\n");
695 printf(" Your GPU/driver may not support OpenGL 3.3 core -- common over Remote Desktop, in VMs, or on old GPUs.\n");
696 printf(" Fixes: update graphics drivers, use a software OpenGL (Mesa), or run headless with -nogui.\n");
697 glfwTerminate();
698 return 1;
699 }
691 glfwMakeContextCurrent(window); 700 glfwMakeContextCurrent(window);
692 glfwSwapInterval(1); 701 glfwSwapInterval(1);
693 702