diff --git a/acconfig.h b/acconfig.h index 13aa439..0087683 100644 --- a/acconfig.h +++ b/acconfig.h @@ -106,5 +106,8 @@ /* Define this if you want to have packet logging */ #undef PACKET_LOGGING +/* Define this if you have fnmatch.h */ +#undef HAVE_FNMATCH_H + @BOTTOM@ #endif // __config_h_ diff --git a/configure.in b/configure.in index ee90dcb..81cd5ed 100644 --- a/configure.in +++ b/configure.in @@ -35,10 +35,13 @@ AC_LANG_C endian="" case "$host_os" in mingw32*) + mingw=yes CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/include/win32" CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/include/win32/resources" - CC=i386-mingw32msvc-gcc - endian="little" + if test $host != $build; then + CC=$host_cpu-$host_os-gcc + endian="little" + fi ;; esac @@ -98,7 +101,13 @@ AC_CHECK_HEADERS( sys/time.h sys/types.h sys/wait.h time.h unistd.h vga.h \ vgakeyboard.h vgamouse.h windows.h winsock.h zlib.h ) - +if test "x$mingw" = xyes; then + AC_MSG_CHECKING(for fnmatch.h) + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_FNMATCH_H) +else + AC_CHECK_HEADERS(fnmatch.h) +fi dnl ================================================================== dnl Checks for typedefs, structures, and compiler characteristics diff --git a/include/vid.h b/include/vid.h index f1c9353..3d40d3b 100644 --- a/include/vid.h +++ b/include/vid.h @@ -97,6 +97,8 @@ void VID_UnlockBuffer (void); qboolean VID_Is8bit (void); +void VID_RaiseWindow (void); +void VID_MinimiseWindow (void); void VID_SetCaption (char *text); // used to set window caption diff --git a/source/cl_main.c b/source/cl_main.c index 13dd780..0c42659 100644 --- a/source/cl_main.c +++ b/source/cl_main.c @@ -67,9 +67,6 @@ #include "cvar.h" #include "draw.h" #include "host.h" -#ifdef _WIN32 -# include "in_win.h" -#endif #include "input.h" #include "keys.h" #include "menu.h" @@ -89,7 +86,6 @@ #include "vid.h" #include "view.h" #include "va.h" -#include "winquake.h" #ifdef __sun /* Sun's model_t in sys/model.h conflicts w/ Quake's model_t */ @@ -927,8 +923,7 @@ CL_ConnectionlessPacket (void) return; } #ifdef _WIN32 - ShowWindow (mainwindow, SW_RESTORE); - SetForegroundWindow (mainwindow); + VID_RaiseWindow (); #endif s = MSG_ReadString (); @@ -1160,10 +1155,7 @@ CL_Minimize_f void CL_Windows_f (void) { -// if (modestate == MS_WINDOWED) -// ShowWindow(mainwindow, SW_MINIMIZE); -// else - SendMessage (mainwindow, WM_SYSKEYUP, VK_TAB, 1 | (0x0F << 16) | (1 << 29)); + VID_MinimiseWindow (); } #endif diff --git a/source/cl_pred.c b/source/cl_pred.c index e946016..83619a4 100644 --- a/source/cl_pred.c +++ b/source/cl_pred.c @@ -30,6 +30,8 @@ # include "config.h" #endif +#include + #include "bothdefs.h" #include "cl_ents.h" #include "client.h" @@ -38,12 +40,6 @@ #include "cvar.h" #include "pmove.h" -#ifdef _WIN32 -#include "winquake.h" -#endif - -#include - cvar_t *cl_nopred; cvar_t *cl_pushlatency; diff --git a/source/menu.c b/source/menu.c index 312e285..74b9249 100644 --- a/source/menu.c +++ b/source/menu.c @@ -45,6 +45,9 @@ #ifdef HAVE_STRINGS_H #include #endif +#ifdef HAVE_WINDOWS_H +#include +#endif #include "cl_input.h" #include "cl_main.h" @@ -66,7 +69,6 @@ #include "va.h" #include "vid.h" #include "view.h" -#include "winquake.h" void (*vid_menudrawfn) (void); void (*vid_menukeyfn) (int key); @@ -589,14 +591,14 @@ M_Options_Draw (void) M_Print (16, 152, " Video Options"); #ifdef _WIN32 - if (modestate == MS_WINDOWED) { + //FIXMEif (modestate == MS_WINDOWED) { #endif if (_windowed_mouse) { M_Print (16, 160, " Use Mouse"); M_DrawCheckbox (220, 160, _windowed_mouse->int_val); } #ifdef _WIN32 - } + //FIXME} #endif // cursor @@ -642,9 +644,9 @@ M_Options_Key (int k) if (options_cursor < 0) options_cursor = OPTIONS_ITEMS - 1; #ifdef _WIN32 - if (options_cursor == 16 - && (!(_windowed_mouse) - || (modestate != MS_WINDOWED))) options_cursor--; + //FIXMEif (options_cursor == 16 + //FIXME&& (!(_windowed_mouse) + //FIXME|| (modestate != MS_WINDOWED))) options_cursor--; #endif if (options_cursor == 15 && !(vid_menudrawfn)) options_cursor--; @@ -656,8 +658,8 @@ M_Options_Key (int k) if (options_cursor == 15 && !(vid_menudrawfn)) options_cursor++; #ifdef _WIN32 - if (options_cursor == 16 && (!(_windowed_mouse) || (modestate != MS_WINDOWED))) // ARGH!!!!! - options_cursor++; + //FIXMEif (options_cursor == 16 && (!(_windowed_mouse) || (modestate != MS_WINDOWED))) // ARGH!!!!! + //FIXMEoptions_cursor++; #endif if (options_cursor >= OPTIONS_ITEMS) options_cursor = 0; diff --git a/source/net_udp.c b/source/net_udp.c index afbf451..e3155eb 100644 --- a/source/net_udp.c +++ b/source/net_udp.c @@ -75,7 +75,6 @@ #ifdef _WIN32 #include -//# include "winquake.h" # undef EWOULDBLOCK # define EWOULDBLOCK WSAEWOULDBLOCK #endif diff --git a/source/net_udp6.c b/source/net_udp6.c index da522d3..969415d 100644 --- a/source/net_udp6.c +++ b/source/net_udp6.c @@ -51,7 +51,7 @@ #define model_t quakeforgemodel_t #ifdef _WIN32 -# include +# include # undef EWOULDBLOCK # define EWOULDBLOCK WSAEWOULDBLOCK #endif