Linux Fix + Version string fix

This commit is contained in:
SirMangler 2019-10-25 16:03:47 +01:00
parent 8ccce2a1b2
commit fdcffecbb9
6 changed files with 14 additions and 3 deletions

View File

@ -18,7 +18,8 @@ namespace Common
#define BUILD_TYPE_STR ""
#endif
const std::string scm_rev_str = "PrimeHack [v0.3.1]";
const std::string primehack_ver = "0.3.2";
const std::string scm_rev_str = "PrimeHack [v"+primehack_ver+"]";
const std::string scm_rev_git_str = SCM_REV_STR;
const std::string scm_desc_str = SCM_DESC_STR;

View File

@ -15,4 +15,5 @@ extern const std::string scm_rev_str;
extern const std::string scm_rev_git_str;
extern const std::string scm_distributor_str;
extern const std::string netplay_dolphin_ver;
extern const std::string primehack_ver;
} // namespace Common

View File

@ -146,7 +146,7 @@ static void handle_cursor(u32 x_address, u32 y_address, float right_bound, float
int dx = prime::g_mouse_input->GetDeltaHorizontalAxis(),
dy = prime::g_mouse_input->GetDeltaVerticalAxis();
float aspect_ratio = getAspectRatio();
if (isnan(aspect_ratio))
if (std::isnan(aspect_ratio))
return;
const float cursor_sensitivity_conv = prime::GetCursorSensitivity() / 10000.f;
cursor_x += static_cast<float>(dx) * cursor_sensitivity_conv;

View File

@ -21,10 +21,12 @@ AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent)
const QString medium = QStringLiteral("<p style='margin-top:15px;'>");
QString text;
QString prime_ver = QString::fromStdString(Common::primehack_ver);
text.append(QStringLiteral("<p style='font-size:38pt; font-weight:400; margin-bottom:0;'>") +
tr("PrimeHack") + QStringLiteral("</p>"));
text.append(QStringLiteral("<p style='font-size:18pt; margin-top:0;'>%1</p>")
.arg(QString::fromUtf8("v0.3.1 (5.0-10966)")));
.arg(prime_ver+QString::fromUtf8(" (5.0-10966)")));
text.append(medium + tr("Check for updates: ") +
QStringLiteral(

View File

@ -99,6 +99,7 @@ void GeneralPane::ConnectLayout()
connect(m_checkbox_cheats, &QCheckBox::toggled, this, &GeneralPane::OnSaveConfig);
connect(m_checkbox_override_region_settings, &QCheckBox::stateChanged, this,
&GeneralPane::OnSaveConfig);
connect(m_checkbox_primehack, &QCheckBox::toggled, this, &GeneralPane::OnSaveConfig);
connect(m_checkbox_auto_disc_change, &QCheckBox::toggled, this, &GeneralPane::OnSaveConfig);
#ifdef USE_DISCORD_PRESENCE
connect(m_checkbox_discord_presence, &QCheckBox::toggled, this, &GeneralPane::OnSaveConfig);
@ -143,6 +144,11 @@ void GeneralPane::CreateBasic()
m_checkbox_cheats->setToolTip(QString::fromStdString("Enabled by PrimeHack"));
basic_group_layout->addWidget(m_checkbox_cheats);
m_checkbox_primehack = new QCheckBox(tr("Toggle PrimeHack"));
m_checkbox_primehack->setToolTip(QString::fromStdString("Toggle PrimeHack on or off."));
m_checkbox_primehack->toggle();
basic_group_layout->addWidget(m_checkbox_primehack);
m_checkbox_override_region_settings = new QCheckBox(tr("Allow Mismatched Region Settings"));
basic_group_layout->addWidget(m_checkbox_override_region_settings);

View File

@ -44,6 +44,7 @@ private:
QComboBox* m_combobox_update_track;
QCheckBox* m_checkbox_dualcore;
QCheckBox* m_checkbox_cheats;
QCheckBox* m_checkbox_primehack;
QCheckBox* m_checkbox_override_region_settings;
QCheckBox* m_checkbox_auto_disc_change;
#ifdef USE_DISCORD_PRESENCE