mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-11-26 14:21:18 +00:00
Restore C++98 compatibility (NULL instead of nullptr)
and print a message when libcurl has been found
This commit is contained in:
parent
4d12093a54
commit
06ff49c6b6
6 changed files with 11 additions and 8 deletions
|
@ -184,6 +184,7 @@ find_package(CURL QUIET)
|
||||||
if(CURL_FOUND)
|
if(CURL_FOUND)
|
||||||
set(ID_ENABLE_CURL ON)
|
set(ID_ENABLE_CURL ON)
|
||||||
include_directories(${CURL_INCLUDE_DIR})
|
include_directories(${CURL_INCLUDE_DIR})
|
||||||
|
message(STATUS "libcurl found and enabled")
|
||||||
else()
|
else()
|
||||||
message(WARNING "libcurl not found, server downloads won't be available (apart from that dhewm3 will work)")
|
message(WARNING "libcurl not found, server downloads won't be available (apart from that dhewm3 will work)")
|
||||||
set(ID_ENABLE_CURL OFF)
|
set(ID_ENABLE_CURL OFF)
|
||||||
|
|
|
@ -305,7 +305,7 @@ void idGameLocal::Clear( void ) {
|
||||||
static bool ( *updateDebuggerFnPtr )( idInterpreter *interpreter, idProgram *program, int instructionPointer ) = NULL;
|
static bool ( *updateDebuggerFnPtr )( idInterpreter *interpreter, idProgram *program, int instructionPointer ) = NULL;
|
||||||
bool updateGameDebugger( idInterpreter *interpreter, idProgram *program, int instructionPointer ) {
|
bool updateGameDebugger( idInterpreter *interpreter, idProgram *program, int instructionPointer ) {
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
if ( interpreter != nullptr && program != nullptr ) {
|
if ( interpreter != NULL && program != NULL ) {
|
||||||
ret = updateDebuggerFnPtr ? updateDebuggerFnPtr( interpreter , program, instructionPointer ) : false;
|
ret = updateDebuggerFnPtr ? updateDebuggerFnPtr( interpreter , program, instructionPointer ) : false;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -273,7 +273,7 @@ bool IsDoom3DemoVersion()
|
||||||
static bool ( *updateDebuggerFnPtr )( idInterpreter *interpreter, idProgram *program, int instructionPointer ) = NULL;
|
static bool ( *updateDebuggerFnPtr )( idInterpreter *interpreter, idProgram *program, int instructionPointer ) = NULL;
|
||||||
bool updateGameDebugger( idInterpreter *interpreter, idProgram *program, int instructionPointer ) {
|
bool updateGameDebugger( idInterpreter *interpreter, idProgram *program, int instructionPointer ) {
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
if ( interpreter != nullptr && program != nullptr ) {
|
if ( interpreter != NULL && program != NULL ) {
|
||||||
ret = updateDebuggerFnPtr ? updateDebuggerFnPtr( interpreter, program, instructionPointer ) : false;
|
ret = updateDebuggerFnPtr ? updateDebuggerFnPtr( interpreter, program, instructionPointer ) : false;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -29,6 +29,7 @@ If you have questions concerning this license or the applicable additional terms
|
||||||
#include "sys/platform.h"
|
#include "sys/platform.h"
|
||||||
|
|
||||||
#include "sound/snd_local.h"
|
#include "sound/snd_local.h"
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
#ifdef ID_DEDICATED
|
#ifdef ID_DEDICATED
|
||||||
idCVar idSoundSystemLocal::s_noSound( "s_noSound", "1", CVAR_SOUND | CVAR_BOOL | CVAR_ROM, "" );
|
idCVar idSoundSystemLocal::s_noSound( "s_noSound", "1", CVAR_SOUND | CVAR_BOOL | CVAR_ROM, "" );
|
||||||
|
|
|
@ -59,7 +59,8 @@ If you have questions concerning this license or the applicable additional terms
|
||||||
#define SDLK_PRINTSCREEN SDLK_PRINT
|
#define SDLK_PRINTSCREEN SDLK_PRINT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char *kbdNames[] = {
|
// NOTE: g++-4.7 doesn't like when this is static (for idCmdSystem::ArgCompletion_String<kbdNames>)
|
||||||
|
const char *kbdNames[] = {
|
||||||
#if SDL_VERSION_ATLEAST(2, 0, 0) // auto-detection is only available for SDL2
|
#if SDL_VERSION_ATLEAST(2, 0, 0) // auto-detection is only available for SDL2
|
||||||
"auto",
|
"auto",
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -187,13 +187,13 @@ bool rvDebuggerServer::ProcessMessages ( void )
|
||||||
case DBMSG_CONNECT:
|
case DBMSG_CONNECT:
|
||||||
mConnected = true;
|
mConnected = true;
|
||||||
SendMessage ( DBMSG_CONNECTED );
|
SendMessage ( DBMSG_CONNECTED );
|
||||||
HandleInspectScripts ( nullptr );
|
HandleInspectScripts ( NULL );
|
||||||
com_editors |= EDITOR_DEBUGGER;
|
com_editors |= EDITOR_DEBUGGER;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DBMSG_CONNECTED:
|
case DBMSG_CONNECTED:
|
||||||
mConnected = true;
|
mConnected = true;
|
||||||
HandleInspectScripts( nullptr );
|
HandleInspectScripts( NULL );
|
||||||
com_editors |= EDITOR_DEBUGGER;
|
com_editors |= EDITOR_DEBUGGER;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -555,7 +555,7 @@ void rvDebuggerServer::CheckBreakpoints ( idInterpreter* interpreter, idProgram*
|
||||||
// See if we are supposed to break on the next script line
|
// See if we are supposed to break on the next script line
|
||||||
if ( mBreakNext )
|
if ( mBreakNext )
|
||||||
{
|
{
|
||||||
HandleInspectScripts(nullptr);
|
HandleInspectScripts(NULL);
|
||||||
Break ( interpreter, program, instructionPointer );
|
Break ( interpreter, program, instructionPointer );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -574,7 +574,7 @@ void rvDebuggerServer::CheckBreakpoints ( idInterpreter* interpreter, idProgram*
|
||||||
// See if we are supposed to break on the next line
|
// See if we are supposed to break on the next line
|
||||||
if ( mBreakStepInto )
|
if ( mBreakStepInto )
|
||||||
{
|
{
|
||||||
HandleInspectScripts(nullptr);
|
HandleInspectScripts(NULL);
|
||||||
// Break
|
// Break
|
||||||
Break ( interpreter, program, instructionPointer );
|
Break ( interpreter, program, instructionPointer );
|
||||||
return;
|
return;
|
||||||
|
@ -625,7 +625,7 @@ void rvDebuggerServer::CheckBreakpoints ( idInterpreter* interpreter, idProgram*
|
||||||
// Pop out of the critical section so we dont get stuck
|
// Pop out of the critical section so we dont get stuck
|
||||||
SDL_UnlockMutex( mCriticalSection );
|
SDL_UnlockMutex( mCriticalSection );
|
||||||
|
|
||||||
HandleInspectScripts(nullptr);
|
HandleInspectScripts(NULL);
|
||||||
// We hit a breakpoint, so break
|
// We hit a breakpoint, so break
|
||||||
Break ( interpreter, program, instructionPointer );
|
Break ( interpreter, program, instructionPointer );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue