Compare commits

...

3 commits

Author SHA1 Message Date
exertustfm
943e7bf0c3
Merge 2d5404d830 into 4867bb2e2b 2026-05-31 12:27:08 +01:00
RedBlackAka
4867bb2e2b
video_core: Change unimplemented gas stub behaviour for Vulkan (#2165) 2026-05-30 23:53:16 +02:00
Chance
2d5404d830 Patch system language selection on Windows (#242) 2025-12-31 12:38:31 -06:00
2 changed files with 30 additions and 3 deletions

View file

@ -4080,14 +4080,35 @@ void GMainWindow::UpdateUITheme() {
}
void GMainWindow::LoadTranslation() {
bool loaded{false};
#ifdef _WIN32
// Set the language to the first option in "preferred languages" Windows' OS settings
if (UISettings::values.language.isEmpty()) {
const auto languages = QLocale::system().uiLanguages(QLocale::TagSeparator::Underscore);
for (const auto& lang : languages) {
// If the first language found is English, no need to install any translation
if (lang == QStringLiteral("en")) {
UISettings::values.language = lang;
return;
}
loaded = translator.load(lang, QStringLiteral(":/languages/"));
if (loaded) {
UISettings::values.language = lang;
break;
}
}
}
#endif
// If the selected language is English, no need to install any translation
if (UISettings::values.language == QStringLiteral("en")) {
return;
}
bool loaded;
if (UISettings::values.language.isEmpty()) {
if (UISettings::values.language.isEmpty() && !loaded) {
// Use the system's default locale
loaded = translator.load(QLocale::system(), {}, {}, QStringLiteral(":/languages/"));
} else {

View file

@ -72,6 +72,7 @@ void FragmentModule::Generate() {
break;
case TexturingRegs::FogMode::Gas:
WriteGas();
// Return early due to unimplemented gas mode
return;
default:
break;
@ -196,7 +197,12 @@ void FragmentModule::WriteFog() {
void FragmentModule::WriteGas() {
// TODO: Implement me
LOG_CRITICAL(Render, "Unimplemented gas mode");
OpKill();
// Replace the output color with a transparent pixel,
// (just discarding the pixel causes graphical issues
// in some MH games).
OpStore(color_id, ConstF32(0.f, 0.f, 0.f, 0.f));
OpReturn();
OpFunctionEnd();
}