mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-01 19:23:04 +00:00
Add more missing features to NewUI, see #3226
This commit is contained in:
parent
0265ab874f
commit
a942395506
@ -92,7 +92,7 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename)
|
||||
cpu->Get("SeparateCPUThread", &bSeparateCPUThread, false);
|
||||
cpu->Get("SeparateIOThread", &bSeparateIOThread, false);
|
||||
cpu->Get("FastMemory", &bFastMemory, false);
|
||||
cpu->Get("CPUSpeed", &iLockedCPUSpeed, false);
|
||||
cpu->Get("CPUSpeed", &iLockedCPUSpeed, 0);
|
||||
|
||||
IniFile::Section *graphics = iniFile.GetOrCreateSection("Graphics");
|
||||
graphics->Get("ShowFPSCounter", &iShowFPSCounter, false);
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2013- PPSSPP Project.
|
||||
// Copyright (c) 2013- PPSSPP Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
@ -236,27 +236,31 @@ void GameSettingsScreen::CreateViews() {
|
||||
graphicsSettings->Add(new PopupMultiChoice(&g_Config.iRenderingMode, gs->T("Mode"), renderingMode, 0, 3, gs, screenManager()));
|
||||
#endif
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bAntiAliasing, gs->T("Anti-Aliasing")));
|
||||
graphicsSettings->Add(new ItemHeader(gs->T("Features")));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bHardwareTransform, gs->T("Hardware Transform")));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bVertexCache, gs->T("Vertex Cache")));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bStretchToDisplay, gs->T("Stretch to Display")));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bMipMap, gs->T("Mipmapping")));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bTrueColor, gs->T("True Color")));
|
||||
#ifdef _WIN32
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bVSync, gs->T("VSync")));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bFullScreen, gs->T("FullScreen")));
|
||||
#endif
|
||||
|
||||
graphicsSettings->Add(new ItemHeader(gs->T("Frame Rate Control")));
|
||||
static const char *frameSkip[] = {"Off", "Auto", "1", "2", "3", "4", "5", "6", "7", "8"};
|
||||
graphicsSettings->Add(new PopupMultiChoice(&g_Config.iFrameSkip, gs->T("Frame Skipping"), frameSkip, 0, 9, gs, screenManager()));
|
||||
static const char *fpsChoices[] = {"None", "Speed", "FPS", "Both"};
|
||||
|
||||
graphicsSettings->Add(new CheckBox(&cap60FPS_, gs->T("Force 60 FPS or less (helps GoW)")));
|
||||
static const char *customSpeed[] = {"25%", "50%", "75%", "100%", "125%", "150%", "200%", "300%"};
|
||||
graphicsSettings->Add(new PopupMultiChoice(&iAlternateSpeedPercent_, gs->T("Alternative Speed"), customSpeed, 0, 8, 0, screenManager()));
|
||||
|
||||
graphicsSettings->Add(new ItemHeader(gs->T("Features")));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bHardwareTransform, gs->T("Hardware Transform")));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bVertexCache, gs->T("Vertex Cache")));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bStretchToDisplay, gs->T("Stretch to Display")));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bMipMap, gs->T("Mipmapping")));
|
||||
// This setting is not really useful for anyone atm.
|
||||
// graphicsSettings->Add(new CheckBox(&g_Config.bTrueColor, gs->T("True Color")));
|
||||
#ifdef _WIN32
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bVSync, gs->T("VSync")));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bFullScreen, gs->T("FullScreen")));
|
||||
#endif
|
||||
|
||||
graphicsSettings->Add(new ItemHeader(gs->T("Overlay Information")));
|
||||
graphicsSettings->Add(new PopupMultiChoice(&g_Config.iShowFPSCounter, gs->T("Show FPS Counter"), fpsChoices, 0, 4, gs, screenManager()));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bShowDebugStats, gs->T("Show Debug Statistics")));
|
||||
graphicsSettings->Add(new CheckBox(&cap60FPS_, gs->T("Force 60 FPS or less (helps GoW)")));
|
||||
|
||||
graphicsSettings->Add(new ItemHeader(gs->T("Texture Scaling")));
|
||||
#ifndef USING_GLES2
|
||||
@ -275,6 +279,10 @@ void GameSettingsScreen::CreateViews() {
|
||||
static const char *texFilters[] = { "Auto", "Nearest", "Linear", "Linear on FMV", };
|
||||
graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexFiltering, gs->T("Texture Filter"), texFilters, 1, 4, gs, screenManager()));
|
||||
|
||||
// Developer tools are not accessible ingame, so it goes here
|
||||
graphicsSettings->Add(new ItemHeader(gs->T("Debugging")));
|
||||
graphicsSettings->Add(new Choice(gs->T("Dump next frame to log")))->OnClick.Handle(this, &GameSettingsScreen::OnDumpNextFrameToLog);
|
||||
|
||||
// Audio
|
||||
ViewGroup *audioSettingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
ViewGroup *audioSettings = new LinearLayout(ORIENT_VERTICAL);
|
||||
@ -309,6 +317,9 @@ void GameSettingsScreen::CreateViews() {
|
||||
systemSettingsScroll->Add(systemSettings);
|
||||
tabHolder->AddTab(ms->T("System"), systemSettingsScroll);
|
||||
|
||||
systemSettings->Add(new ItemHeader(s->T("Emulation")));
|
||||
systemSettings->Add(new CheckBox(&g_Config.bFastMemory, s->T("Fast Memory", "Fast Memory (Unstable)")));
|
||||
|
||||
#ifdef IOS
|
||||
if (isJailed) {
|
||||
systemSettings->Add(new TextView(s->T("DynarecisJailed", "Dynarec (JIT) - (Not jailbroken - JIT not available)")));
|
||||
@ -318,9 +329,10 @@ void GameSettingsScreen::CreateViews() {
|
||||
#else
|
||||
systemSettings->Add(new CheckBox(&g_Config.bJit, s->T("Dynarec", "Dynarec (JIT)")));
|
||||
#endif
|
||||
systemSettings->Add(new CheckBox(&g_Config.bFastMemory, s->T("Fast Memory", "Fast Memory (Unstable)")));
|
||||
systemSettings->Add(new CheckBox(&g_Config.bSeparateCPUThread, s->T("Multithreaded (experimental)")));
|
||||
systemSettings->Add(new PopupSliderChoice(&g_Config.iLockedCPUSpeed, 0, 1000, gs->T("Change CPU Clock", "Change CPU Clock (0 = default)"), screenManager()));
|
||||
|
||||
systemSettings->Add(new ItemHeader(s->T("PSP Settings")));
|
||||
systemSettings->Add(new CheckBox(&g_Config.bDayLightSavings, s->T("Day Light Saving")));
|
||||
static const char *dateFormat[] = { "YYYYMMDD", "MMDDYYYY", "DDMMYYYY"};
|
||||
systemSettings->Add(new PopupMultiChoice(&g_Config.iDateFormat, gs->T("Date Format"), dateFormat, 1, 3, s, screenManager()));
|
||||
@ -332,6 +344,11 @@ void GameSettingsScreen::CreateViews() {
|
||||
|
||||
void DrawBackground(float alpha);
|
||||
|
||||
UI::EventReturn GameSettingsScreen::OnDumpNextFrameToLog(UI::EventParams &e) {
|
||||
gpu->DumpNextFrame();
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
void GameSettingsScreen::DrawBackground(UIContext &dc) {
|
||||
GameInfo *ginfo = g_gameInfoCache.GetInfo(gamePath_, true);
|
||||
dc.Flush();
|
||||
@ -366,6 +383,11 @@ void GameSettingsScreen::update(InputState &input) {
|
||||
g_Config.iFpsLimit = alternateSpeedTable[iAlternateSpeedPercent_];
|
||||
}
|
||||
|
||||
UI::EventReturn GameSettingsScreen::OnDownloadPlugin(UI::EventParams &e) {
|
||||
screenManager()->push(new PluginScreen());
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
UI::EventReturn GameSettingsScreen::OnBack(UI::EventParams &e) {
|
||||
screenManager()->finishDialog(this, DR_OK);
|
||||
|
||||
@ -481,6 +503,8 @@ void DeveloperToolsScreen::CreateViews() {
|
||||
list->Add(new CheckBox(&g_Config.bSoftwareRendering, gs->T("Software Rendering", "Software Rendering (experimental)")));
|
||||
#endif
|
||||
list->Add(new CheckBox(&enableLogging_, d->T("Enable Logging")))->OnClick.Handle(this, &DeveloperToolsScreen::OnLoggingChanged);
|
||||
list->Add(new Choice(d->T("Load language ini")))->OnClick.Handle(this, &DeveloperToolsScreen::OnLoadLanguageIni);
|
||||
list->Add(new Choice(d->T("Save language ini")))->OnClick.Handle(this, &DeveloperToolsScreen::OnSaveLanguageIni);
|
||||
list->Add(new Choice(g->T("Back")))->OnClick.Handle(this, &DeveloperToolsScreen::OnBack);
|
||||
}
|
||||
|
||||
@ -513,7 +537,12 @@ UI::EventReturn DeveloperToolsScreen::OnRunCPUTests(UI::EventParams &e) {
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
UI::EventReturn GameSettingsScreen::OnDownloadPlugin(UI::EventParams &e) {
|
||||
screenManager()->push(new PluginScreen());
|
||||
UI::EventReturn DeveloperToolsScreen::OnSaveLanguageIni(UI::EventParams &e) {
|
||||
i18nrepo.SaveIni(g_Config.languageIni);
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
UI::EventReturn DeveloperToolsScreen::OnLoadLanguageIni(UI::EventParams &e) {
|
||||
i18nrepo.LoadIni(g_Config.languageIni);
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ private:
|
||||
// Event handlers
|
||||
UI::EventReturn OnDownloadPlugin(UI::EventParams &e);
|
||||
UI::EventReturn OnControlMapping(UI::EventParams &e);
|
||||
UI::EventReturn OnDumpNextFrameToLog(UI::EventParams &e);
|
||||
UI::EventReturn OnBack(UI::EventParams &e);
|
||||
|
||||
// Temporaries to convert bools to int settings
|
||||
@ -80,6 +81,8 @@ private:
|
||||
UI::EventReturn OnRunCPUTests(UI::EventParams &e);
|
||||
UI::EventReturn OnSysInfo(UI::EventParams &e);
|
||||
UI::EventReturn OnLoggingChanged(UI::EventParams &e);
|
||||
UI::EventReturn OnLoadLanguageIni(UI::EventParams &e);
|
||||
UI::EventReturn OnSaveLanguageIni(UI::EventParams &e);
|
||||
|
||||
// Temporary variable.
|
||||
bool enableLogging_;
|
||||
|
@ -447,7 +447,7 @@ void MainScreen::CreateViews() {
|
||||
m->T("How to get games"), "http://www.ppsspp.org/faq.html",
|
||||
new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
GameBrowser *tabHomebrew = new GameBrowser(g_Config.memCardDirectory + "PSP/GAME/", false,
|
||||
m->T("Download demos (non-affiliated site)"), "http://www.pspdemocenter.com/",
|
||||
"", "",
|
||||
new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
|
||||
scrollRecentGames->Add(tabRecentGames);
|
||||
|
@ -152,7 +152,9 @@ NewLanguageScreen::NewLanguageScreen() : ListPopupScreen("Language") {
|
||||
adaptor_ = UI::StringVectorListAdaptor(listing, selected);
|
||||
}
|
||||
|
||||
void NewLanguageScreen::OnCompleted() {
|
||||
void NewLanguageScreen::OnCompleted(DialogResult result) {
|
||||
if (result != DR_OK)
|
||||
return;
|
||||
std::string oldLang = g_Config.languageIni;
|
||||
|
||||
std::string iniFile = langs_[listView_->GetSelected()].name;
|
||||
|
@ -67,14 +67,13 @@ public:
|
||||
NewLanguageScreen();
|
||||
|
||||
private:
|
||||
virtual void OnCompleted();
|
||||
|
||||
virtual void OnCompleted(DialogResult result);
|
||||
virtual bool ShowButtons() const { return true; }
|
||||
std::map<std::string, std::pair<std::string, int>> langValuesMapping;
|
||||
std::map<std::string, std::string> titleCodeMapping;
|
||||
std::vector<FileInfo> langs_;
|
||||
};
|
||||
|
||||
|
||||
class LogoScreen : public UIScreen {
|
||||
public:
|
||||
LogoScreen(const std::string &bootFilename)
|
||||
|
2
native
2
native
@ -1 +1 @@
|
||||
Subproject commit 0819b421716f01cb46b4c36dcb99468b8bb5ad9a
|
||||
Subproject commit 2d6f742694d1de6d58ee99af3707c9592671311b
|
Loading…
x
Reference in New Issue
Block a user