mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
- Added a vmengine console command to switch the VM engine at runtime.
SVN r2164 (scripting)
This commit is contained in:
parent
6f1bf257e9
commit
873ece3d55
2 changed files with 37 additions and 0 deletions
|
@ -923,3 +923,31 @@ CCMD(nextsecret)
|
||||||
Printf("no next secret map!\n");
|
Printf("no next secret map!\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
CCMD(vmengine)
|
||||||
|
{
|
||||||
|
if (argv.argc() == 2)
|
||||||
|
{
|
||||||
|
if (stricmp(argv[1], "default") == 0)
|
||||||
|
{
|
||||||
|
VMSelectEngine(VMEngine_Default);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if (stricmp(argv[1], "checked") == 0)
|
||||||
|
{
|
||||||
|
VMSelectEngine(VMEngine_Checked);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if (stricmp(argv[1], "unchecked") == 0)
|
||||||
|
{
|
||||||
|
VMSelectEngine(VMEngine_Unchecked);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Printf("Usage: vmengine <default|checked|unchecked>\n");
|
||||||
|
}
|
||||||
|
|
|
@ -114,6 +114,15 @@ VMExec_Checked::Exec
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
|
//===========================================================================
|
||||||
|
//
|
||||||
|
// VMSelectEngine
|
||||||
|
//
|
||||||
|
// Selects the VM engine, either checked or unchecked. Default will decide
|
||||||
|
// based on the NDEBUG preprocessor definition.
|
||||||
|
//
|
||||||
|
//===========================================================================
|
||||||
|
|
||||||
void VMSelectEngine(EVMEngine engine)
|
void VMSelectEngine(EVMEngine engine)
|
||||||
{
|
{
|
||||||
switch (engine)
|
switch (engine)
|
||||||
|
|
Loading…
Reference in a new issue