Skip to content

Commit

Permalink
Update version for 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Frostshake committed Nov 23, 2023
1 parent 437e905 commit 2fae9ca
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 9 deletions.
2 changes: 1 addition & 1 deletion WMVx/Build.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#pragma once

#define WMVX_BUILD "0.1.0"
#define WMVX_BUILD "0.2.0"
24 changes: 21 additions & 3 deletions WMVx/ClientChoiceDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,36 @@ void ClientChoiceDialog::detectVersion() {
const auto detected = GameClientInfo::detect(ui.lineEditFolderName->text());

if (detected.has_value()) {
bool found = false;
auto index = 0;
for (const auto ver : availableVersions) {
if (ver == detected.value().version) {
const auto version = detected.value().version;

for (const auto& ver : availableVersions) {
if (ver == version) {
ui.comboBoxVersion->setCurrentIndex(index);
found = true;
break;
}
index++;
}

// if we cant get an exact match, try to use the closest instead.
if (!found) {
index = availableVersions.size() - 1;
for (auto it = availableVersions.crbegin(); it != availableVersions.crend(); ++it) {
if (version.major >= it->major) {
break;
}
index--;
}

ui.comboBoxVersion->setCurrentIndex(index);
}

}
}

const GameClientVersion ClientChoiceDialog::availableVersions[4] = {
const std::array<GameClientVersion, 4> ClientChoiceDialog::availableVersions = {
GameClientVersion(1, 12, 1, 5875),
GameClientVersion(3, 3, 5, 12340),
GameClientVersion(8, 3, 7, 35435),
Expand Down
2 changes: 1 addition & 1 deletion WMVx/ClientChoiceDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ class ClientChoiceDialog : public QDialog
void load();
void detectVersion();

static const core::GameClientVersion availableVersions[4];
static const std::array<core::GameClientVersion, 4> availableVersions;
};
Binary file modified WMVx/WMVx.aps
Binary file not shown.
8 changes: 4 additions & 4 deletions WMVx/WMVx.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ IDI_ICON1 ICON DISCARDABLE "WMVx.ico"
#include <windows.h>

VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,1,0,0
PRODUCTVERSION 0,1,0,0
FILEVERSION 0,2,0,0
PRODUCTVERSION 0,2,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "FileVersion", "0.1.0"
VALUE "FileVersion", "0.2.0"
VALUE "ProductName", "WMVx"
VALUE "ProductVersion", "0.1.0"
VALUE "ProductVersion", "0.2.0"
END
END
END

0 comments on commit 2fae9ca

Please sign in to comment.