mirror of
https://github.com/simple64/simple64.git
synced 2026-11-13 18:08:42 +01:00
update core
This commit is contained in:
1 parent
43798f9284
commit
da3c040922
3 files changed
+16
-3
No files matched your search
@@ -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;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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]);
|
||||
|
||||
Reference in new issue
Block a user