mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 08:47:17 +01:00
Allow the option to toggle debugging from configuration file.
This commit is contained in:
parent
c76acc07dc
commit
6a31e9ee58
@ -59,6 +59,7 @@ Core::Core()
|
|||||||
, m_ReloadPayload()
|
, m_ReloadPayload()
|
||||||
, m_IncomingNameBuffer(nullptr)
|
, m_IncomingNameBuffer(nullptr)
|
||||||
, m_IncomingNameCapacity(0)
|
, m_IncomingNameCapacity(0)
|
||||||
|
, m_Debugging(false)
|
||||||
{
|
{
|
||||||
/* ... */
|
/* ... */
|
||||||
}
|
}
|
||||||
@ -160,6 +161,8 @@ bool Core::Initialize()
|
|||||||
DefaultVM::Set(m_VM);
|
DefaultVM::Set(m_VM);
|
||||||
// Configure error handling
|
// Configure error handling
|
||||||
ErrorHandling::Enable(conf.GetBoolValue("Squirrel", "ErrorHandling", true));
|
ErrorHandling::Enable(conf.GetBoolValue("Squirrel", "ErrorHandling", true));
|
||||||
|
// See if debugging options should be enabled
|
||||||
|
m_Debugging = conf.GetBoolValue("Squirrel", "Debugging", false);
|
||||||
|
|
||||||
LogDbg("Registering the standard libraries");
|
LogDbg("Registering the standard libraries");
|
||||||
// Push the root table on the stack
|
// Push the root table on the stack
|
||||||
@ -451,7 +454,7 @@ bool Core::LoadScript(CSStr filepath)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Create a new script container and insert it into the script pool
|
// Create a new script container and insert it into the script pool
|
||||||
m_Scripts.emplace_back(m_VM, path, false);
|
m_Scripts.emplace_back(m_VM, path, m_Debugging);
|
||||||
}
|
}
|
||||||
// At this point the script exists in the pool
|
// At this point the script exists in the pool
|
||||||
return true;
|
return true;
|
||||||
|
@ -390,6 +390,9 @@ private:
|
|||||||
CStr m_IncomingNameBuffer; // Name of an incoming connection.
|
CStr m_IncomingNameBuffer; // Name of an incoming connection.
|
||||||
size_t m_IncomingNameCapacity; // Incoming connection name size.
|
size_t m_IncomingNameCapacity; // Incoming connection name size.
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------------------------
|
||||||
|
bool m_Debugging; // Enable debugging features, if any.
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user