mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-13 07:58:04 +00:00
- the config finally get saved.
Still with a few errors, though.
This commit is contained in:
parent
731671c401
commit
db1a9a9363
7 changed files with 38 additions and 19 deletions
|
@ -69,6 +69,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
#include "warp.h"
|
#include "warp.h"
|
||||||
#include "weapon.h"
|
#include "weapon.h"
|
||||||
|
#include "gameconfigfile.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
# include <shellapi.h>
|
# include <shellapi.h>
|
||||||
|
@ -187,7 +188,7 @@ void ShutDown(void)
|
||||||
{
|
{
|
||||||
if (!in3dmode())
|
if (!in3dmode())
|
||||||
return;
|
return;
|
||||||
CONFIG_WriteSetup(0);
|
G_SaveConfig();
|
||||||
netDeinitialize();
|
netDeinitialize();
|
||||||
sndTerm();
|
sndTerm();
|
||||||
sfxTerm();
|
sfxTerm();
|
||||||
|
@ -211,7 +212,7 @@ void ShutDown(void)
|
||||||
void QuitGame(void)
|
void QuitGame(void)
|
||||||
{
|
{
|
||||||
ShutDown();
|
ShutDown();
|
||||||
exit(0);
|
Bexit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrecacheDude(spritetype *pSprite)
|
void PrecacheDude(spritetype *pSprite)
|
||||||
|
@ -2584,7 +2585,7 @@ GameInterface Interface = {
|
||||||
startwin_idle,
|
startwin_idle,
|
||||||
startwin_run,
|
startwin_run,
|
||||||
G_DefaultDefFile,
|
G_DefaultDefFile,
|
||||||
G_DefFile
|
G_DefFile,
|
||||||
};
|
};
|
||||||
|
|
||||||
END_BLD_NS
|
END_BLD_NS
|
||||||
|
|
|
@ -627,7 +627,6 @@ int main(int argc, char *argv[])
|
||||||
// Just let the rest of the function execute.
|
// Just let the rest of the function execute.
|
||||||
r = exit.Reason();
|
r = exit.Reason();
|
||||||
}
|
}
|
||||||
G_SaveConfig();
|
|
||||||
|
|
||||||
startwin_close();
|
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;
|
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++)
|
if (called++)
|
||||||
{
|
{
|
||||||
assert(0);
|
assert(0);
|
||||||
|
|
|
@ -424,7 +424,7 @@ void FGameConfigFile::ArchiveGameData (const char *gamename)
|
||||||
//AutomapBindings.ArchiveBindings (this);
|
//AutomapBindings.ArchiveBindings (this);
|
||||||
#else
|
#else
|
||||||
strcpy(subsection, "Bindings");
|
strcpy(subsection, "Bindings");
|
||||||
if (SetSection(section))
|
if (SetSection(section, true))
|
||||||
{
|
{
|
||||||
for (int i = 0; i < MAXBOUNDKEYS + MAXMOUSEBUTTONS; i++)
|
for (int i = 0; i < MAXBOUNDKEYS + MAXMOUSEBUTTONS; i++)
|
||||||
{
|
{
|
||||||
|
@ -436,11 +436,11 @@ void FGameConfigFile::ArchiveGameData (const char *gamename)
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(subsection, "ConsoleAliases", sublen);
|
strncpy(subsection, "ConsoleAliases", sublen);
|
||||||
if (SetSection(section))
|
if (SetSection(section, true))
|
||||||
{
|
{
|
||||||
for (auto& symb : osd->symbptrs)
|
for (auto& symb : osd->symbptrs)
|
||||||
{
|
{
|
||||||
if (symb == NULL)
|
if (symb == NULL || symb->name == nullptr ||symb->help == nullptr)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
SetValueForKey(symb->name, symb->help);
|
SetValueForKey(symb->name, symb->help);
|
||||||
|
|
|
@ -43,6 +43,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "cmdline.h"
|
#include "cmdline.h"
|
||||||
#include "palette.h"
|
#include "palette.h"
|
||||||
#include "gamecvars.h"
|
#include "gamecvars.h"
|
||||||
|
#include "gameconfigfile.h"
|
||||||
|
|
||||||
#include "vfs.h"
|
#include "vfs.h"
|
||||||
|
|
||||||
|
@ -5796,7 +5797,7 @@ static void G_Cleanup(void)
|
||||||
|
|
||||||
void G_Shutdown(void)
|
void G_Shutdown(void)
|
||||||
{
|
{
|
||||||
CONFIG_WriteSetup(0);
|
G_SaveConfig();
|
||||||
S_SoundShutdown();
|
S_SoundShutdown();
|
||||||
S_MusicShutdown();
|
S_MusicShutdown();
|
||||||
CONTROL_Shutdown();
|
CONTROL_Shutdown();
|
||||||
|
@ -7176,7 +7177,9 @@ GameInterface Interface = {
|
||||||
startwin_puts,
|
startwin_puts,
|
||||||
startwin_settitle,
|
startwin_settitle,
|
||||||
startwin_idle,
|
startwin_idle,
|
||||||
startwin_run
|
startwin_run,
|
||||||
|
G_DefaultDefFile,
|
||||||
|
G_DefFile,
|
||||||
};
|
};
|
||||||
|
|
||||||
END_DUKE_NS
|
END_DUKE_NS
|
||||||
|
|
|
@ -43,6 +43,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "cmdline.h"
|
#include "cmdline.h"
|
||||||
#include "palette.h"
|
#include "palette.h"
|
||||||
#include "gamecvars.h"
|
#include "gamecvars.h"
|
||||||
|
#include "gameconfigfile.h"
|
||||||
|
|
||||||
|
|
||||||
// Uncomment to prevent anything except mirrors from drawing. It is sensible to
|
// Uncomment to prevent anything except mirrors from drawing. It is sensible to
|
||||||
|
@ -7147,7 +7148,7 @@ static void G_Cleanup(void)
|
||||||
|
|
||||||
void G_Shutdown(void)
|
void G_Shutdown(void)
|
||||||
{
|
{
|
||||||
CONFIG_WriteSetup(0);
|
G_SaveConfig();
|
||||||
S_SoundShutdown();
|
S_SoundShutdown();
|
||||||
S_MusicShutdown();
|
S_MusicShutdown();
|
||||||
CONTROL_Shutdown();
|
CONTROL_Shutdown();
|
||||||
|
@ -8623,6 +8624,9 @@ GameInterface Interface = {
|
||||||
startwin_puts,
|
startwin_puts,
|
||||||
startwin_settitle,
|
startwin_settitle,
|
||||||
startwin_idle,
|
startwin_idle,
|
||||||
startwin_run
|
startwin_run,
|
||||||
|
G_DefaultDefFile,
|
||||||
|
G_DefFile,
|
||||||
|
|
||||||
};
|
};
|
||||||
END_RR_NS
|
END_RR_NS
|
||||||
|
|
|
@ -5936,7 +5936,9 @@ GameInterface Interface = {
|
||||||
startwin_puts,
|
startwin_puts,
|
||||||
startwin_settitle,
|
startwin_settitle,
|
||||||
startwin_idle,
|
startwin_idle,
|
||||||
startwin_run
|
startwin_run,
|
||||||
|
G_DefFile,
|
||||||
|
G_DefFile,
|
||||||
};
|
};
|
||||||
|
|
||||||
// vim:ts=4:sw=4:expandtab:
|
// vim:ts=4:sw=4:expandtab:
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
"Alt_Fire"
|
"Alt_Fire"
|
||||||
"Jump", "A", "KPad-"
|
"Jump", "A", "KPad-"
|
||||||
"Crouch", "Z"
|
"Crouch", "Z"
|
||||||
"Look_Up", "PgUp", "Kpad9"
|
"Look_Up", "PgUp"
|
||||||
"Look_Down", "PgDn", "Kpad3"
|
"Look_Down", "PgDn"
|
||||||
"Look_Left", "Insert", "Kpad0"
|
"Look_Left", "Insert"
|
||||||
"Look_Right", "Delete", "Kpad."
|
"Look_Right", "Delete"
|
||||||
"Strafe_Left", ",", "KPad7"
|
"Strafe_Left", ",", "KPad7"
|
||||||
"Strafe_Right", ".", "KPad9"
|
"Strafe_Right", ".", "KPad9"
|
||||||
"Aim_Up", "Home"
|
"Aim_Up", "Home"
|
||||||
|
|
Loading…
Reference in a new issue