Check if multiplayer if connected, enforce run-behind if so

This commit is contained in:
Henrik Rydgård 2023-12-30 15:31:59 +01:00
parent acd719448e
commit 8228e59423
3 changed files with 8 additions and 1 deletions

View File

@ -41,6 +41,7 @@
#include "Core/Debugger/Breakpoints.h"
#include "Core/HW/Display.h"
#include "Core/MIPS/MIPS.h"
#include "Core/HLE/sceNetAdhoc.h"
#include "GPU/Debugger/Stepping.h"
#ifdef _WIN32
@ -103,7 +104,8 @@ void Core_Stop() {
}
bool Core_ShouldRunBehind() {
return g_Config.bRunBehindPauseMenu;
// Enforce run-behind if ad-hoc connected
return g_Config.bRunBehindPauseMenu || __NetAdhocConnected();
}
bool Core_IsStepping() {

View File

@ -126,6 +126,9 @@ static int sceNetAdhocPdpCreate(const char* mac, int port, int bufferSize, u32 f
static int sceNetAdhocPdpSend(int id, const char* mac, u32 port, void* data, int len, int timeout, int flag);
static int sceNetAdhocPdpRecv(int id, void* addr, void* port, void* buf, void* dataLength, u32 timeout, int flag);
bool __NetAdhocConnected() {
return netAdhocInited && netAdhocctlInited && adhocctlState == ADHOCCTL_STATE_CONNECTED;
}
void __NetAdhocShutdown() {
// Kill AdhocServer Thread

View File

@ -104,6 +104,8 @@ void __NetAdhocDoState(PointerWrap &p);
void __UpdateAdhocctlHandlers(u32 flags, u32 error);
void __UpdateMatchingHandler(const MatchingArgs &params);
bool __NetAdhocConnected();
// I have to call this from netdialog
int sceNetAdhocctlGetState(u32 ptrToStatus);
int sceNetAdhocctlCreate(const char * groupName);