mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Code cleanup
This commit is contained in:
parent
132a00ade3
commit
b63f528a36
3 changed files with 9 additions and 19 deletions
|
@ -67,10 +67,6 @@
|
|||
#include "UI/ControlMappingScreen.h"
|
||||
#include "UI/GameSettingsScreen.h"
|
||||
|
||||
#if PPSSPP_PLATFORM(UWP)
|
||||
#include "UWP/UWPHelpers/StorageManager.h"
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "Common/CommonWindows.h"
|
||||
// Want to avoid including the full header here as it includes d3dx.h
|
||||
|
|
|
@ -94,10 +94,6 @@ extern AndroidAudioState *g_audioState;
|
|||
|
||||
#endif
|
||||
|
||||
#if PPSSPP_PLATFORM(UWP)
|
||||
#include "UWP/UWPHelpers/StorageManager.h"
|
||||
#endif
|
||||
|
||||
GameSettingsScreen::GameSettingsScreen(const Path &gamePath, std::string gameID, bool editThenRestore)
|
||||
: UIDialogScreenWithGameBackground(gamePath), gameID_(gameID), editThenRestore_(editThenRestore) {
|
||||
prevInflightFrames_ = g_Config.iInflightFrames;
|
||||
|
@ -977,12 +973,7 @@ void GameSettingsScreen::CreateSystemSettings(UI::ViewGroup *systemSettings) {
|
|||
systemSettings->Add(new Choice(sy->T("Set Memory Stick folder")))->OnClick.Handle(this, &GameSettingsScreen::OnChangeMemStickDir);
|
||||
#endif
|
||||
|
||||
#if PPSSPP_PLATFORM(UWP)
|
||||
memstickDisplay_ = g_Config.memStickDirectory.ToShortFriendlyPath();
|
||||
auto memstickPath = systemSettings->Add(new ChoiceWithValueDisplay(&memstickDisplay_, sy->T("Memory Stick folder", "Memory Stick folder"), I18NCat::NONE));
|
||||
memstickPath->SetEnabled(!PSP_IsInited());
|
||||
memstickPath->OnClick.Handle(this, &GameSettingsScreen::OnChangeMemStickDir);
|
||||
#elif PPSSPP_PLATFORM(ANDROID)
|
||||
#if PPSSPP_PLATFORM(ANDROID)
|
||||
if (System_GetPropertyInt(SYSPROP_DEVICE_TYPE) != DEVICE_TYPE_VR) {
|
||||
memstickDisplay_ = g_Config.memStickDirectory.ToVisualString();
|
||||
auto memstickPath = systemSettings->Add(new ChoiceWithValueDisplay(&memstickDisplay_, sy->T("Memory Stick folder", "Memory Stick folder"), I18NCat::NONE));
|
||||
|
@ -999,7 +990,13 @@ void GameSettingsScreen::CreateSystemSettings(UI::ViewGroup *systemSettings) {
|
|||
systemSettings->Add(new InfoItem(sy->T("USB"), usbPath))->SetChoiceStyle(true);
|
||||
}
|
||||
}
|
||||
#elif defined(_WIN32) && !PPSSPP_PLATFORM(UWP)
|
||||
#elif defined(_WIN32)
|
||||
#if PPSSPP_PLATFORM(UWP)
|
||||
memstickDisplay_ = g_Config.memStickDirectory.ToShortFriendlyPath();
|
||||
auto memstickPath = systemSettings->Add(new ChoiceWithValueDisplay(&memstickDisplay_, sy->T("Memory Stick folder", "Memory Stick folder"), I18NCat::NONE));
|
||||
memstickPath->SetEnabled(!PSP_IsInited());
|
||||
memstickPath->OnClick.Handle(this, &GameSettingsScreen::OnChangeMemStickDir);
|
||||
#else
|
||||
SavePathInMyDocumentChoice = systemSettings->Add(new CheckBox(&installed_, sy->T("Save path in My Documents", "Save path in My Documents")));
|
||||
SavePathInMyDocumentChoice->SetEnabled(!PSP_IsInited());
|
||||
SavePathInMyDocumentChoice->OnClick.Handle(this, &GameSettingsScreen::OnSavePathMydoc);
|
||||
|
@ -1042,6 +1039,7 @@ void GameSettingsScreen::CreateSystemSettings(UI::ViewGroup *systemSettings) {
|
|||
SavePathInMyDocumentChoice->SetEnabled(false);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
systemSettings->Add(new CheckBox(&g_Config.bMemStickInserted, sy->T("Memory Stick inserted")));
|
||||
UI::PopupSliderChoice *sizeChoice = systemSettings->Add(new PopupSliderChoice(&g_Config.iMemStickSizeGB, 1, 32, 16, sy->T("Memory Stick size", "Memory Stick size"), screenManager(), "GB"));
|
||||
|
|
|
@ -48,10 +48,6 @@
|
|||
#include "UI/MainScreen.h"
|
||||
#include "UI/MiscScreens.h"
|
||||
|
||||
#if PPSSPP_PLATFORM(UWP)
|
||||
#include "UWP/UWPHelpers/StorageManager.h"
|
||||
#endif
|
||||
|
||||
static bool FolderSeemsToBeUsed(Path newMemstickFolder) {
|
||||
// Inspect the potential new folder, quickly.
|
||||
if (File::Exists(newMemstickFolder / "PSP/SAVEDATA") || File::Exists(newMemstickFolder / "SAVEDATA")) {
|
||||
|
|
Loading…
Add table
Reference in a new issue