mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-26 19:58:36 +01:00
Redesign the recent files API a bit.
This commit is contained in:
1 parent
e1be5c9279
commit
a50b303a38
13 files changed
+123
-122
No files matched your search
+3
-2
@@ -31,6 +31,7 @@
|
||||
#include "Common/File/VFS/VFS.h"
|
||||
#include "Common/TimeUtil.h"
|
||||
#include "Common/StringUtils.h"
|
||||
#include "Core/Util/RecentFiles.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Debugger/WebSocket.h"
|
||||
#include "Core/WebServer.h"
|
||||
@@ -172,7 +173,7 @@ static std::string RemotePathForRecent(const std::string &filename) {
|
||||
static Path LocalFromRemotePath(const std::string &path) {
|
||||
switch ((RemoteISOShareType)g_Config.iRemoteISOShareType) {
|
||||
case RemoteISOShareType::RECENT:
|
||||
for (const std::string &filename : g_Config.RecentIsos()) {
|
||||
for (const std::string &filename : g_recentFiles.GetRecentFiles()) {
|
||||
std::string basename = RemotePathForRecent(filename);
|
||||
if (basename == path) {
|
||||
return Path(filename);
|
||||
@@ -269,7 +270,7 @@ static void HandleListing(const http::ServerRequest &request) {
|
||||
switch ((RemoteISOShareType)g_Config.iRemoteISOShareType) {
|
||||
case RemoteISOShareType::RECENT:
|
||||
// List the current discs in their recent order.
|
||||
for (const std::string &filename : g_Config.RecentIsos()) {
|
||||
for (const std::string &filename : g_recentFiles.GetRecentFiles()) {
|
||||
std::string basename = RemotePathForRecent(filename);
|
||||
if (!basename.empty()) {
|
||||
request.Out()->Printf("%s\n", basename.c_str());
|
||||
|
||||
Reference in new issue
Block a user