mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-27 00:00:07 -06:00
base for forwarding input to clients
This commit is contained in:
@ -472,7 +472,14 @@ void EmuThread::run()
|
||||
}
|
||||
|
||||
// process input and hotkeys
|
||||
NDS::SetKeyMask(Input::InputMask);
|
||||
if (Netplay::Active)
|
||||
{
|
||||
Netplay::ProcessInput();
|
||||
}
|
||||
else
|
||||
{
|
||||
NDS::SetKeyMask(Input::InputMask);
|
||||
}
|
||||
|
||||
if (Input::HotkeyPressed(HK_Lid))
|
||||
{
|
||||
@ -1576,6 +1583,9 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent)
|
||||
|
||||
actMPStartClient = submenu->addAction("NETPLAY CLIENT");
|
||||
connect(actMPStartClient, &QAction::triggered, this, &MainWindow::onMPStartClient);
|
||||
|
||||
actMPTest = submenu->addAction("NETPLAY GO");
|
||||
connect(actMPTest, &QAction::triggered, this, &MainWindow::onMPTest);
|
||||
}
|
||||
}
|
||||
{
|
||||
@ -2337,8 +2347,11 @@ void MainWindow::onOpenFile()
|
||||
recentFileList.prepend(filename);
|
||||
updateRecentFilesMenu();
|
||||
|
||||
NDS::Start();
|
||||
emuThread->emuRun();
|
||||
if (!Netplay::Active)
|
||||
{
|
||||
NDS::Start();
|
||||
emuThread->emuRun();
|
||||
}
|
||||
|
||||
updateCartInserted(false);
|
||||
}
|
||||
@ -2434,8 +2447,11 @@ void MainWindow::onClickRecentFile()
|
||||
recentFileList.prepend(filename);
|
||||
updateRecentFilesMenu();
|
||||
|
||||
NDS::Start();
|
||||
emuThread->emuRun();
|
||||
if (!Netplay::Active)
|
||||
{
|
||||
NDS::Start();
|
||||
emuThread->emuRun();
|
||||
}
|
||||
|
||||
updateCartInserted(false);
|
||||
}
|
||||
@ -2458,8 +2474,11 @@ void MainWindow::onBootFirmware()
|
||||
return;
|
||||
}
|
||||
|
||||
NDS::Start();
|
||||
emuThread->emuRun();
|
||||
if (!Netplay::Active)
|
||||
{
|
||||
NDS::Start();
|
||||
emuThread->emuRun();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::onInsertCart()
|
||||
@ -2844,6 +2863,12 @@ void MainWindow::onMPStartClient()
|
||||
Netplay::StartClient();
|
||||
}
|
||||
|
||||
void MainWindow::onMPTest()
|
||||
{
|
||||
// HAX
|
||||
Netplay::StartGame();
|
||||
}
|
||||
|
||||
void MainWindow::onOpenEmuSettings()
|
||||
{
|
||||
emuThread->emuPause();
|
||||
|
Reference in New Issue
Block a user