diff --git a/source/blood/src/blood.cpp b/source/blood/src/blood.cpp index 3993ec92b..8f4684f61 100644 --- a/source/blood/src/blood.cpp +++ b/source/blood/src/blood.cpp @@ -69,6 +69,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "view.h" #include "warp.h" #include "weapon.h" +#include "gameconfigfile.h" #ifdef _WIN32 # include @@ -187,8 +188,8 @@ void ShutDown(void) { if (!in3dmode()) return; - CONFIG_WriteSetup(0); - netDeinitialize(); + G_SaveConfig(); + netDeinitialize(); sndTerm(); sfxTerm(); scrUnInit(); @@ -211,7 +212,7 @@ void ShutDown(void) void QuitGame(void) { ShutDown(); - exit(0); + Bexit(0); } void PrecacheDude(spritetype *pSprite) @@ -2584,7 +2585,7 @@ GameInterface Interface = { startwin_idle, startwin_run, G_DefaultDefFile, - G_DefFile + G_DefFile, }; END_BLD_NS diff --git a/source/build/src/sdlayer.cpp b/source/build/src/sdlayer.cpp index 31cb33270..cf8382be5 100644 --- a/source/build/src/sdlayer.cpp +++ b/source/build/src/sdlayer.cpp @@ -627,7 +627,6 @@ int main(int argc, char *argv[]) // Just let the rest of the function execute. r = exit.Reason(); } - G_SaveConfig(); startwin_close(); @@ -1572,6 +1571,16 @@ int32_t videoSetMode(int32_t x, int32_t y, int32_t c, int32_t fs) { int32_t regrab = 0, ret; + // SDL's fullscreen is a deadly trap in the debugger. +#ifdef _DEBUG + if (fs) + { + fs = false; + x -= 10; + y -= 10; + } +#endif + if (called++) { assert(0); diff --git a/source/common/gameconfigfile.cpp b/source/common/gameconfigfile.cpp index 0989f848f..0d039f3d5 100644 --- a/source/common/gameconfigfile.cpp +++ b/source/common/gameconfigfile.cpp @@ -424,7 +424,7 @@ void FGameConfigFile::ArchiveGameData (const char *gamename) //AutomapBindings.ArchiveBindings (this); #else strcpy(subsection, "Bindings"); - if (SetSection(section)) + if (SetSection(section, true)) { for (int i = 0; i < MAXBOUNDKEYS + MAXMOUSEBUTTONS; i++) { @@ -436,11 +436,11 @@ void FGameConfigFile::ArchiveGameData (const char *gamename) } strncpy(subsection, "ConsoleAliases", sublen); - if (SetSection(section)) + if (SetSection(section, true)) { for (auto& symb : osd->symbptrs) { - if (symb == NULL) + if (symb == NULL || symb->name == nullptr ||symb->help == nullptr) break; SetValueForKey(symb->name, symb->help); diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index 76194b67e..b0c2e419b 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -43,6 +43,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "cmdline.h" #include "palette.h" #include "gamecvars.h" +#include "gameconfigfile.h" #include "vfs.h" @@ -5796,8 +5797,8 @@ static void G_Cleanup(void) void G_Shutdown(void) { - CONFIG_WriteSetup(0); - S_SoundShutdown(); + G_SaveConfig(); + S_SoundShutdown(); S_MusicShutdown(); CONTROL_Shutdown(); KB_Shutdown(); @@ -7176,7 +7177,9 @@ GameInterface Interface = { startwin_puts, startwin_settitle, startwin_idle, - startwin_run + startwin_run, + G_DefaultDefFile, + G_DefFile, }; END_DUKE_NS diff --git a/source/rr/src/game.cpp b/source/rr/src/game.cpp index cfd30e617..6ddc8cffc 100644 --- a/source/rr/src/game.cpp +++ b/source/rr/src/game.cpp @@ -43,6 +43,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "cmdline.h" #include "palette.h" #include "gamecvars.h" +#include "gameconfigfile.h" // Uncomment to prevent anything except mirrors from drawing. It is sensible to @@ -7147,8 +7148,8 @@ static void G_Cleanup(void) void G_Shutdown(void) { - CONFIG_WriteSetup(0); - S_SoundShutdown(); + G_SaveConfig(); + S_SoundShutdown(); S_MusicShutdown(); CONTROL_Shutdown(); KB_Shutdown(); @@ -8623,6 +8624,9 @@ GameInterface Interface = { startwin_puts, startwin_settitle, startwin_idle, - startwin_run + startwin_run, + G_DefaultDefFile, + G_DefFile, + }; END_RR_NS diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index 9734af89b..86d930acc 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -5936,7 +5936,9 @@ GameInterface Interface = { startwin_puts, startwin_settitle, startwin_idle, - startwin_run + startwin_run, + G_DefFile, + G_DefFile, }; // vim:ts=4:sw=4:expandtab: diff --git a/wadsrc/static/filter/game-duke/demolition/leftbinds.txt b/wadsrc/static/filter/game-duke/demolition/leftbinds.txt index a4d408a97..e3627baa5 100644 --- a/wadsrc/static/filter/game-duke/demolition/leftbinds.txt +++ b/wadsrc/static/filter/game-duke/demolition/leftbinds.txt @@ -9,10 +9,10 @@ "Alt_Fire" "Jump", "A", "KPad-" "Crouch", "Z" -"Look_Up", "PgUp", "Kpad9" -"Look_Down", "PgDn", "Kpad3" -"Look_Left", "Insert", "Kpad0" -"Look_Right", "Delete", "Kpad." +"Look_Up", "PgUp" +"Look_Down", "PgDn" +"Look_Left", "Insert" +"Look_Right", "Delete" "Strafe_Left", ",", "KPad7" "Strafe_Right", ".", "KPad9" "Aim_Up", "Home"