Merge branch 'Saturn-Next' into Saturn-Testing
This commit is contained in:
commit
aeb06a26ee
12 files changed
+67
-30
No files matched your search
+2
-2
@@ -655,7 +655,7 @@ static void COM_Alias_f(void)
|
||||
CONS_Printf(M_GetText("All aliases that start with \x87'%s'\x80 are:\n"), begin);
|
||||
|
||||
int count = 0;
|
||||
for (cmdalias_t *head = com_alias; head->next != NULL; head = head->next)
|
||||
for (cmdalias_t *head = com_alias; head != NULL; head = head->next)
|
||||
{
|
||||
if (strncmp(begin, head->name, szBegin) == 0)
|
||||
{
|
||||
@@ -676,7 +676,7 @@ static void COM_Alias_f(void)
|
||||
/* Display alias subtext, show all aliases. */
|
||||
CONS_Printf(M_GetText("alias <name> <command>: create a shortcut command that executes other command(s)\n"));
|
||||
|
||||
for (cmdalias_t *head = com_alias; head->next != NULL; head = head->next)
|
||||
for (cmdalias_t *head = com_alias; head != NULL; head = head->next)
|
||||
{
|
||||
CONS_Printf(alias_format, head->name, head->value);
|
||||
}
|
||||
|
||||
@@ -1777,6 +1777,9 @@ static void SV_SendPlayerInfo(INT32 node)
|
||||
|
||||
static void SV_SendMapIcon(INT32 node)
|
||||
{
|
||||
if (node == 0)
|
||||
return;
|
||||
|
||||
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||
|
||||
const char *map = va("%sP", G_BuildMapName(gamemap));
|
||||
|
||||
@@ -679,6 +679,9 @@ void D_SRB2Loop(void)
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if (I_Interrupted())
|
||||
I_Quit();
|
||||
|
||||
// capbudget is the minimum precise_t duration of a single loop iteration
|
||||
precise_t capbudget;
|
||||
precise_t elapsed;
|
||||
|
||||
@@ -1075,11 +1075,19 @@ FUNCNORETURN static ATTRNORETURN void signal_handler(INT32 num)
|
||||
}
|
||||
#endif
|
||||
|
||||
FUNCNORETURN static ATTRNORETURN void quit_handler(int num)
|
||||
static volatile sig_atomic_t interrupted = 0;
|
||||
|
||||
boolean I_Interrupted(void)
|
||||
{
|
||||
return interrupted;
|
||||
}
|
||||
|
||||
static void quit_handler(int num)
|
||||
{
|
||||
signal(num, SIG_DFL); //default signal action
|
||||
raise(num);
|
||||
I_Quit();
|
||||
//I_Quit();
|
||||
interrupted = true;
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBBACKTRACE
|
||||
|
||||
+11
-1
@@ -2795,7 +2795,7 @@ void G_DoPlayDemo(char *defdemoname)
|
||||
demobuf.p += 4; // Extrainfo location
|
||||
|
||||
// ...*map* not loaded?
|
||||
if (!gamemap || (gamemap > NUMMAPS) || !mapheaderinfo[gamemap-1] || !(mapheaderinfo[gamemap-1]->menuflags & LF2_EXISTSHACK))
|
||||
if (!gamemap || (gamemap > NUMMAPS) || (W_CheckNumForName(G_BuildMapName(gamemap)) == LUMPERROR))
|
||||
{
|
||||
snprintf(msg, 1024, M_GetText("%s features a course that is not currently loaded.\n"), pdemoname);
|
||||
CONS_Alert(CONS_ERROR, "%s", msg);
|
||||
@@ -2836,6 +2836,16 @@ void G_DoPlayDemo(char *defdemoname)
|
||||
return;
|
||||
}
|
||||
|
||||
// ...*map* not loaded?
|
||||
if (!gamemap || (gamemap > NUMMAPS) || !mapheaderinfo[gamemap-1] || !(mapheaderinfo[gamemap-1]->menuflags & LF2_EXISTSHACK))
|
||||
{
|
||||
snprintf(msg, 1024, M_GetText("%s features a course that is not currently loaded.\n"), pdemoname);
|
||||
CONS_Alert(CONS_ERROR, "%s", msg);
|
||||
M_StartMessage(msg, M_ReturnToTitleFromError, MM_EVENTHANDLER);
|
||||
G_ResetDemoPlayback();
|
||||
return;
|
||||
}
|
||||
|
||||
// Set color
|
||||
for (i = 0; i < MAXSKINCOLORS; i++)
|
||||
{
|
||||
|
||||
+2
-1
@@ -29,7 +29,6 @@ extern "C" {
|
||||
*/
|
||||
#define MAX_QUIT_FUNCS 16
|
||||
|
||||
|
||||
/** \brief Graphic system had started up
|
||||
*/
|
||||
extern UINT8 graphics_started;
|
||||
@@ -191,6 +190,8 @@ INT32 I_StartupSystem(void);
|
||||
*/
|
||||
void I_ShutdownSystem(void);
|
||||
|
||||
boolean I_Interrupted(void);
|
||||
|
||||
/** \brief The I_GetDiskFreeSpace function
|
||||
|
||||
\param freespace a INT64 pointer to hold the free space amount
|
||||
|
||||
+6
-4
@@ -49,17 +49,19 @@ aatree_t *M_AATreeAlloc(UINT32 flags)
|
||||
return aatree;
|
||||
}
|
||||
|
||||
static void M_AATreeFree_Node(aatree_node_t *node)
|
||||
static void M_AATreeFree_Node(aatree_node_t *node, bool is_string)
|
||||
{
|
||||
if (node->left) M_AATreeFree_Node(node->left);
|
||||
if (node->right) M_AATreeFree_Node(node->right);
|
||||
if (node->left) M_AATreeFree_Node(node->left, is_string);
|
||||
if (node->right) M_AATreeFree_Node(node->right, is_string);
|
||||
if (is_string)
|
||||
Z_Free(node->value);
|
||||
Z_Free(node);
|
||||
}
|
||||
|
||||
void M_AATreeFree(aatree_t *aatree)
|
||||
{
|
||||
if (aatree->root)
|
||||
M_AATreeFree_Node(aatree->root);
|
||||
M_AATreeFree_Node(aatree->root, (aatree->flags & AATREE_STRING) == AATREE_STRING);
|
||||
|
||||
Z_Free(aatree);
|
||||
}
|
||||
|
||||
@@ -812,6 +812,8 @@ static void P_LoadSectors(UINT8 *data)
|
||||
ss->tag = SHORT(ms->tag);
|
||||
|
||||
ss->flags |= SF_FLIPSPECIAL_FLOOR;
|
||||
|
||||
ss->soundorg.thinker.function = (actionf_p1)P_MobjThinker;
|
||||
}
|
||||
|
||||
// set the sky flat num
|
||||
|
||||
+6
-1
@@ -772,9 +772,14 @@ void S_UpdateSounds(void)
|
||||
volume = c->volume; // 8 bits internal volume precision
|
||||
sep = NORM_SEP;
|
||||
|
||||
if (P_MobjWasRemoved(c->origin))
|
||||
{
|
||||
// origin was removed, stop the music
|
||||
S_StopChannel(cnum);
|
||||
}
|
||||
// check non-local sounds for distance clipping
|
||||
// or modify their params
|
||||
if (c->origin)
|
||||
else
|
||||
{
|
||||
boolean itsUs = false;
|
||||
|
||||
|
||||
+18
-17
@@ -1670,21 +1670,19 @@ FUNCNORETURN static ATTRNORETURN void signal_handler(INT32 num)
|
||||
}
|
||||
#endif
|
||||
|
||||
FUNCNORETURN static ATTRNORETURN void quit_handler(int num)
|
||||
{
|
||||
#ifdef HAVE_THREADS
|
||||
if (g_main_thread_id != std::this_thread::get_id())
|
||||
{
|
||||
// Do not attempt any sort of recovery if this signal triggers off the main thread
|
||||
signal(num, SIG_DFL);
|
||||
raise(num);
|
||||
exit(-2);
|
||||
}
|
||||
#endif
|
||||
static volatile sig_atomic_t interrupted = 0;
|
||||
|
||||
boolean I_Interrupted(void)
|
||||
{
|
||||
return interrupted;
|
||||
}
|
||||
|
||||
static void quit_handler(int num)
|
||||
{
|
||||
signal(num, SIG_DFL); //default signal action
|
||||
raise(num);
|
||||
I_Quit();
|
||||
//I_Quit();
|
||||
interrupted = true;
|
||||
}
|
||||
|
||||
static void I_RegisterSignals(void)
|
||||
@@ -1851,17 +1849,20 @@ INT32 I_StartupSystem(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
boolean is_quitting = false;
|
||||
|
||||
//
|
||||
// I_Quit
|
||||
//
|
||||
FUNCNORETURN void ATTRNORETURN I_Quit(void)
|
||||
{
|
||||
static SDL_bool quiting = SDL_FALSE;
|
||||
|
||||
/* prevent recursive I_Quit() */
|
||||
if (quiting) goto death;
|
||||
if (is_quitting)
|
||||
abort();
|
||||
|
||||
is_quitting = true;
|
||||
SDL_ShowCursor(SDL_TRUE);
|
||||
quiting = SDL_FALSE;
|
||||
|
||||
I_ShutdownConsole();
|
||||
M_SaveConfig(NULL); //save game config, cvars..
|
||||
D_SaveBan(); // save the ban list
|
||||
@@ -1888,7 +1889,7 @@ FUNCNORETURN void ATTRNORETURN I_Quit(void)
|
||||
}
|
||||
if (myargmalloc)
|
||||
free(myargv); // Deallocate allocated memory
|
||||
death:
|
||||
|
||||
W_Shutdown();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
+2
-1
@@ -2182,7 +2182,8 @@ void I_ShutdownGraphics(void)
|
||||
SDL_DestroyWindow(window);
|
||||
window = NULL;
|
||||
|
||||
SDL_QuitSubSystem(SDL_INIT_VIDEO);
|
||||
if (SDL_WasInit(SDL_INIT_VIDEO) == SDL_INIT_VIDEO)
|
||||
SDL_QuitSubSystem(SDL_INIT_VIDEO);
|
||||
framebuffer = SDL_FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -237,7 +237,8 @@ void I_ShutdownSound(void)
|
||||
Mix_Quit();
|
||||
#endif
|
||||
|
||||
SDL_QuitSubSystem(SDL_INIT_AUDIO);
|
||||
if (SDL_WasInit(SDL_INIT_AUDIO) == SDL_INIT_AUDIO)
|
||||
SDL_QuitSubSystem(SDL_INIT_AUDIO);
|
||||
|
||||
#ifdef HAVE_LIBGME
|
||||
if (gme)
|
||||
|
||||
Reference in new issue
Block a user