From e0778e23eb3115e623bac212366981680c6c051c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 23 Nov 2024 20:26:06 +0100 Subject: [PATCH] M_SaveDefaults is also not part of the common engine backend. --- src/common/scripting/interface/vmnatives.cpp | 12 ------------ src/m_misc.cpp | 12 ++++++++++++ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/common/scripting/interface/vmnatives.cpp b/src/common/scripting/interface/vmnatives.cpp index c778364ed5..2b57ceb25a 100644 --- a/src/common/scripting/interface/vmnatives.cpp +++ b/src/common/scripting/interface/vmnatives.cpp @@ -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" @@ -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)); -} - //============================================================================= // // diff --git a/src/m_misc.cpp b/src/m_misc.cpp index 1b451486bf..f8bafabadf 100644 --- a/src/m_misc.cpp +++ b/src/m_misc.cpp @@ -66,6 +66,7 @@ #include "gameconfigfile.h" #include "gstrings.h" +#include "vm.h" FGameConfigFile *GameConfig; @@ -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)); +} +