mirror of
https://github.com/libretro/ppsspp.git
synced 2025-01-19 07:04:45 +00:00
Set the PSP language in the config file
This commit is contained in:
parent
3ad4e0f9fd
commit
ccdc0b77c1
@ -18,6 +18,7 @@
|
||||
|
||||
#include "Config.h"
|
||||
#include "IniFile.h"
|
||||
#include "HLE/sceUtility.h"
|
||||
|
||||
SState g_State;
|
||||
CConfig g_Config;
|
||||
@ -80,6 +81,9 @@ void CConfig::Load(const char *iniFileName)
|
||||
false);
|
||||
#endif
|
||||
|
||||
IniFile::Section *pspConfig = iniFile.GetOrCreateSection("SystemParam");
|
||||
pspConfig->Get("Language", &ilanguage, PSP_SYSTEMPARAM_LANGUAGE_ENGLISH);
|
||||
|
||||
// Ephemeral settings
|
||||
bDrawWireframe = false;
|
||||
}
|
||||
@ -122,6 +126,9 @@ void CConfig::Save()
|
||||
control->Set("ShowStick", bShowAnalogStick);
|
||||
control->Set("ShowTouchControls", bShowTouchControls);
|
||||
|
||||
IniFile::Section *pspConfig = iniFile.GetOrCreateSection("SystemParam");
|
||||
pspConfig->Set("Language", ilanguage);
|
||||
|
||||
if (!iniFile.Save(iniFilename_.c_str())) {
|
||||
ERROR_LOG(LOADER, "Error saving config - can't write ini %s", iniFilename_.c_str());
|
||||
return;
|
||||
|
@ -68,6 +68,9 @@ public:
|
||||
bool bShowFPSCounter;
|
||||
bool bShowDebugStats;
|
||||
|
||||
// SystemParam
|
||||
int ilanguage;
|
||||
|
||||
std::string currentDirectory;
|
||||
std::string memCardDirectory;
|
||||
std::string flashDirectory;
|
||||
|
@ -273,23 +273,6 @@ int sceUtilityGamedataInstallGetStatus()
|
||||
#define PSP_SYSTEMPARAM_BUTTON_CIRCLE 0
|
||||
#define PSP_SYSTEMPARAM_BUTTON_CROSS 1
|
||||
|
||||
/**
|
||||
* Valid values for PSP_SYSTEMPARAM_ID_INT_LANGUAGE
|
||||
*/
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_JAPANESE 0
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_ENGLISH 1
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_FRENCH 2
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_SPANISH 3
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_GERMAN 4
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_ITALIAN 5
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_DUTCH 6
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_PORTUGUESE 7
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_RUSSIAN 8
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_KOREAN 9
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_CHINESE_TRADITIONAL 10
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_CHINESE_SIMPLIFIED 11
|
||||
|
||||
|
||||
//TODO: should save to config file
|
||||
u32 sceUtilitySetSystemParamString(u32 id, u32 strPtr)
|
||||
{
|
||||
@ -339,7 +322,7 @@ u32 sceUtilityGetSystemParamInt(u32 id, u32 destaddr)
|
||||
param = PSP_SYSTEMPARAM_TIME_FORMAT_24HR;
|
||||
break;
|
||||
case PSP_SYSTEMPARAM_ID_INT_LANGUAGE:
|
||||
param = PSP_SYSTEMPARAM_LANGUAGE_ENGLISH;
|
||||
param = g_Config.ilanguage;
|
||||
break;
|
||||
case PSP_SYSTEMPARAM_ID_INT_BUTTON_PREFERENCE:
|
||||
param = PSP_SYSTEMPARAM_BUTTON_CROSS;
|
||||
|
@ -17,6 +17,25 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../../Common/ChunkFile.h"
|
||||
|
||||
/**
|
||||
* Valid values for PSP_SYSTEMPARAM_ID_INT_LANGUAGE
|
||||
*/
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_JAPANESE 0
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_ENGLISH 1
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_FRENCH 2
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_SPANISH 3
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_GERMAN 4
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_ITALIAN 5
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_DUTCH 6
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_PORTUGUESE 7
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_RUSSIAN 8
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_KOREAN 9
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_CHINESE_TRADITIONAL 10
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_CHINESE_SIMPLIFIED 11
|
||||
|
||||
|
||||
void __UtilityInit();
|
||||
void __UtilityDoState(PointerWrap &p);
|
||||
void __UtilityShutdown();
|
||||
|
Loading…
x
Reference in New Issue
Block a user