Skip to content

Commit

Permalink
M_SaveDefaults is also not part of the common engine backend.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Nov 23, 2024
1 parent ca3b073 commit e0778e2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/common/scripting/interface/vmnatives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include "c_cvars.h"
#include "c_bind.h"
#include "c_dispatch.h"
#include "m_misc.h"

#include "menu.h"
#include "vm.h"
Expand Down Expand Up @@ -1033,17 +1032,6 @@ DEFINE_ACTION_FUNCTION(_CVar, FindCVar)
ACTION_RETURN_POINTER(FindCVar(name.GetChars(), nullptr));
}

static int SaveConfig()
{
return M_SaveDefaults(nullptr);
}

DEFINE_ACTION_FUNCTION_NATIVE(_CVar, SaveConfig, SaveConfig)
{
PARAM_PROLOGUE;
ACTION_RETURN_INT(M_SaveDefaults(nullptr));
}

//=============================================================================
//
//
Expand Down
12 changes: 12 additions & 0 deletions src/m_misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@

#include "gameconfigfile.h"
#include "gstrings.h"
#include "vm.h"

FGameConfigFile *GameConfig;

Expand Down Expand Up @@ -691,3 +692,14 @@ CCMD(openscreenshots)
I_OpenShellFolder(autoname.GetChars());
}

static int SaveConfig()
{
return M_SaveDefaults(nullptr);
}

DEFINE_ACTION_FUNCTION_NATIVE(_CVar, SaveConfig, SaveConfig)
{
PARAM_PROLOGUE;
ACTION_RETURN_INT(M_SaveDefaults(nullptr));
}

0 comments on commit e0778e2

Please sign in to comment.