mirror of
https://github.com/libretro/ppsspp.git
synced 2025-01-23 17:45:04 +00:00
Transfer some features from oldUI to newUI
This commit is contained in:
parent
1fabe1f78e
commit
2b1777d4a7
@ -436,7 +436,7 @@ void DeveloperToolsScreen::CreateViews() {
|
||||
list->Add(new Choice(g->T("System Information")))->OnClick.Handle(this, &DeveloperToolsScreen::OnSysInfo);
|
||||
list->Add(new Choice(d->T("Run CPU Tests")))->OnClick.Handle(this, &DeveloperToolsScreen::OnRunCPUTests);
|
||||
list->Add(new CheckBox(&g_Config.bSoftwareRendering, gs->T("Software Rendering", "Software Rendering (experimental)")));
|
||||
list->Add(new CheckBox(&enableLogging_, d->T("Enable Debug Logging")));
|
||||
list->Add(new CheckBox(&enableLogging_, d->T("Enable Logging")))->OnClick.Handle(this, &DeveloperToolsScreen::OnLoggingChanged);
|
||||
list->Add(new Choice(g->T("Back")))->OnClick.Handle(this, &DeveloperToolsScreen::OnBack);
|
||||
}
|
||||
|
||||
@ -452,6 +452,11 @@ UI::EventReturn DeveloperToolsScreen::OnBack(UI::EventParams &e) {
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
UI::EventReturn DeveloperToolsScreen::OnLoggingChanged(UI::EventParams &e) {
|
||||
PostMessage(MainWindow::hwndMain, MainWindow::WM_USER_LOG_STATUS_CHANGED, 0, 0);
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
UI::EventReturn DeveloperToolsScreen::OnSysInfo(UI::EventParams &e) {
|
||||
screenManager()->push(new SystemInfoScreen());
|
||||
return UI::EVENT_DONE;
|
||||
|
@ -78,6 +78,7 @@ private:
|
||||
UI::EventReturn OnBack(UI::EventParams &e);
|
||||
UI::EventReturn OnRunCPUTests(UI::EventParams &e);
|
||||
UI::EventReturn OnSysInfo(UI::EventParams &e);
|
||||
UI::EventReturn OnLoggingChanged(UI::EventParams &e);
|
||||
|
||||
// Temporary variable.
|
||||
bool enableLogging_;
|
||||
|
@ -38,6 +38,12 @@
|
||||
#include "GPU/GPUInterface.h"
|
||||
#include "i18n/i18n.h"
|
||||
|
||||
#ifdef USING_QT_UI
|
||||
#include <QFileDialog>
|
||||
#include <QFile>
|
||||
#include <QDir>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
namespace MainWindow {
|
||||
void BrowseAndBoot(std::string defaultPath, bool browseDirectory = false);
|
||||
@ -474,7 +480,7 @@ void MainScreen::CreateViews() {
|
||||
ViewGroup *rightColumnItems = new LinearLayout(ORIENT_VERTICAL);
|
||||
rightColumn->Add(rightColumnItems);
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) || defined(USING_QT_UI)
|
||||
rightColumnItems->Add(new Choice(m->T("Load","Load...")))->OnClick.Handle(this, &MainScreen::OnLoadFile);
|
||||
#endif
|
||||
rightColumnItems->Add(new Choice(m->T("Game Settings")))->OnClick.Handle(this, &MainScreen::OnGameSettings);
|
||||
@ -496,7 +502,15 @@ void MainScreen::update(InputState &input) {
|
||||
}
|
||||
|
||||
UI::EventReturn MainScreen::OnLoadFile(UI::EventParams &e) {
|
||||
#ifdef _WIN32
|
||||
#if defined(USING_QT_UI) && !defined(MEEGO_EDITION_HARMATTAN)
|
||||
QString fileName = QFileDialog::getOpenFileName(NULL, "Load ROM", g_Config.currentDirectory.c_str(), "PSP ROMs (*.iso *.cso *.pbp *.elf)");
|
||||
if (QFile::exists(fileName)) {
|
||||
QDir newPath;
|
||||
g_Config.currentDirectory = newPath.filePath(fileName).toStdString();
|
||||
g_Config.Save();
|
||||
screenManager()->switchScreen(new EmuScreen(fileName.toStdString()));
|
||||
}
|
||||
#elif defined(_WIN32)
|
||||
MainWindow::BrowseAndBoot("");
|
||||
#endif
|
||||
return UI::EVENT_DONE;
|
||||
|
2
native
2
native
@ -1 +1 @@
|
||||
Subproject commit 89361d002f7755b4effedf67cf2fc1bf0d38e4bc
|
||||
Subproject commit 987aaa26d80fc897b2678cabbd09733e67b34303
|
Loading…
x
Reference in New Issue
Block a user