Index: emu/cpu.c
===================================================================
--- emu/cpu.c	(revision a23f3d986711b10a5ebfa03240ec5026f50a07f9)
+++ emu/cpu.c	(revision 7eb897153122e40eecb3ff1526857dd335acb9d1)
@@ -620,5 +620,8 @@
 
 	bool run = true;
+
+#if defined EMU_LINUX
 	SDL_Scancode down = SDL_SCANCODE_UNKNOWN;
+#endif
 
 	while (run) {
@@ -631,4 +634,5 @@
 
 		while (SDL_PollEvent(&ev) > 0) {
+#if defined EMU_LINUX
 			// Work around duplicate key-down events on Linux.
 
@@ -643,4 +647,5 @@
 				down = SDL_SCANCODE_UNKNOWN;
 			}
+#endif
 
 			if (ev.type == SDL_QUIT ||
