#include "profile.moc"
ProfileSettingsWindow *profileSettingsWindow;
ProfileSettingsWindow::ProfileSettingsWindow() {
layout = new QVBoxLayout;
layout->setMargin(Style::WindowMargin);
layout->setSpacing(0);
layout->setAlignment(Qt::AlignTop);
setLayout(layout);
profileInfo = new QLabel(
"Profiles allow you to balance emulation accuracy against system performance.
"
"Note that you must restart bsnes for profile changes to take effect!
"
"Also, while save RAM is compatible between profiles, save states are not cross-compatible."
);
layout->addWidget(profileInfo);
layout->addSpacing(Style::WidgetSpacing);
profileAccuracy = new QRadioButton("Accuracy");
profileAccuracy->setStyleSheet("font-weight: bold; font-size: 12pt;");
layout->addWidget(profileAccuracy);
profileAccuracyInfo = new QLabel(
"System Requirements: A super-computer cooled by LN2.
"
"Maximum accuracy, no matter the cost.
"
"Use this mode for development or research purposes."
);
profileAccuracyInfo->setStyleSheet("margin-left: 22px;");
layout->addWidget(profileAccuracyInfo);
layout->addSpacing(Style::WidgetSpacing);
profileCompatibility = new QRadioButton("Compatibility");
profileCompatibility->setStyleSheet("font-weight: bold; font-size: 12pt;");
layout->addWidget(profileCompatibility);
profileCompatibilityInfo = new QLabel(
"System Requirements: Intel Core Solo or AMD Athlon 64 processor.
"
"Extreme accuracy with reasonable hardware requirements in mind.
"
"Very rarely, slight graphical glitches may appear in a small number of games."
);
profileCompatibilityInfo->setStyleSheet("margin-left: 22px;");
layout->addWidget(profileCompatibilityInfo);
layout->addSpacing(Style::WidgetSpacing);
profilePerformance = new QRadioButton("Performance");
profilePerformance->setStyleSheet("font-weight: bold; font-size: 12pt;");
layout->addWidget(profilePerformance);
profilePerformanceInfo = new QLabel(
"System Requirements: Intel Pentium IV or AMD Athlon processor.
"
"High accuracy with reasonable compromises for performance.
"
"Sacrifices a small degree of compatibility to run full-speed on older hardware.
"
"Use this mode for slower systems, or if you are running on battery power."
);
profilePerformanceInfo->setStyleSheet("margin-left: 22px;");
layout->addWidget(profilePerformanceInfo);
if(config().system.profile == "accuracy") {
profileAccuracy->setChecked(true);
} else if(config().system.profile == "compatibility") {
profileCompatibility->setChecked(true);
} else if(config().system.profile == "performance") {
profilePerformance->setChecked(true);
} else {
config().system.profile = "compatibility";
profileCompatibility->setChecked(true);
QMessageBox::information(0, "First-Run Notice",
"Note: bsnes contains multiple emulation profiles.
"
"If bsnes runs too slowly, you can greatly increase the speed by using the "
"'Performance' profile; or if you want even more accuracy, you can use the "
"'Accuracy' profile.
"
"Feel free to experiment. You can select different profiles via:
"
"Settings -> Configuration -> Profile"
);
}
connect(profileAccuracy, SIGNAL(pressed()), this, SLOT(setAccuracyProfile()));
connect(profileCompatibility, SIGNAL(pressed()), this, SLOT(setCompatibilityProfile()));
connect(profilePerformance, SIGNAL(pressed()), this, SLOT(setPerformanceProfile()));
}
void ProfileSettingsWindow::setAccuracyProfile() {
config().system.profile = "accuracy";
}
void ProfileSettingsWindow::setCompatibilityProfile() {
config().system.profile = "compatibility";
}
void ProfileSettingsWindow::setPerformanceProfile() {
config().system.profile = "performance";
}