From 97445f941a25df089c7bdf7d1b645faaf46e1654 Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Sun, 29 Oct 2017 01:09:34 -0400 Subject: [PATCH 01/14] Add command to restart the audio system --- src/d_netcmd.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index b5563f4e..247829c8 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -26,6 +26,7 @@ #include "p_local.h" #include "p_setup.h" #include "s_sound.h" +#include "i_sound.h" #include "m_misc.h" #include "am_map.h" #include "byteptr.h" @@ -128,6 +129,7 @@ static void Command_Playintro_f(void); static void Command_Displayplayer_f(void); static void Command_Tunes_f(void); +static void Command_RestartAudio_f(void); static void Command_ExitLevel_f(void); static void Command_Showmap_f(void); @@ -670,6 +672,7 @@ void D_RegisterClientCommands(void) COM_AddCommand("displayplayer", Command_Displayplayer_f); COM_AddCommand("tunes", Command_Tunes_f); + COM_AddCommand("restartaudio", Command_RestartAudio_f); CV_RegisterVar(&cv_resetmusic); // FIXME: not to be here.. but needs be done for config loading @@ -3909,6 +3912,20 @@ static void Command_Tunes_f(void) } } +static void Command_RestartAudio_f(void) +{ + I_ShutdownMusic(); + I_ShutdownSound(); + I_StartupSound(); + I_InitMusic(); + +// These must be called or everthing will be muted for the user until next volume change. + + I_SetSfxVolume(cv_soundvolume.value); + I_SetDigMusicVolume(cv_digmusicvolume.value); + I_SetMIDIMusicVolume(cv_midimusicvolume.value); +} + /** Quits a game and returns to the title screen. * */ From 4f8b91c770d35f12e3aeef08910cac88586002af Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Tue, 7 Nov 2017 16:26:45 -0500 Subject: [PATCH 02/14] Attempt to restart music --- src/d_netcmd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 247829c8..501216b0 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -3914,16 +3914,21 @@ static void Command_Tunes_f(void) static void Command_RestartAudio_f(void) { + if (dedicated) // No point in doing anything game is a dedicated server. + return; + I_ShutdownMusic(); I_ShutdownSound(); I_StartupSound(); I_InitMusic(); -// These must be called or everthing will be muted for the user until next volume change. - +// These must be called or no sound and music untill manually set. + I_SetSfxVolume(cv_soundvolume.value); I_SetDigMusicVolume(cv_digmusicvolume.value); I_SetMIDIMusicVolume(cv_midimusicvolume.value); + if (Playing() && (!dedicated)) + P_RestoreMusic(displayplayer); } /** Quits a game and returns to the title screen. From c1405137ecf6464cb68eefd299955004e3147a86 Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Tue, 7 Nov 2017 23:48:03 -0500 Subject: [PATCH 03/14] Extra tab space to make the compiler happy --- src/d_netcmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 501216b0..67a680c3 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -3915,7 +3915,7 @@ static void Command_Tunes_f(void) static void Command_RestartAudio_f(void) { if (dedicated) // No point in doing anything game is a dedicated server. - return; + return; I_ShutdownMusic(); I_ShutdownSound(); @@ -3928,7 +3928,7 @@ static void Command_RestartAudio_f(void) I_SetDigMusicVolume(cv_digmusicvolume.value); I_SetMIDIMusicVolume(cv_midimusicvolume.value); if (Playing() && (!dedicated)) - P_RestoreMusic(displayplayer); + P_RestoreMusic(displayplayer); } /** Quits a game and returns to the title screen. From 55c86f3e1558c6bf34de2de4a9b36cd9f9c12df4 Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Wed, 8 Nov 2017 14:48:05 -0500 Subject: [PATCH 04/14] Successful attempt at restarting the music --- src/d_netcmd.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 67a680c3..e433e3c5 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -3914,9 +3914,10 @@ static void Command_Tunes_f(void) static void Command_RestartAudio_f(void) { - if (dedicated) // No point in doing anything game is a dedicated server. + if (dedicated) { // No point in doing anything if game is a dedicated server. return; - +} + S_StopMusic(); I_ShutdownMusic(); I_ShutdownSound(); I_StartupSound(); @@ -3927,8 +3928,9 @@ static void Command_RestartAudio_f(void) I_SetSfxVolume(cv_soundvolume.value); I_SetDigMusicVolume(cv_digmusicvolume.value); I_SetMIDIMusicVolume(cv_midimusicvolume.value); - if (Playing() && (!dedicated)) - P_RestoreMusic(displayplayer); + if (Playing() && (!dedicated)) { // Gotta make sure the player is in a level + P_RestoreMusic(&players[displayplayer]); + } } /** Quits a game and returns to the title screen. From e61549d81fcef5fc26f7f45ef16a5253baedcdff Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Wed, 8 Nov 2017 14:50:27 -0500 Subject: [PATCH 05/14] Opps, forgot to change this. --- src/d_netcmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index e433e3c5..041cb134 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -3929,7 +3929,7 @@ static void Command_RestartAudio_f(void) I_SetDigMusicVolume(cv_digmusicvolume.value); I_SetMIDIMusicVolume(cv_midimusicvolume.value); if (Playing() && (!dedicated)) { // Gotta make sure the player is in a level - P_RestoreMusic(&players[displayplayer]); + P_RestoreMusic(&players[consoleplayer]); } } From d576453b569855cc84ce5e5cdb5354e080ec01f2 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Mon, 18 Dec 2017 21:17:37 +0000 Subject: [PATCH 06/14] Command_Addfile: add "too many files" and already-loaded checks and respective error messages No more shall the server be kicked from their own servers for re-adding a wad by accident! --- src/d_netcmd.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 83bbc7aa..2ca48180 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -3012,8 +3012,31 @@ static void Command_Addfile(void) if (*p == '\\' || *p == '/' || *p == ':') break; ++p; + // check total packet size and no of files currently loaded + { + size_t packetsize = 0; + serverinfo_pak *dummycheck = NULL; + + // Shut the compiler up. + (void)dummycheck; + + // See W_LoadWadFile in w_wad.c + for (i = 0; i < numwadfiles; i++) + packetsize += nameonlylength(wadfiles[i]->filename) + 22; + + packetsize += nameonlylength(fn) + 22; + + if ((numwadfiles >= MAX_WADFILES) + || (packetsize > sizeof(dummycheck->fileneeded))) + { + CONS_Alert(CONS_ERROR, M_GetText("Too many files loaded to add %s\n"), fn); + return; + } + } + WRITESTRINGN(buf_p,p,240); + // calculate and check md5 { UINT8 md5sum[16]; #ifdef NOMD5 @@ -3031,6 +3054,15 @@ static void Command_Addfile(void) } else // file not found return; + + for (i = 0; i < numwadfiles; i++) + { + if (!memcmp(wadfiles[i]->md5sum, md5sum, 16)) + { + CONS_Alert(CONS_ERROR, M_GetText("%s is already loaded\n"), fn); + return; + } + } #endif WRITEMEM(buf_p, md5sum, 16); } From 97af30ae4be2690b07a654d35dd31702dc40bbac Mon Sep 17 00:00:00 2001 From: Alam Arias Date: Mon, 25 Dec 2017 00:41:05 -0500 Subject: [PATCH 07/14] SRB2: disable Smaller Type Check for MSVC --- SRB2_Debug.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SRB2_Debug.props b/SRB2_Debug.props index 2c16f7cb..8be11c58 100644 --- a/SRB2_Debug.props +++ b/SRB2_Debug.props @@ -17,7 +17,7 @@ MultiThreadedDebugDLL true All - true + false EnableFastChecks From e2b604fdfd4bf92cf06837662d10c0cc2b485bc4 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Tue, 26 Dec 2017 19:56:50 -0500 Subject: [PATCH 08/14] TCP: remove BADSOCKET --- src/i_tcp.c | 21 +++++++-------- src/mserv.c | 64 +++++++++++++++++++++----------------------- src/win32/win_main.c | 4 +-- src/win32/win_sys.c | 8 +++--- src/win32/win_vid.c | 1 + 5 files changed, 47 insertions(+), 51 deletions(-) diff --git a/src/i_tcp.c b/src/i_tcp.c index 3d55236e..6488e984 100644 --- a/src/i_tcp.c +++ b/src/i_tcp.c @@ -215,7 +215,6 @@ static UINT8 UPNP_support = TRUE; #if defined (USE_WINSOCK) && !defined (NONET) typedef SOCKET SOCKET_TYPE; -#define BADSOCKET INVALID_SOCKET #define ERRSOCKET (SOCKET_ERROR) #else #if (defined (__unix__) && !defined (MSDOS)) || defined (__APPLE__) || defined (__HAIKU__) || defined(_PS3) @@ -223,7 +222,6 @@ typedef int SOCKET_TYPE; #else typedef unsigned long SOCKET_TYPE; #endif -#define BADSOCKET (SOCKET_TYPE)(~0) #define ERRSOCKET (-1) #endif @@ -232,10 +230,10 @@ typedef int socklen_t; #endif #ifndef NONET -static SOCKET_TYPE mysockets[MAXNETNODES+1] = {BADSOCKET}; +static SOCKET_TYPE mysockets[MAXNETNODES+1] = {ERRSOCKET}; static size_t mysocketses = 0; static int myfamily[MAXNETNODES+1] = {0}; -static SOCKET_TYPE nodesocket[MAXNETNODES+1] = {BADSOCKET}; +static SOCKET_TYPE nodesocket[MAXNETNODES+1] = {ERRSOCKET}; static mysockaddr_t clientaddress[MAXNETNODES+1]; static mysockaddr_t broadcastaddress[MAXNETNODES+1]; static size_t broadcastaddresses = 0; @@ -647,7 +645,7 @@ static boolean FD_CPY(fd_set *src, fd_set *dst, SOCKET_TYPE *fd, size_t len) FD_ZERO(dst); for (i = 0; i < len;i++) { - if(fd[i] != BADSOCKET && fd[i] != (SOCKET_TYPE)ERRSOCKET && + if(fd[i] != (SOCKET_TYPE)ERRSOCKET && FD_ISSET(fd[i], src) && !FD_ISSET(fd[i], dst)) // no checking for dups { FD_SET(fd[i], dst); @@ -725,7 +723,7 @@ static void SOCK_Send(void) } return; } - else if (nodesocket[doomcom->remotenode] == BADSOCKET) + else if (nodesocket[doomcom->remotenode] == (SOCKET_TYPE)ERRSOCKET) { for (i = 0; i < mysocketses; i++) { @@ -777,7 +775,7 @@ static void SOCK_FreeNodenum(INT32 numnode) DEBFILE(va("Free node %d (%s)\n", numnode, SOCK_GetNodeAddress(numnode))); nodeconnected[numnode] = false; - nodesocket[numnode] = BADSOCKET; + nodesocket[numnode] = ERRSOCKET; // put invalid address memset(&clientaddress[numnode], 0, sizeof (clientaddress[numnode])); @@ -804,7 +802,7 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen #endif mysockaddr_t straddr; - if (s == (SOCKET_TYPE)ERRSOCKET || s == BADSOCKET) + if (s == (SOCKET_TYPE)ERRSOCKET) return (SOCKET_TYPE)ERRSOCKET; #ifdef USE_WINSOCK { // Alam_GBC: disable the new UDP connection reset behavior for Win2k and up @@ -911,9 +909,9 @@ static boolean UDP_Socket(void) for (s = 0; s < mysocketses; s++) - mysockets[s] = BADSOCKET; + mysockets[s] = ERRSOCKET; for (s = 0; s < MAXNETNODES+1; s++) - nodesocket[s] = BADSOCKET; + nodesocket[s] = ERRSOCKET; FD_ZERO(&masterset); s = 0; @@ -1250,7 +1248,6 @@ static void SOCK_CloseSocket(void) for (i=0; i < MAXNETNODES+1; i++) { if (mysockets[i] != (SOCKET_TYPE)ERRSOCKET - && mysockets[i] != BADSOCKET && FD_ISSET(mysockets[i], &masterset)) { #if !defined (__DJGPP__) || defined (WATTCP) @@ -1258,7 +1255,7 @@ static void SOCK_CloseSocket(void) close(mysockets[i]); #endif } - mysockets[i] = BADSOCKET; + mysockets[i] = ERRSOCKET; } } #endif diff --git a/src/mserv.c b/src/mserv.c index 76fba835..2bb2923d 100644 --- a/src/mserv.c +++ b/src/mserv.c @@ -102,35 +102,35 @@ #define PACKET_SIZE 1024 -#define MS_NO_ERROR 0 -#define MS_SOCKET_ERROR -201 -#define MS_CONNECT_ERROR -203 -#define MS_WRITE_ERROR -210 -#define MS_READ_ERROR -211 -#define MS_CLOSE_ERROR -212 -#define MS_GETHOSTBYNAME_ERROR -220 -#define MS_GETHOSTNAME_ERROR -221 -#define MS_TIMEOUT_ERROR -231 +#define MS_NO_ERROR 0 +#define MS_SOCKET_ERROR -201 +#define MS_CONNECT_ERROR -203 +#define MS_WRITE_ERROR -210 +#define MS_READ_ERROR -211 +#define MS_CLOSE_ERROR -212 +#define MS_GETHOSTBYNAME_ERROR -220 +#define MS_GETHOSTNAME_ERROR -221 +#define MS_TIMEOUT_ERROR -231 // see master server code for the values -#define ADD_SERVER_MSG 101 -#define REMOVE_SERVER_MSG 103 -#define ADD_SERVERv2_MSG 104 -#define GET_SERVER_MSG 200 -#define GET_SHORT_SERVER_MSG 205 -#define ASK_SERVER_MSG 206 -#define ANSWER_ASK_SERVER_MSG 207 -#define ASK_SERVER_MSG 206 -#define ANSWER_ASK_SERVER_MSG 207 -#define GET_MOTD_MSG 208 -#define SEND_MOTD_MSG 209 -#define GET_ROOMS_MSG 210 -#define SEND_ROOMS_MSG 211 -#define GET_ROOMS_HOST_MSG 212 -#define GET_VERSION_MSG 213 -#define SEND_VERSION_MSG 214 -#define GET_BANNED_MSG 215 // Someone's been baaaaaad! -#define PING_SERVER_MSG 216 +#define ADD_SERVER_MSG 101 +#define REMOVE_SERVER_MSG 103 +#define ADD_SERVERv2_MSG 104 +#define GET_SERVER_MSG 200 +#define GET_SHORT_SERVER_MSG 205 +#define ASK_SERVER_MSG 206 +#define ANSWER_ASK_SERVER_MSG 207 +#define ASK_SERVER_MSG 206 +#define ANSWER_ASK_SERVER_MSG 207 +#define GET_MOTD_MSG 208 +#define SEND_MOTD_MSG 209 +#define GET_ROOMS_MSG 210 +#define SEND_ROOMS_MSG 211 +#define GET_ROOMS_HOST_MSG 212 +#define GET_VERSION_MSG 213 +#define SEND_VERSION_MSG 214 +#define GET_BANNED_MSG 215 // Someone's been baaaaaad! +#define PING_SERVER_MSG 216 #define HEADER_SIZE (sizeof (INT32)*4) @@ -217,7 +217,6 @@ UINT16 current_port = 0; #if (defined (_WIN32) || defined (_WIN32_WCE) || defined (_WIN32)) && !defined (NONET) typedef SOCKET SOCKET_TYPE; -#define BADSOCKET INVALID_SOCKET #define ERRSOCKET (SOCKET_ERROR) #else #if (defined (__unix__) && !defined (MSDOS)) || defined (__APPLE__) || defined (__HAIKU__) || defined (_PS3) @@ -225,7 +224,6 @@ typedef int SOCKET_TYPE; #else typedef unsigned long SOCKET_TYPE; #endif -#define BADSOCKET (SOCKET_TYPE)(~0) #define ERRSOCKET (-1) #endif @@ -234,7 +232,7 @@ typedef int socklen_t; #endif #ifndef NONET -static SOCKET_TYPE socket_fd = BADSOCKET; // WINSOCK socket +static SOCKET_TYPE socket_fd = ERRSOCKET; // WINSOCK socket static struct timeval select_timeout; static fd_set wset; static size_t recvfull(SOCKET_TYPE s, char *buf, size_t len, int flags); @@ -265,9 +263,9 @@ void AddMServCommands(void) static void CloseConnection(void) { #ifndef NONET - if (socket_fd != (SOCKET_TYPE)ERRSOCKET && socket_fd != BADSOCKET) + if (socket_fd != (SOCKET_TYPE)ERRSOCKET) close(socket_fd); - socket_fd = BADSOCKET; + socket_fd = ERRSOCKET; #endif } @@ -385,7 +383,7 @@ static INT32 MS_Connect(const char *ip_addr, const char *str_port, INT32 async) while (runp != NULL) { socket_fd = socket(runp->ai_family, runp->ai_socktype, runp->ai_protocol); - if (socket_fd != BADSOCKET && socket_fd != (SOCKET_TYPE)ERRSOCKET) + if (socket_fd != (SOCKET_TYPE)ERRSOCKET) { if (async) // do asynchronous connection { diff --git a/src/win32/win_main.c b/src/win32/win_main.c index 4ac05f94..4bb3df86 100644 --- a/src/win32/win_main.c +++ b/src/win32/win_main.c @@ -244,7 +244,7 @@ static LRESULT CALLBACK MainWndproc(HWND hWnd, UINT message, WPARAM wParam, LPAR D_PostEvent(&ev); return TRUE; } - + break; case WM_XBUTTONDOWN: if (nodinput) { @@ -253,7 +253,7 @@ static LRESULT CALLBACK MainWndproc(HWND hWnd, UINT message, WPARAM wParam, LPAR D_PostEvent(&ev); return TRUE; } - + break; case WM_MOUSEWHEEL: //I_OutputMsg("MW_WHEEL dispatched.\n"); ev.type = ev_keydown; diff --git a/src/win32/win_sys.c b/src/win32/win_sys.c index 80b89a6e..316da61d 100644 --- a/src/win32/win_sys.c +++ b/src/win32/win_sys.c @@ -2581,7 +2581,7 @@ acquire: UINT64 newbuttons = joybuttons ^ lastjoybuttons; lastjoybuttons = joybuttons; - for (i = 0; i < JOYBUTTONS && i < JOYBUTTONS_MAX; i++, j <<= 1) + for (i = 0; i < JOYBUTTONS_MIN; i++, j <<= 1) { if (newbuttons & j) // button changed state? { @@ -2601,7 +2601,7 @@ acquire: UINT64 newhats = joyhats ^ lastjoyhats; lastjoyhats = joyhats; - for (i = 0; i < JOYHATS*4 && i < JOYHATS_MAX*4; i++, j <<= 1) + for (i = 0; i < JOYHATS_MIN*4; i++, j <<= 1) { if (newhats & j) // button changed state? { @@ -2825,7 +2825,7 @@ acquire: UINT64 newbuttons = joybuttons ^ lastjoy2buttons; lastjoy2buttons = joybuttons; - for (i = 0; i < JOYBUTTONS && i < JOYBUTTONS_MAX; i++, j <<= 1) + for (i = 0; i < JOYBUTTONS_MIN; i++, j <<= 1) { if (newbuttons & j) // button changed state? { @@ -2845,7 +2845,7 @@ acquire: UINT64 newhats = joyhats ^ lastjoy2hats; lastjoy2hats = joyhats; - for (i = 0; i < JOYHATS*4 && i < JOYHATS_MAX*4; i++, j <<= 1) + for (i = 0; i < JOYHATS_MIN*4; i++, j <<= 1) { if (newhats & j) // button changed state? { diff --git a/src/win32/win_vid.c b/src/win32/win_vid.c index 0960bb6d..a9dd097b 100644 --- a/src/win32/win_vid.c +++ b/src/win32/win_vid.c @@ -322,6 +322,7 @@ static inline boolean I_SkipFrame(void) case GS_LEVEL: if (!paused) return false; + /* FALLTHRU */ case GS_TIMEATTACK: #ifndef CLIENT_LOADINGSCREEN case GS_WAITINGPLAYERS: From a29203acd8059d2428c1a2c414815a66a1d48b37 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Tue, 26 Dec 2017 20:24:08 -0500 Subject: [PATCH 09/14] Disable win_dbg --- src/sdl/i_main.c | 2 ++ src/win32/Makefile.cfg | 2 +- src/win32/win_main.c | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sdl/i_main.c b/src/sdl/i_main.c index f1cecad4..65b7b5ff 100644 --- a/src/sdl/i_main.c +++ b/src/sdl/i_main.c @@ -148,7 +148,9 @@ int main(int argc, char **argv) LoadLibraryA("exchndl.dll"); } } +#ifndef __MINGW32__ prevExceptionFilter = SetUnhandledExceptionFilter(RecordExceptionInfo); +#endif MakeCodeWritable(); #endif // startup SRB2 diff --git a/src/win32/Makefile.cfg b/src/win32/Makefile.cfg index 99b8bc9b..3560af0c 100644 --- a/src/win32/Makefile.cfg +++ b/src/win32/Makefile.cfg @@ -64,7 +64,7 @@ endif ifdef SDL i_system_o+=$(OBJDIR)/SRB2.res - i_main_o+=$(OBJDIR)/win_dbg.o + #i_main_o+=$(OBJDIR)/win_dbg.o ifndef NOHW OPTS+=-DUSE_WGL_SWAP endif diff --git a/src/win32/win_main.c b/src/win32/win_main.c index 4bb3df86..6c774f55 100644 --- a/src/win32/win_main.c +++ b/src/win32/win_main.c @@ -666,7 +666,9 @@ int WINAPI WinMain (HINSTANCE hInstance, #endif LoadLibraryA("exchndl.dll"); +#ifndef __MINGW32__ prevExceptionFilter = SetUnhandledExceptionFilter(RecordExceptionInfo); +#endif Result = HandledWinMain(hInstance); #ifdef BUGTRAP From f397b5fc3ff5395fc84c1aaa2fc2841d1092c131 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Tue, 26 Dec 2017 20:42:37 -0500 Subject: [PATCH 10/14] Makefile: disable win_dbg for DirectDraw --- src/win32/Makefile.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/win32/Makefile.cfg b/src/win32/Makefile.cfg index 3560af0c..749734a7 100644 --- a/src/win32/Makefile.cfg +++ b/src/win32/Makefile.cfg @@ -81,7 +81,8 @@ endif i_net_o=$(OBJDIR)/win_net.o i_system_o=$(OBJDIR)/win_sys.o $(OBJDIR)/SRB2.res i_sound_o=$(OBJDIR)/win_snd.o - i_main_o=$(OBJDIR)/win_dbg.o $(OBJDIR)/win_main.o + i_main_o=$(OBJDIR)/win_main.o + #i_main_o+=$(OBJDIR)/win_dbg.o OBJS=$(OBJDIR)/dx_error.o $(OBJDIR)/fabdxlib.o $(OBJDIR)/win_vid.o $(OBJDIR)/win_dll.o endif From 38561656233229536fb5bf8e5488191e470c495e Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Wed, 27 Dec 2017 13:18:20 -0500 Subject: [PATCH 11/14] Indentation cleanup --- src/d_netcmd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 041cb134..2abba77a 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -3914,23 +3914,23 @@ static void Command_Tunes_f(void) static void Command_RestartAudio_f(void) { - if (dedicated) { // No point in doing anything if game is a dedicated server. + if (dedicated) // No point in doing anything if game is a dedicated server. return; -} + S_StopMusic(); I_ShutdownMusic(); I_ShutdownSound(); I_StartupSound(); I_InitMusic(); -// These must be called or no sound and music untill manually set. +// These must be called or no sound and music until manually set. I_SetSfxVolume(cv_soundvolume.value); I_SetDigMusicVolume(cv_digmusicvolume.value); I_SetMIDIMusicVolume(cv_midimusicvolume.value); - if (Playing() && (!dedicated)) { // Gotta make sure the player is in a level + if (Playing() && (!dedicated)) // Gotta make sure the player is in a level P_RestoreMusic(&players[consoleplayer]); - } + } /** Quits a game and returns to the title screen. From 875446295b6abdd60731bb46be546cab413513c2 Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Wed, 27 Dec 2017 16:36:57 -0500 Subject: [PATCH 12/14] Remove redundant !dedicated check --- src/d_netcmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 2abba77a..43b933cf 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -3928,7 +3928,7 @@ static void Command_RestartAudio_f(void) I_SetSfxVolume(cv_soundvolume.value); I_SetDigMusicVolume(cv_digmusicvolume.value); I_SetMIDIMusicVolume(cv_midimusicvolume.value); - if (Playing() && (!dedicated)) // Gotta make sure the player is in a level + if (Playing()) // Gotta make sure the player is in a level P_RestoreMusic(&players[consoleplayer]); } From f6479894333a0521a08e5e5c9f4930f05f0142b9 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 27 Dec 2017 19:32:38 -0500 Subject: [PATCH 13/14] MSVC: set SubSystem on DLLs to Windows --- src/hardware/r_opengl/r_opengl-vc10.vcxproj | 4 ++++ src/hardware/s_openal/s_openal-vc10.vcxproj | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/hardware/r_opengl/r_opengl-vc10.vcxproj b/src/hardware/r_opengl/r_opengl-vc10.vcxproj index 43da2a3e..f04ae320 100644 --- a/src/hardware/r_opengl/r_opengl-vc10.vcxproj +++ b/src/hardware/r_opengl/r_opengl-vc10.vcxproj @@ -122,6 +122,7 @@ $(IntDir)r_opengl.lib MachineX86 + Windows true @@ -166,6 +167,7 @@ $(IntDir)r_opengl.lib MachineX64 + Windows true @@ -212,6 +214,7 @@ $(IntDir)r_opengl.lib MachineX86 + Windows true @@ -258,6 +261,7 @@ $(IntDir)r_opengl.lib MachineX64 + Windows true diff --git a/src/hardware/s_openal/s_openal-vc10.vcxproj b/src/hardware/s_openal/s_openal-vc10.vcxproj index 67d2d95a..8b4f6cbb 100644 --- a/src/hardware/s_openal/s_openal-vc10.vcxproj +++ b/src/hardware/s_openal/s_openal-vc10.vcxproj @@ -125,6 +125,7 @@ $(IntDir)s_openal.lib MachineX86 + Windows true @@ -170,6 +171,7 @@ $(IntDir)s_openal.lib MachineX64 + Windows true @@ -216,6 +218,7 @@ $(IntDir)s_openal.lib MachineX86 + Windows true @@ -262,6 +265,7 @@ $(IntDir)s_openal.lib MachineX64 + Windows true From 98d6619c36a250b85e97297811ce78e892fb8b98 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 27 Dec 2017 19:32:59 -0500 Subject: [PATCH 14/14] GIT: ignore .vs folder --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7b2304ec..922fac4a 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ Win32_LIB_ASM_Release *.user *.db *.opendb +/.vs