Merge pull request #17723 from pstef/cmd-special

Push the compiler to reserve space for negative commands
This commit is contained in:
LibretroAdmin 2025-03-23 02:29:55 -07:00 committed by GitHub
commit a1ce57f11f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 1 deletions

View File

@ -990,7 +990,7 @@ void rcheevos_test(void)
#ifdef HAVE_THREADS
if (rcheevos_locals.queued_command != CMD_EVENT_NONE)
{
if ((int)rcheevos_locals.queued_command == CMD_CHEEVOS_FINALIZE_LOAD)
if (rcheevos_locals.queued_command == CMD_CHEEVOS_FINALIZE_LOAD)
rcheevos_finalize_game_load_on_ui_thread();
else
command_event(rcheevos_locals.queued_command, NULL);

View File

@ -41,6 +41,7 @@ RETRO_BEGIN_DECLS
enum event_command
{
CMD_SPECIAL = -1,
CMD_EVENT_NONE = 0,
/* Resets RetroArch. */
CMD_EVENT_RESET,

View File

@ -5486,6 +5486,10 @@ bool command_event(enum event_command cmd, void *data)
/* Deprecated */
case CMD_EVENT_SEND_DEBUG_INFO:
break;
/* Do nothing about the special negative value */
case CMD_SPECIAL:
break;
}
return true;