mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 17:23:40 +01:00
Core: Use a shared_ptr for i18n categories.
This does not make them thread safe, but it reduces the chances of a crash a bit (see #12594.)
This commit is contained in:
1 parent
a4ba5d4859
commit
5009698cc0
54 files changed
+244
-240
No files matched your search
+19
-19
@@ -66,8 +66,8 @@ static const char *logLevelList[] = {
|
||||
|
||||
void DevMenu::CreatePopupContents(UI::ViewGroup *parent) {
|
||||
using namespace UI;
|
||||
I18NCategory *dev = GetI18NCategory("Developer");
|
||||
I18NCategory *sy = GetI18NCategory("System");
|
||||
auto dev = GetI18NCategory("Developer");
|
||||
auto sy = GetI18NCategory("System");
|
||||
|
||||
ScrollView *scroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, 1.0f));
|
||||
LinearLayout *items = new LinearLayout(ORIENT_VERTICAL);
|
||||
@@ -189,7 +189,7 @@ void LogScreen::update() {
|
||||
|
||||
void LogScreen::CreateViews() {
|
||||
using namespace UI;
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
auto di = GetI18NCategory("Dialog");
|
||||
|
||||
LinearLayout *outer = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
root_ = outer;
|
||||
@@ -223,8 +223,8 @@ UI::EventReturn LogScreen::OnSubmit(UI::EventParams &e) {
|
||||
void LogConfigScreen::CreateViews() {
|
||||
using namespace UI;
|
||||
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
I18NCategory *dev = GetI18NCategory("Developer");
|
||||
auto di = GetI18NCategory("Dialog");
|
||||
auto dev = GetI18NCategory("Developer");
|
||||
|
||||
root_ = new ScrollView(ORIENT_VERTICAL);
|
||||
|
||||
@@ -294,7 +294,7 @@ UI::EventReturn LogConfigScreen::OnLogLevelChange(UI::EventParams &e) {
|
||||
}
|
||||
|
||||
UI::EventReturn LogConfigScreen::OnLogLevel(UI::EventParams &e) {
|
||||
I18NCategory *dev = GetI18NCategory("Developer");
|
||||
auto dev = GetI18NCategory("Developer");
|
||||
|
||||
auto logLevelScreen = new LogLevelScreen(dev->T("Log Level"));
|
||||
logLevelScreen->OnChoice.Handle(this, &LogConfigScreen::OnLogLevelChange);
|
||||
@@ -364,8 +364,8 @@ static const JitDisableFlag jitDisableFlags[] = {
|
||||
void JitDebugScreen::CreateViews() {
|
||||
using namespace UI;
|
||||
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
I18NCategory *dev = GetI18NCategory("Developer");
|
||||
auto di = GetI18NCategory("Dialog");
|
||||
auto dev = GetI18NCategory("Developer");
|
||||
|
||||
root_ = new ScrollView(ORIENT_VERTICAL);
|
||||
|
||||
@@ -417,9 +417,9 @@ void SystemInfoScreen::CreateViews() {
|
||||
using namespace UI;
|
||||
|
||||
// NOTE: Do not translate this section. It will change a lot and will be impossible to keep up.
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
I18NCategory *si = GetI18NCategory("SysInfo");
|
||||
I18NCategory *gr = GetI18NCategory("Graphics");
|
||||
auto di = GetI18NCategory("Dialog");
|
||||
auto si = GetI18NCategory("SysInfo");
|
||||
auto gr = GetI18NCategory("Graphics");
|
||||
root_ = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
|
||||
ViewGroup *leftColumn = new AnchorLayout(new LinearLayoutParams(1.0f));
|
||||
@@ -674,7 +674,7 @@ void SystemInfoScreen::CreateViews() {
|
||||
void AddressPromptScreen::CreatePopupContents(UI::ViewGroup *parent) {
|
||||
using namespace UI;
|
||||
|
||||
I18NCategory *dev = GetI18NCategory("Developer");
|
||||
auto dev = GetI18NCategory("Developer");
|
||||
|
||||
addrView_ = new TextView(dev->T("Enter address"), ALIGN_HCENTER, false);
|
||||
parent->Add(addrView_);
|
||||
@@ -728,7 +728,7 @@ void AddressPromptScreen::BackspaceDigit() {
|
||||
}
|
||||
|
||||
void AddressPromptScreen::UpdatePreviewDigits() {
|
||||
I18NCategory *dev = GetI18NCategory("Developer");
|
||||
auto dev = GetI18NCategory("Developer");
|
||||
|
||||
if (addr_ != 0) {
|
||||
char temp[32];
|
||||
@@ -761,8 +761,8 @@ bool AddressPromptScreen::key(const KeyInput &key) {
|
||||
|
||||
// Three panes: Block chooser, MIPS view, ARM/x86 view
|
||||
void JitCompareScreen::CreateViews() {
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
I18NCategory *dev = GetI18NCategory("Developer");
|
||||
auto di = GetI18NCategory("Dialog");
|
||||
auto dev = GetI18NCategory("Developer");
|
||||
|
||||
using namespace UI;
|
||||
|
||||
@@ -807,7 +807,7 @@ void JitCompareScreen::UpdateDisasm() {
|
||||
|
||||
using namespace UI;
|
||||
|
||||
I18NCategory *dev = GetI18NCategory("Developer");
|
||||
auto dev = GetI18NCategory("Developer");
|
||||
|
||||
JitBlockCacheDebugInterface *blockCacheDebug = MIPSComp::jit->GetBlockCacheDebugInterface();
|
||||
|
||||
@@ -898,7 +898,7 @@ UI::EventReturn JitCompareScreen::OnShowStats(UI::EventParams &e) {
|
||||
|
||||
|
||||
UI::EventReturn JitCompareScreen::OnSelectBlock(UI::EventParams &e) {
|
||||
I18NCategory *dev = GetI18NCategory("Developer");
|
||||
auto dev = GetI18NCategory("Developer");
|
||||
|
||||
auto addressPrompt = new AddressPromptScreen(dev->T("Block address"));
|
||||
addressPrompt->OnChoice.Handle(this, &JitCompareScreen::OnBlockAddress);
|
||||
@@ -1042,7 +1042,7 @@ struct { DebugShaderType type; const char *name; } shaderTypes[] = {
|
||||
void ShaderListScreen::CreateViews() {
|
||||
using namespace UI;
|
||||
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
auto di = GetI18NCategory("Dialog");
|
||||
|
||||
LinearLayout *layout = new LinearLayout(ORIENT_VERTICAL);
|
||||
root_ = layout;
|
||||
@@ -1071,7 +1071,7 @@ UI::EventReturn ShaderListScreen::OnShaderClick(UI::EventParams &e) {
|
||||
void ShaderViewScreen::CreateViews() {
|
||||
using namespace UI;
|
||||
|
||||
I18NCategory *di = GetI18NCategory("Dialog");
|
||||
auto di = GetI18NCategory("Dialog");
|
||||
|
||||
LinearLayout *layout = new LinearLayout(ORIENT_VERTICAL);
|
||||
root_ = layout;
|
||||
|
||||
Reference in new issue
Block a user