mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
Qt: simplify callbacks.resolve_path
This commit is contained in:
parent
7eee9e7b05
commit
5272dd951b
@ -9,8 +9,6 @@
|
||||
|
||||
#include <clocale>
|
||||
|
||||
#include <QFileInfo>
|
||||
|
||||
// For now, a trivial constructor/destructor. May add command line usage later.
|
||||
headless_application::headless_application(int& argc, char** argv) : QCoreApplication(argc, argv)
|
||||
{
|
||||
@ -134,11 +132,6 @@ void headless_application::InitializeCallbacks()
|
||||
|
||||
callbacks.play_sound = [](const std::string&){};
|
||||
|
||||
callbacks.resolve_path = [](std::string_view sv)
|
||||
{
|
||||
return QFileInfo(QString::fromUtf8(sv.data(), static_cast<int>(sv.size()))).canonicalFilePath().toStdString();
|
||||
};
|
||||
|
||||
Emu.SetCallbacks(std::move(callbacks));
|
||||
}
|
||||
|
||||
|
@ -32,6 +32,8 @@
|
||||
#include "Emu/Audio/FAudio/FAudioBackend.h"
|
||||
#endif
|
||||
|
||||
#include <QFileInfo> // This shouldn't be outside rpcs3qt...
|
||||
|
||||
LOG_CHANNEL(sys_log, "SYS");
|
||||
|
||||
/** Emu.Init() wrapper for user management */
|
||||
@ -134,5 +136,10 @@ EmuCallbacks main_application::CreateCallbacks()
|
||||
return result;
|
||||
};
|
||||
|
||||
callbacks.resolve_path = [](std::string_view sv)
|
||||
{
|
||||
return QFileInfo(QString::fromUtf8(sv.data(), static_cast<int>(sv.size()))).canonicalFilePath().toStdString();
|
||||
};
|
||||
|
||||
return callbacks;
|
||||
}
|
||||
|
@ -419,11 +419,6 @@ void gui_application::InitializeCallbacks()
|
||||
});
|
||||
};
|
||||
|
||||
callbacks.resolve_path = [](std::string_view sv)
|
||||
{
|
||||
return QFileInfo(QString::fromUtf8(sv.data(), static_cast<int>(sv.size()))).canonicalFilePath().toStdString();
|
||||
};
|
||||
|
||||
Emu.SetCallbacks(std::move(callbacks));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user