mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-22 04:37:46 +00:00
This is a design limitation of the Dalamud Injector (at least from how we use it) because we depend on the child process exiting to be when the game exists. For vanilla games, this is true but not for Dalamud. Now we track the PID given to us by Dalamud and use that as an indicator to when the game exits. This is needed to properly keep tracked of when the game exists for the future sync feature.
21 lines
No EOL
392 B
C++
21 lines
No EOL
392 B
C++
// SPDX-FileCopyrightText: 2024 Joshua Goins <josh@redstrate.com>
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QTimer>
|
|
|
|
/// Listens and waits for a process to finish.
|
|
class ProcessWatcher : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit ProcessWatcher(const int PID);
|
|
|
|
Q_SIGNALS:
|
|
void finished();
|
|
|
|
private:
|
|
QTimer *m_timer = nullptr;
|
|
}; |