Skip to content

Commit

Permalink
win32: try to minimize game window at break point, useful when debugg…
Browse files Browse the repository at this point in the history
…ing from full-screen crashes
  • Loading branch information
ec- committed Jan 25, 2025
1 parent a33f41f commit 01eaea8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/qcommon/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <sys/time.h>
#else
#include <winsock.h>
#if defined(_DEBUG)
#include "../win32/win_local.h"
#endif
#endif

#include "../client/keys.h"
Expand Down Expand Up @@ -290,6 +293,7 @@ void NORETURN FORMAT_PRINTF(2, 3) QDECL Com_Error( errorParm_t code, const char
#if defined(_WIN32) && defined(_DEBUG)
if ( code != ERR_DISCONNECT && code != ERR_NEED_CD ) {
if ( !com_noErrorInterrupt->integer ) {
ShowWindow( g_wv.hWnd, SW_MINIMIZE );
DebugBreak();
}
}
Expand Down

0 comments on commit 01eaea8

Please sign in to comment.