diff --git a/source/build/src/rawinput.cpp b/source/build/src/rawinput.cpp index bd829a71d..0892573f9 100644 --- a/source/build/src/rawinput.cpp +++ b/source/build/src/rawinput.cpp @@ -10,7 +10,7 @@ static BOOL rawinput_started = 0; static uint8_t KeyboardState[256] = {0}; // VKeys -extern uint8_t g_mouseEnabled, g_mouseGrabbed; +extern bool g_mouseEnabled, g_mouseGrabbed; extern void keySetState(int32_t key, int32_t state); //#define MASK_DOWN (1<<(i<<1)) diff --git a/source/build/src/sdlayer.cpp b/source/build/src/sdlayer.cpp index 4e67ab66f..86712e9b5 100644 --- a/source/build/src/sdlayer.cpp +++ b/source/build/src/sdlayer.cpp @@ -1646,6 +1646,13 @@ int32_t videoSetMode(int32_t x, int32_t y, int32_t c, int32_t fs) } gladLoadGLLoader(SDL_GL_GetProcAddress); + if (GLVersion.major < 2) + { + initprintf("Your computer does not support OpenGL version 2 or greater. GL modes are unavailable.\n"); + nogl = 1; + destroy_window_resources(); + return -1; + } SDL_SetWindowFullscreen(sdl_window, ((fs & 1) ? SDL_WINDOW_FULLSCREEN : 0)); SDL_GL_SetSwapInterval(vsync_renderlayer); diff --git a/source/build/src/winlayer.cpp b/source/build/src/winlayer.cpp index 8c1388536..7178b483c 100644 --- a/source/build/src/winlayer.cpp +++ b/source/build/src/winlayer.cpp @@ -128,7 +128,7 @@ static GUID guidDevs; char di_disabled = 0; static char di_devacquired; static HANDLE di_inputevt = 0; -static int32_t joyblast=0; +//static int32_t joyblast=0; static struct { @@ -685,8 +685,6 @@ int32_t handleevents(void) // int32_t initinput(void) { - int32_t i; - Win_GetOriginalLayoutName(); Win_SetKeyboardLayoutUS(1); @@ -860,7 +858,8 @@ void releaseallbuttons(void) for (i=0; i<32; i++) if (joystick.bits & (1<guidInstance, sizeof(GUID)); initprintf(" * %s: %s\n", d, lpddi->tszProductName); @@ -2703,14 +2702,23 @@ static int32_t SetupOpenGL(int32_t width, int32_t height, int32_t bitspp) ReleaseOpenGL(); return TRUE; #ifdef POLYMER - } else if (loadglulibrary(getenv("BUILD_GLULIB"))) + } + else if (loadglulibrary(getenv("BUILD_GLULIB"))) { initprintf("Failure loading GLU. GL modes are unavailable.\n"); nogl = 1; ReleaseOpenGL(); return TRUE; #endif - } else + } + else if (GLVersion.major < 2) + { + initprintf("Your computer does not support OpenGL version 2 or greater. GL modes are unavailable.\n"); + nogl = 1; + ReleaseOpenGL(); + return TRUE; + } + else { glLoaded = 1; }