mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Minor cleanup
This commit is contained in:
1 parent
8baa31fdb5
commit
4af47ff7b2
2 files changed
+11
-21
No files matched your search
+11
-17
@@ -809,7 +809,9 @@ void GameSettingsScreen::CreateAudioSettings(UI::ViewGroup *audioSettings) {
|
||||
if (!micList.empty()) {
|
||||
audioSettings->Add(new ItemHeader(a->T("Microphone")));
|
||||
PopupMultiChoiceDynamic *MicChoice = audioSettings->Add(new PopupMultiChoiceDynamic(&g_Config.sMicDevice, a->T("Microphone Device"), micList, I18NCat::NONE, screenManager()));
|
||||
MicChoice->OnChoice.Handle(this, &GameSettingsScreen::OnMicDeviceChange);
|
||||
MicChoice->OnChoice.Add([](UI::EventParams &e) {
|
||||
Microphone::onMicDeviceChange();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1010,7 +1012,11 @@ void GameSettingsScreen::CreateNetworkingSettings(UI::ViewGroup *networkingSetti
|
||||
networkingSettings->Add(new ItemHeader(ms->T("Networking")));
|
||||
|
||||
Choice *wiki = networkingSettings->Add(new Choice(n->T("Open PPSSPP Multiplayer Wiki Page"), ImageID("I_LINK_OUT")));
|
||||
wiki->OnClick.Handle(this, &GameSettingsScreen::OnAdhocGuides);
|
||||
wiki->OnClick.Add([](EventParams &e) {
|
||||
auto n = GetI18NCategory(I18NCat::NETWORKING);
|
||||
std::string url(n->T("MultiplayerHowToURL", "https://github.com/hrydgard/ppsspp/wiki/How-to-play-multiplayer-games-with-PPSSPP"));
|
||||
System_LaunchUrl(LaunchUrlType::BROWSER_URL, url.c_str());
|
||||
});
|
||||
|
||||
networkingSettings->Add(new CheckBox(&g_Config.bEnableWlan, n->T("Enable networking", "Enable networking/wlan (beta)")));
|
||||
networkingSettings->Add(new MacAddressChooser(GetRequesterToken(), gamePath_, &g_Config.sMACAddress, n->T("Change Mac Address"), screenManager()));
|
||||
@@ -1440,7 +1446,9 @@ void GameSettingsScreen::CreateSystemSettings(UI::ViewGroup *systemSettings) {
|
||||
if (cameraList.size() >= 1) {
|
||||
systemSettings->Add(new ItemHeader(gr->T("Camera")));
|
||||
PopupMultiChoiceDynamic *cameraChoice = systemSettings->Add(new PopupMultiChoiceDynamic(&g_Config.sCameraDevice, gr->T("Camera Device"), cameraList, I18NCat::NONE, screenManager()));
|
||||
cameraChoice->OnChoice.Handle(this, &GameSettingsScreen::OnCameraDeviceChange);
|
||||
cameraChoice->OnChoice.Add([](UI::EventParams &e) {
|
||||
Camera::onCameraDeviceChange();
|
||||
});
|
||||
#if PPSSPP_PLATFORM(WINDOWS) && !PPSSPP_PLATFORM(UWP)
|
||||
systemSettings->Add(new CheckBox(&g_Config.bCameraMirrorHorizontal, gr->T("Mirror camera image")));
|
||||
#endif
|
||||
@@ -1516,12 +1524,6 @@ void GameSettingsScreen::CreateVRSettings(UI::ViewGroup *vrSettings) {
|
||||
vrSettings->Add(new CheckBox(&g_Config.bManualForceVR, vr->T("Manual switching between flat screen and VR using SCREEN key")));
|
||||
}
|
||||
|
||||
void GameSettingsScreen::OnAdhocGuides(UI::EventParams &e) {
|
||||
auto n = GetI18NCategory(I18NCat::NETWORKING);
|
||||
std::string url(n->T("MultiplayerHowToURL", "https://github.com/hrydgard/ppsspp/wiki/How-to-play-multiplayer-games-with-PPSSPP"));
|
||||
System_LaunchUrl(LaunchUrlType::BROWSER_URL, url.c_str());
|
||||
}
|
||||
|
||||
void GameSettingsScreen::OnImmersiveModeChange(UI::EventParams &e) {
|
||||
System_Notify(SystemNotification::IMMERSIVE_MODE_CHANGE);
|
||||
if (g_Config.iAndroidHwScale != 0) {
|
||||
@@ -1785,14 +1787,6 @@ void GameSettingsScreen::OnInflightFramesChoice(UI::EventParams &e) {
|
||||
}
|
||||
}
|
||||
|
||||
void GameSettingsScreen::OnCameraDeviceChange(UI::EventParams& e) {
|
||||
Camera::onCameraDeviceChange();
|
||||
}
|
||||
|
||||
void GameSettingsScreen::OnMicDeviceChange(UI::EventParams& e) {
|
||||
Microphone::onMicDeviceChange();
|
||||
}
|
||||
|
||||
void GameSettingsScreen::OnAudioDevice(UI::EventParams &e) {
|
||||
auto a = GetI18NCategory(I18NCat::AUDIO);
|
||||
if (g_Config.sAudioDevice == a->T("Auto")) {
|
||||
|
||||
@@ -81,8 +81,6 @@ private:
|
||||
void OnRenderingBackend(UI::EventParams &e);
|
||||
void OnRenderingDevice(UI::EventParams &e);
|
||||
void OnInflightFramesChoice(UI::EventParams &e);
|
||||
void OnCameraDeviceChange(UI::EventParams& e);
|
||||
void OnMicDeviceChange(UI::EventParams& e);
|
||||
void OnAudioDevice(UI::EventParams &e);
|
||||
void OnJitAffectingSetting(UI::EventParams &e);
|
||||
void OnShowMemstickScreen(UI::EventParams &e);
|
||||
@@ -93,8 +91,6 @@ private:
|
||||
void OnImmersiveModeChange(UI::EventParams &e);
|
||||
void OnSustainedPerformanceModeChange(UI::EventParams &e);
|
||||
|
||||
void OnAdhocGuides(UI::EventParams &e);
|
||||
|
||||
void TriggerRestartOrDo(std::function<void()> callback);
|
||||
|
||||
// Temporaries to convert setting types, cache enabled, etc.
|
||||
|
||||
Reference in new issue
Block a user