mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-26 15:50:00 -06:00
add a way to tell windows apart
This commit is contained in:
@ -427,11 +427,7 @@ void EmuThread::run()
|
|||||||
winUpdateFreq = 1;
|
winUpdateFreq = 1;
|
||||||
|
|
||||||
double actualfps = (59.8261 * 263.0) / nlines;
|
double actualfps = (59.8261 * 263.0) / nlines;
|
||||||
int inst = emuInstance->instanceID;
|
snprintf(melontitle, sizeof(melontitle), "[%d/%.0f] melonDS " MELONDS_VERSION, fps, actualfps);
|
||||||
if (inst == 0)
|
|
||||||
snprintf(melontitle, sizeof(melontitle), "[%d/%.0f] melonDS " MELONDS_VERSION, fps, actualfps);
|
|
||||||
else
|
|
||||||
snprintf(melontitle, sizeof(melontitle), "[%d/%.0f] melonDS (%d)", fps, actualfps, inst+1);
|
|
||||||
changeWindowTitle(melontitle);
|
changeWindowTitle(melontitle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -444,11 +440,7 @@ void EmuThread::run()
|
|||||||
|
|
||||||
emit windowUpdate();
|
emit windowUpdate();
|
||||||
|
|
||||||
int inst = emuInstance->instanceID;
|
snprintf(melontitle, sizeof(melontitle), "melonDS " MELONDS_VERSION);
|
||||||
if (inst == 0)
|
|
||||||
snprintf(melontitle, sizeof(melontitle), "melonDS " MELONDS_VERSION);
|
|
||||||
else
|
|
||||||
snprintf(melontitle, sizeof(melontitle), "melonDS (%d)", inst+1);
|
|
||||||
changeWindowTitle(melontitle);
|
changeWindowTitle(melontitle);
|
||||||
|
|
||||||
SDL_Delay(75);
|
SDL_Delay(75);
|
||||||
|
@ -2180,6 +2180,29 @@ void MainWindow::onChangeAudioSync(bool checked)
|
|||||||
|
|
||||||
void MainWindow::onTitleUpdate(QString title)
|
void MainWindow::onTitleUpdate(QString title)
|
||||||
{
|
{
|
||||||
|
if (!emuInstance) return;
|
||||||
|
|
||||||
|
int numinst = numEmuInstances();
|
||||||
|
int numwin = emuInstance->getNumWindows();
|
||||||
|
if ((numinst > 1) && (numwin > 1))
|
||||||
|
{
|
||||||
|
// add player/window prefix
|
||||||
|
QString prefix = QString("[p%1:w%2] ").arg(emuInstance->instanceID+1).arg(windowID+1);
|
||||||
|
title = prefix + title;
|
||||||
|
}
|
||||||
|
else if (numinst > 1)
|
||||||
|
{
|
||||||
|
// add player prefix
|
||||||
|
QString prefix = QString("[p%1] ").arg(emuInstance->instanceID+1);
|
||||||
|
title = prefix + title;
|
||||||
|
}
|
||||||
|
else if (numwin > 1)
|
||||||
|
{
|
||||||
|
// add window prefix
|
||||||
|
QString prefix = QString("[w%1] ").arg(windowID+1);
|
||||||
|
title = prefix + title;
|
||||||
|
}
|
||||||
|
|
||||||
setWindowTitle(title);
|
setWindowTitle(title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user