Skip to content

Commit

Permalink
fixed win11 not being properly detected (microsoft's fault lol)
Browse files Browse the repository at this point in the history
  • Loading branch information
nepnep39 committed Apr 6, 2023
1 parent e7c5797 commit 9aa8d25
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions neofetch-win/source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,26 @@ std::wstring getwinver() {
auto car_bomb = key->GetString(L"ProductName");
// don't ask

/*std::wstring ws = key->GetString(L"CurrentBuild");
bool win11 = true;

std::wstring ws = key->GetString(L"CurrentBuild");
int buildint = std::stoi(ws);

if (buildint > 21999) {

car_bomb = L"Windows 11 " + key->GetString(L"EditionID");
return car_bomb;
win11 = true;
}
else {
car_bomb = L"Windows 10 " + key->GetString(L"EditionID");
return car_bomb;
}*/
win11 = false;
}

if (win11 == true) {
car_bomb = L"Windows 11";
}
else {}

return car_bomb;

}
catch (const std::exception&)
{
Expand Down

0 comments on commit 9aa8d25

Please sign in to comment.