update core

This commit is contained in:
Logan McNaughton committed 2020-10-29 07:30:06 -07:00
1 parent 43798f9284
commit da3c040922
3 files changed
+16 -3

No files matched your search

+4
View File
@@ -359,6 +359,8 @@ EXPORT m64p_error CALL CoreAddCheat(const char *CheatName, m64p_cheat_code *Code
{
if (!l_CoreInit)
return M64ERR_NOT_INIT;
if (netplay_is_init())
return M64ERR_INVALID_STATE;
if (CheatName == NULL || CodeList == NULL)
return M64ERR_INPUT_ASSERT;
if (strlen(CheatName) < 1 || NumCodes < 1)
@@ -374,6 +376,8 @@ EXPORT m64p_error CALL CoreCheatEnabled(const char *CheatName, int Enabled)
{
if (!l_CoreInit)
return M64ERR_NOT_INIT;
if (netplay_is_init())
return M64ERR_INVALID_STATE;
if (CheatName == NULL)
return M64ERR_INPUT_ASSERT;
-3
View File
@@ -890,9 +890,6 @@ static void apply_speed_limiter(void)
/* TODO: make a GameShark module and move that there */
static void gs_apply_cheats(struct cheat_ctx* ctx)
{
if (netplay_is_init())
return;
struct r4300_core* r4300 = &g_dev.r4300;
if (g_gs_vi_counter < 60)
+12
View File
@@ -137,6 +137,18 @@ m64p_error netplay_stop()
return M64ERR_INVALID_STATE;
else
{
for (int i = 0; i < 4; ++i)
{
struct netplay_event* current = l_cin_compats[i].event_first;
struct netplay_event* next;
while (current != NULL)
{
next = current->next;
free(current);
current = next;
}
}
char output_data[5];
output_data[0] = TCP_DISCONNECT_NOTICE;
SDLNet_Write32(l_reg_id, &output_data[1]);