Add some options.

This commit is contained in:
LunaMoo committed 2017-12-10 12:56:41 +01:00
1 parent 93a526db97
commit 2ed534f36e
9 files changed
+94 -4

No files matched your search

+1
View File
@@ -348,6 +348,7 @@ static ConfigSetting generalSettings[] = {
ConfigSetting("CurrentDirectory", &g_Config.currentDirectory, ""),
ConfigSetting("ShowDebuggerOnLoad", &g_Config.bShowDebuggerOnLoad, false),
ConfigSetting("SimpleUI", &g_Config.bSimpleUI, true),
ConfigSetting("SimpleUIhide", &g_Config.bSimpleUIhide, false),
ConfigSetting("CheckForNewVersion", &g_Config.bCheckForNewVersion, false),
ConfigSetting("Language", &g_Config.sLanguageIni, &DefaultLangRegion),
ConfigSetting("ForceLagSync", &g_Config.bForceLagSync, false, true, true),
+1
View File
@@ -130,6 +130,7 @@ public:
bool bFastMemory;
int iCpuCore;
bool bSimpleUI;
bool bSimpleUIhide;
bool bCheckForNewVersion;
bool bForceLagSync;
bool bFuncReplacements;
+1 -1
View File
@@ -82,7 +82,7 @@ struct ThreadQueueList {
cur = cur->next;
}
_dbg_assert_msg_(SCEKERNEL, false, "ThreadQueueList should not be empty.");
//_dbg_assert_msg_(SCEKERNEL, false, "ThreadQueueList should not be empty.");
return 0;
}
+41 -1
View File
@@ -651,6 +651,7 @@ void GameSettingsScreen::CreateViews() {
if (!g_Config.bSimpleUI) {
tools->Add(new Choice(dev->T("System Information")))->OnClick.Handle(this, &GameSettingsScreen::OnSysInfo);
tools->Add(new Choice(sy->T("Developer Tools")))->OnClick.Handle(this, &GameSettingsScreen::OnDeveloperTools);
tools->Add(new Choice(sy->T("Other Settings")))->OnClick.Handle(this, &GameSettingsScreen::OnOtherSettings);
}
tools->Add(new Choice(ri->T("Remote disc streaming")))->OnClick.Handle(this, &GameSettingsScreen::OnRemoteISO);
@@ -1033,7 +1034,11 @@ UI::EventReturn GameSettingsScreen::OnDumpNextFrameToLog(UI::EventParams &e) {
void GameSettingsScreen::update() {
UIScreen::update();
g_Config.iForceMaxEmulatedFPS = cap60FPS_ ? 60 : 0;
if (g_Config.iForceMaxEmulatedFPS == 60 || g_Config.iForceMaxEmulatedFPS == 0)
g_Config.iForceMaxEmulatedFPS = cap60FPS_ ? 60 : 0;
else
cap60FPS_ = false;
g_Config.iFpsLimit = (iAlternateSpeedPercent_ * 60) / 100;
@@ -1181,6 +1186,11 @@ UI::EventReturn GameSettingsScreen::OnDeveloperTools(UI::EventParams &e) {
return UI::EVENT_DONE;
}
UI::EventReturn GameSettingsScreen::OnOtherSettings(UI::EventParams &e) {
screenManager()->push(new OtherSettingsScreen());
return UI::EVENT_DONE;
}
UI::EventReturn GameSettingsScreen::OnRemoteISO(UI::EventParams &e) {
screenManager()->push(new RemoteISOScreen());
return UI::EVENT_DONE;
@@ -1288,6 +1298,36 @@ void DeveloperToolsScreen::onFinish(DialogResult result) {
g_Config.Save();
}
void OtherSettingsScreen::CreateViews() {
using namespace UI;
root_ = new LinearLayout(ORIENT_VERTICAL, new LayoutParams(FILL_PARENT, FILL_PARENT));
ScrollView *settingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(1.0f));
settingsScroll->SetTag("OtherSettings");
root_->Add(settingsScroll);
I18NCategory *gr = GetI18NCategory("Graphics");
I18NCategory *sy = GetI18NCategory("System");
AddStandardBack(root_);
LinearLayout *list = settingsScroll->Add(new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(1.0f)));
list->SetSpacing(0);
list->Add(new ItemHeader(sy->T("Settings that should not be changed by most users")));
list->Add(new CheckBox(&g_Config.bEncryptSave, sy->T("Encrypt savedata")));
list->Add(new CheckBox(&g_Config.bSavedataUpgrade, sy->T("Allow savedata with wrong encryption(unsafe workaround for outdated PSP savedata)")));
list->Add(new CheckBox(&g_Config.bFrameSkipUnthrottle, gr->T("Frameskip unthrottle(good for CPU benchmark)")));
list->Add(new CheckBox(&g_Config.bTrueColor, gr->T("True Color(Disable to get PSP colors)")));
PopupSliderChoice *emulatedSpeed = list->Add(new PopupSliderChoice(&g_Config.iForceMaxEmulatedFPS, 0, 60, gr->T("Force Max Emulated FPS(affects speed in most games!)"), 1, screenManager(), gr->T("FPS, 0:Disabled")));
emulatedSpeed->SetFormat("%i FPS");
emulatedSpeed->SetZeroLabel(gr->T("Disabled"));
}
void OtherSettingsScreen::onFinish(DialogResult result) {
g_Config.Save();
}
void GameSettingsScreen::CallbackRestoreDefaults(bool yes) {
if (yes)
g_Config.RestoreDefaults();
+13
View File
@@ -74,6 +74,7 @@ private:
UI::EventReturn OnPostProcShader(UI::EventParams &e);
UI::EventReturn OnPostProcShaderChange(UI::EventParams &e);
UI::EventReturn OnDeveloperTools(UI::EventParams &e);
UI::EventReturn OnOtherSettings(UI::EventParams &e);
UI::EventReturn OnRemoteISO(UI::EventParams &e);
UI::EventReturn OnChangeNickname(UI::EventParams &e);
UI::EventReturn OnChangeproAdhocServerAddress(UI::EventParams &e);
@@ -157,6 +158,18 @@ private:
UI::EventReturn OnJitAffectingSetting(UI::EventParams &e);
};
class OtherSettingsScreen : public UIDialogScreenWithBackground {
public:
OtherSettingsScreen() {}
void onFinish(DialogResult result) override;
protected:
void CreateViews() override;
private:
bool QualityDepth_;
};
class ProAdhocServerScreen : public UIDialogScreenWithBackground {
public:
ProAdhocServerScreen() {}
+2 -1
View File
@@ -853,7 +853,8 @@ void MainScreen::CreateViews() {
#endif
rightColumnItems->Add(new Choice(mm->T("Game Settings", "Settings")))->OnClick.Handle(this, &MainScreen::OnGameSettings);
rightColumnItems->Add(new Choice(mm->T("Credits")))->OnClick.Handle(this, &MainScreen::OnCredits);
rightColumnItems->Add(new CheckBox(&g_Config.bSimpleUI, mm->T("SimpleUI", "Simple UI")))->OnClick.Handle(this, &MainScreen::OnRecentChange);
if (!g_Config.bSimpleUIhide)
rightColumnItems->Add(new CheckBox(&g_Config.bSimpleUI, mm->T("SimpleUI", "Simple UI")))->OnClick.Handle(this, &MainScreen::OnRecentChange);
if (!g_Config.bSimpleUI) {
rightColumnItems->Add(new Choice(mm->T("www.ppsspp.org")))->OnClick.Handle(this, &MainScreen::OnPPSSPPOrg);
if (!System_GetPropertyBool(SYSPROP_APP_GOLD)) {
+2 -1
View File
@@ -84,7 +84,8 @@
<ProjectGuid>{004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>UI</RootNamespace>
<WindowsTargetPlatformVersion></WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>
</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+31
View File
@@ -87,6 +87,7 @@ namespace MainWindow {
MENU_DEBUG = 2,
MENU_OPTIONS = 3,
MENU_HELP = 4,
MENU_SIMPLEUI = 5,
// File submenus
SUBMENU_FILE_SAVESTATE_SLOT = 6,
@@ -159,6 +160,23 @@ namespace MainWindow {
AppendMenu(helpMenu, MF_STRING | MF_BYCOMMAND, ID_HELP_ABOUT, aboutPPSSPP.c_str());
}
void CreateSimpleUIMenu(HMENU menu) {
I18NCategory *des = GetI18NCategory("DesktopUI");
const std::wstring simpleUI = ConvertUTF8ToWString(des->T("Simple UI"));
const std::wstring enable = ConvertUTF8ToWString(des->T("Enable"));
const std::wstring hide = ConvertUTF8ToWString(des->T("Hide from main menu"));
// Simply remove the old help menu and create a new one.
RemoveMenu(menu, MENU_SIMPLEUI, MF_BYPOSITION);
HMENU simpleUImenu = CreatePopupMenu();
InsertMenu(menu, MENU_SIMPLEUI, MF_POPUP | MF_STRING | MF_BYPOSITION, (UINT_PTR)simpleUImenu, simpleUI.c_str());
AppendMenu(simpleUImenu, MF_STRING | MF_BYCOMMAND, ID_SIMPLEUI_TOGGLE, enable.c_str());
AppendMenu(simpleUImenu, MF_STRING | MF_BYCOMMAND, ID_SIMPLEUI_HIDE, hide.c_str());
}
void UpdateDynamicMenuCheckmarks(HMENU menu) {
int item = ID_SHADERS_BASE + 1;
@@ -250,6 +268,7 @@ namespace MainWindow {
TranslateMenu(menu, "Debugging", MENU_DEBUG);
TranslateMenu(menu, "Game Settings", MENU_OPTIONS);
TranslateMenu(menu, "Help", MENU_HELP);
TranslateMenu(menu, "Help", MENU_SIMPLEUI);
// File menu
TranslateMenuItem(menu, ID_FILE_LOAD);
@@ -352,6 +371,7 @@ namespace MainWindow {
// Help menu: it's translated in CreateHelpMenu.
CreateHelpMenu(menu);
CreateSimpleUIMenu(menu);
}
void TranslateMenus(HWND hWnd, HMENU menu) {
@@ -1034,6 +1054,15 @@ namespace MainWindow {
g_Config.bDumpAudio = !g_Config.bDumpAudio;
break;
case ID_SIMPLEUI_TOGGLE:
g_Config.bSimpleUI = !g_Config.bSimpleUI;
NativeMessageReceived("recreateviews", "");
break;
case ID_SIMPLEUI_HIDE:
g_Config.bSimpleUIhide = !g_Config.bSimpleUIhide;
NativeMessageReceived("recreateviews", "");
break;
default:
{
// Handle the dynamic shader switching here.
@@ -1078,6 +1107,8 @@ namespace MainWindow {
CHECKITEM(ID_FILE_DUMPFRAMES, g_Config.bDumpFrames);
CHECKITEM(ID_FILE_USEFFV1, g_Config.bUseFFV1);
CHECKITEM(ID_FILE_DUMPAUDIO, g_Config.bDumpAudio);
CHECKITEM(ID_SIMPLEUI_TOGGLE, g_Config.bSimpleUI);
CHECKITEM(ID_SIMPLEUI_HIDE, g_Config.bSimpleUIhide);
static const int displayrotationitems[] = {
ID_EMULATION_ROTATION_H,
+2
View File
@@ -334,6 +334,8 @@
#define ID_FILE_DUMPAUDIO 40167
#define ID_HELP_GITHUB 40168
#define IDC_GEDBG_RECORD 40169
#define ID_SIMPLEUI_TOGGLE 40200
#define ID_SIMPLEUI_HIDE 40201
// Dummy option to let the buffered rendering hotkey cycle through all the options.
#define ID_OPTIONS_BUFFEREDRENDERINGDUMMY 40500