Add camera/location support for iOS

Add front camera support for Android
Allow to change the active camera in-game
This commit is contained in:
Florin9doi committed 2020-01-25 16:54:45 +02:00
1 parent 1d6d66ac43
commit 5fbf2d7713
24 files changed
+409 -44

No files matched your search

+6 -2
View File
@@ -263,13 +263,12 @@ void GameSettingsScreen::CreateViews() {
softwareGPU->SetEnabled(false);
}
#if (defined(_WIN32) && !PPSSPP_PLATFORM(UWP)) || PPSSPP_PLATFORM(LINUX)
std::vector<std::string> cameraList = Camera::getDeviceList();
if (cameraList.size() >= 1) {
graphicsSettings->Add(new ItemHeader(gr->T("Camera")));
PopupMultiChoiceDynamic *cameraChoice = graphicsSettings->Add(new PopupMultiChoiceDynamic(&g_Config.sCameraDevice, gr->T("Camera Device"), cameraList, nullptr, screenManager()));
cameraChoice->OnChoice.Handle(this, &GameSettingsScreen::OnCameraDeviceChange);
}
#endif
graphicsSettings->Add(new ItemHeader(gr->T("Frame Rate Control")));
static const char *frameSkip[] = {"Off", "1", "2", "3", "4", "5", "6", "7", "8"};
@@ -1200,6 +1199,11 @@ UI::EventReturn GameSettingsScreen::OnRenderingDevice(UI::EventParams &e) {
return UI::EVENT_DONE;
}
UI::EventReturn GameSettingsScreen::OnCameraDeviceChange(UI::EventParams& e) {
Camera::onCameraDeviceChange();
return UI::EVENT_DONE;
}
UI::EventReturn GameSettingsScreen::OnAudioDevice(UI::EventParams &e) {
I18NCategory *a = GetI18NCategory("Audio");
if (g_Config.sAudioDevice == a->T("Auto")) {