Skip to content

Commit

Permalink
Fix PSP build
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkwouter committed Jul 19, 2024
1 parent 5b22f4e commit 1001323
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/TranslationManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@

#include "utils.hpp"

#ifdef __PSP__
#include <psputility.h>
#else
#include <locale.h>
#endif


TranslationManager::TranslationManager() : dictionary_manager(std::unique_ptr<tinygettext::FileSystem>(new tinygettext::UnixFileSystem)) {
loadTranslations();
}
Expand Down Expand Up @@ -48,7 +55,6 @@ std::vector<std::string> TranslationManager::getSystemLanguageList() {

std::string locale = "C";
#ifdef __PSP__
#include <psputility.h>
int current_locale_int;
sceUtilityGetSystemParamInt(PSP_SYSTEMPARAM_ID_INT_LANGUAGE, &current_locale_int);
switch(current_locale_int) {
Expand Down Expand Up @@ -90,7 +96,6 @@ std::vector<std::string> TranslationManager::getSystemLanguageList() {
break;
}
#else
#include <locale.h>
char * locale_c_str = setlocale(LC_ALL, "");
if (locale_c_str){
locale = std::string(locale_c_str);
Expand Down

0 comments on commit 1001323

Please sign in to comment.