mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2024-11-14 21:37:42 -07:00
quick attempt.
This commit is contained in:
parent
79301c6e91
commit
31472607d6
@ -536,8 +536,7 @@ void ProcessCommands()
|
||||
break;
|
||||
|
||||
case Cmd_Start:
|
||||
NDS::Start();
|
||||
emuThread->emuRun();
|
||||
Netplay::StartLocal();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -461,6 +461,19 @@ void StartGame()
|
||||
IPC::SendCommand(0xFFFF, IPC::Cmd_Start, 0, nullptr);
|
||||
|
||||
// start game locally
|
||||
StartLocal();
|
||||
}
|
||||
|
||||
void StartLocal()
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
InputFrame frame;
|
||||
frame.FrameNum = i;
|
||||
frame.KeyMask = 0xFFF;
|
||||
InputQueue.push(frame);
|
||||
}
|
||||
|
||||
NDS::Start();
|
||||
emuThread->emuRun();
|
||||
}
|
||||
@ -637,8 +650,7 @@ printf("bourf\n");
|
||||
IPC::SendCommand(0xFFFF, IPC::Cmd_Start, 0, nullptr);
|
||||
printf("birf\n");
|
||||
// start game locally
|
||||
NDS::Start();printf("barf\n");
|
||||
emuThread->emuRun();printf("burf\n");
|
||||
StartLocal();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -730,7 +742,7 @@ void ProcessMirrorClient()
|
||||
if (!MirrorHost) return;
|
||||
|
||||
bool block = false;
|
||||
if (emuThread->emuIsRunning() && NDS::NumFrames > 4)
|
||||
if (emuThread->emuIsRunning())// && NDS::NumFrames > 4)
|
||||
{
|
||||
if (InputQueue.empty())
|
||||
block = true;
|
||||
@ -844,7 +856,7 @@ void ProcessInput()
|
||||
|
||||
if (InputQueue.empty())
|
||||
{
|
||||
if (NDS::NumFrames > 4)
|
||||
//if (NDS::NumFrames > 4)
|
||||
printf("Netplay: BAD! INPUT QUEUE EMPTY\n");
|
||||
return;
|
||||
}
|
||||
|
@ -135,6 +135,7 @@ void StartMirror(const Player* player);
|
||||
u32 PlayerAddress(int id);
|
||||
|
||||
void StartGame();
|
||||
void StartLocal();
|
||||
|
||||
void ProcessFrame();
|
||||
void ProcessInput();
|
||||
|
Loading…
Reference in New Issue
Block a user