mirror of
https://github.com/azahar-emu/azahar.git
synced 2026-06-06 02:33:44 -04:00
Compare commits
3 commits
f7b7f46ed2
...
943e7bf0c3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
943e7bf0c3 | ||
|
|
4867bb2e2b | ||
|
|
2d5404d830 |
2 changed files with 30 additions and 3 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue