mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
Fixed playtime recording
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
e499aa4783
commit
e3af4f9a78
3 changed files with 10 additions and 5 deletions
|
|
@ -213,6 +213,7 @@ void LauncherPartLaunch::on_state(LoggedProcess::State state)
|
|||
APPLICATION->showMainWindow();
|
||||
|
||||
m_parent->setPid(-1);
|
||||
m_parent->instance()->setMinecraftRunning(false);
|
||||
// if the exit code wasn't 0, report this as a crash
|
||||
auto exitCode = m_process.exitCode();
|
||||
if (exitCode != 0) {
|
||||
|
|
@ -228,7 +229,6 @@ void LauncherPartLaunch::on_state(LoggedProcess::State state)
|
|||
case LoggedProcess::Running:
|
||||
emit logLine(QString("Minecraft process ID: %1\n\n").arg(m_process.processId()), MessageLevel::Launcher);
|
||||
m_parent->setPid(m_process.processId());
|
||||
m_parent->instance()->setLastLaunch();
|
||||
// send the launch script to the launcher part
|
||||
m_process.write(m_launchScript.toUtf8());
|
||||
|
||||
|
|
@ -248,6 +248,7 @@ void LauncherPartLaunch::setWorkingDirectory(const QString& wd)
|
|||
void LauncherPartLaunch::proceed()
|
||||
{
|
||||
if (mayProceed) {
|
||||
m_parent->instance()->setMinecraftRunning(true);
|
||||
QString launchString("launch\n");
|
||||
m_process.write(launchString.toUtf8());
|
||||
mayProceed = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue