mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-12-02 15:25:37 +08:00
gen_emu_config: make sure each line in supported languages is lowercase
This commit is contained in:
parent
4b49edbf5e
commit
433dc405bd
@ -643,11 +643,11 @@ static std::set<std::string> parse_supported_languages(class Local_Storage *loca
|
|||||||
if (input.is_open()) {
|
if (input.is_open()) {
|
||||||
common_helpers::consume_bom(input);
|
common_helpers::consume_bom(input);
|
||||||
for( std::string line; getline( input, line ); ) {
|
for( std::string line; getline( input, line ); ) {
|
||||||
if (!line.empty() && line[line.length()-1] == '\n') {
|
if (!line.empty() && line.back() == '\n') {
|
||||||
line.pop_back();
|
line.pop_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!line.empty() && line[line.length()-1] == '\r') {
|
if (!line.empty() && line.back() == '\r') {
|
||||||
line.pop_back();
|
line.pop_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -826,7 +826,7 @@ def main():
|
|||||||
for lang in langs:
|
for lang in langs:
|
||||||
support: str = langs[lang].get("supported", "").lower()
|
support: str = langs[lang].get("supported", "").lower()
|
||||||
if support == "true" or support == "1":
|
if support == "true" or support == "1":
|
||||||
languages.append(lang)
|
languages.append(f'{lang}'.lower())
|
||||||
|
|
||||||
if languages:
|
if languages:
|
||||||
with open(os.path.join(emu_settings_dir, "supported_languages.txt"), 'wt', encoding='utf-8') as f:
|
with open(os.path.join(emu_settings_dir, "supported_languages.txt"), 'wt', encoding='utf-8') as f:
|
||||||
|
Loading…
Reference in New Issue
Block a user