diff --git a/src/conio/ciolib.c b/src/conio/ciolib.c
index 109d5cdb3540b2636bdcdca56aab67bc00deb3ca..a1bd3c2a1ded30ee6d618be95c440584267949f8 100644
--- a/src/conio/ciolib.c
+++ b/src/conio/ciolib.c
@@ -200,8 +200,7 @@ static int try_sdl_init(int mode)
 }
 #endif
 
-#ifndef _WIN32
- #ifndef NO_X
+#ifndef NO_X
 static int try_x_init(int mode)
 {
 #if defined(WITH_SDL)
@@ -255,8 +254,9 @@ static int try_x_init(int mode)
 	}
 	return(0);
 }
- #endif
+#endif
 
+#ifndef _WIN32
 static int try_curses_init(int mode)
 {
 #if defined(WITH_SDL)