SDL-1.2: fixed windows build with --disable-video

From d1e6cc219252854feb8f04bcc7f1532675381d49 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Tue, 16 Feb 2021 01:04:40 +0300
Subject: [PATCH] fixed windows build with --disable-video

---
 src/events/SDL_keyboard.c |  4 ++--
 src/video/SDL_video.c     | 20 ++++++++++----------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/events/SDL_keyboard.c b/src/events/SDL_keyboard.c
index 0ca7915d..04d9293f 100644
--- a/src/events/SDL_keyboard.c
+++ b/src/events/SDL_keyboard.c
@@ -341,7 +341,7 @@ extern void WIN_ResetDeadKeys(void);
 
 void SDL_KeyboardQuit(void)
 {
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(SDL_VIDEO_DISABLED)
 	WIN_ResetDeadKeys();
 #endif
 }
@@ -370,7 +370,7 @@ int SDL_EnableUNICODE(int enable)
 	if ( enable >= 0 ) {
 		SDL_TranslateUNICODE = enable;
 	}
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(SDL_VIDEO_DISABLED)
 	if (enable != old_mode) {
 		WIN_ResetDeadKeys();
 	}
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 83fd0f8b..52dc8d3f 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -588,7 +588,7 @@ static void SDL_CreateShadowSurface(int depth)
     #include <sys/neutrino.h>
 #endif /* __QNXNTO__ */
 
-#ifdef WIN32
+#ifdef _WIN32
 	extern int sysevents_mouse_pressed;
 #endif
 
@@ -605,7 +605,7 @@ SDL_Surface * SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags)
 	int is_opengl;
 	SDL_GrabMode saved_grab;
 
-	#ifdef WIN32
+	#if defined(_WIN32) && !defined(SDL_VIDEO_DISABLED)
 		sysevents_mouse_pressed = 0;
 	#endif
 
@@ -832,9 +832,9 @@ SDL_Surface * SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags)
 		   ) {
 			video->is_32bit = 0;
 			SDL_VideoSurface = SDL_CreateRGBSurface(
-				flags, 
-				width, 
-				height,  
+				flags,
+				width,
+				height,
 				16,
 				31 << 11,
 				63 << 5,
@@ -847,10 +847,10 @@ SDL_Surface * SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags)
 		{
 			video->is_32bit = 1;
 			SDL_VideoSurface = SDL_CreateRGBSurface(
-				flags, 
-				width, 
-				height, 
-				32, 
+				flags,
+				width,
+				height,
+				32,
 #if SDL_BYTEORDER == SDL_LIL_ENDIAN
 				0x000000FF,
 				0x0000FF00,
@@ -1656,7 +1656,7 @@ void SDL_GL_Lock()
 		this->glDisable(GL_FOG);
 		this->glDisable(GL_ALPHA_TEST);
 		this->glDisable(GL_DEPTH_TEST);
-		this->glDisable(GL_SCISSOR_TEST);	
+		this->glDisable(GL_SCISSOR_TEST);
 		this->glDisable(GL_STENCIL_TEST);
 		this->glDisable(GL_CULL_FACE);