NOISSUE handle recommended versions better
Moved constants to the version data file Use recommended Minecraft instead of latest stable for new instances by default
This commit is contained in:
parent
bb01c91469
commit
4fc4a17256
8 changed files with 40 additions and 8 deletions
|
@ -23,6 +23,7 @@
|
|||
#include "java/JavaCheckerJob.h"
|
||||
#include "java/JavaUtils.h"
|
||||
#include "MMCStrings.h"
|
||||
#include "minecraft/VersionFilterData.h"
|
||||
|
||||
JavaVersionList::JavaVersionList(QObject *parent) : BaseVersionList(parent)
|
||||
{
|
||||
|
@ -121,8 +122,8 @@ bool sortJavas(BaseVersionPtr left, BaseVersionPtr right)
|
|||
if(archCompare != 0)
|
||||
return archCompare > 0;
|
||||
// dirty hack - 1.9 and above is too new
|
||||
auto labove19 = Strings::naturalCompare(rleft->name(), "1.9.0", Qt::CaseInsensitive) >= 0;
|
||||
auto rabove19 = Strings::naturalCompare(rright->name(), "1.9.0", Qt::CaseInsensitive) >= 0;
|
||||
auto labove19 = Strings::naturalCompare(rleft->name(), g_VersionFilterData.discouragedJavaVersion, Qt::CaseInsensitive) >= 0;
|
||||
auto rabove19 = Strings::naturalCompare(rright->name(), g_VersionFilterData.discouragedJavaVersion, Qt::CaseInsensitive) >= 0;
|
||||
if(labove19 == rabove19)
|
||||
{
|
||||
// prefer higher versions in general
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue