mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-25 08:32:48 -06:00
Removed Citra references from areas of shortcut generation code
This commit is contained in:
parent
1447c481c7
commit
2cd1ea1277
1 changed files with 10 additions and 10 deletions
|
@ -1896,7 +1896,7 @@ bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int message,
|
||||||
|
|
||||||
bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_view game_file_name,
|
bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_view game_file_name,
|
||||||
std::filesystem::path& out_icon_path) {
|
std::filesystem::path& out_icon_path) {
|
||||||
// Get path to Citra icons directory & icon extension
|
// Get path to Lime3DS icons directory & icon extension
|
||||||
std::string ico_extension = "png";
|
std::string ico_extension = "png";
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
out_icon_path = FileUtil::GetUserPath(FileUtil::UserPath::IconsDir);
|
out_icon_path = FileUtil::GetUserPath(FileUtil::UserPath::IconsDir);
|
||||||
|
@ -1916,19 +1916,19 @@ bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_vi
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create icon file path
|
// Create icon file path
|
||||||
out_icon_path /= (program_id == 0 ? fmt::format("citra-{}.{}", game_file_name, ico_extension)
|
out_icon_path /= (program_id == 0 ? fmt::format("lime-{}.{}", game_file_name, ico_extension)
|
||||||
: fmt::format("citra-{:016X}.{}", program_id, ico_extension));
|
: fmt::format("lime-{:016X}.{}", program_id, ico_extension));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& game_path,
|
void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& game_path,
|
||||||
GameListShortcutTarget target) {
|
GameListShortcutTarget target) {
|
||||||
// Get path to citra executable
|
// Get path to Lime3DS executable
|
||||||
const QStringList args = QApplication::arguments();
|
const QStringList args = QApplication::arguments();
|
||||||
std::filesystem::path citra_command = args[0].toStdString();
|
std::filesystem::path lime_command = args[0].toStdString();
|
||||||
// If relative path, make it an absolute path
|
// If relative path, make it an absolute path
|
||||||
if (citra_command.c_str()[0] == '.') {
|
if (lime_command.c_str()[0] == '.') {
|
||||||
citra_command = FileUtil::GetCurrentDir().value_or("") + DIR_SEP + citra_command.string();
|
lime_command = FileUtil::GetCurrentDir().value_or("") + DIR_SEP + lime_command.string();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shortcut path
|
// Shortcut path
|
||||||
|
@ -1984,7 +1984,7 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga
|
||||||
// Warn once if we are making a shortcut to a volatile AppImage
|
// Warn once if we are making a shortcut to a volatile AppImage
|
||||||
const std::string appimage_ending =
|
const std::string appimage_ending =
|
||||||
std::string(Common::g_scm_rev).substr(0, 9).append(".AppImage");
|
std::string(Common::g_scm_rev).substr(0, 9).append(".AppImage");
|
||||||
if (citra_command.string().ends_with(appimage_ending) &&
|
if (lime_command.string().ends_with(appimage_ending) &&
|
||||||
!UISettings::values.shortcut_already_warned) {
|
!UISettings::values.shortcut_already_warned) {
|
||||||
if (CreateShortcutMessagesGUI(this, CREATE_SHORTCUT_MSGBOX_APPIMAGE_VOLATILE_WARNING,
|
if (CreateShortcutMessagesGUI(this, CREATE_SHORTCUT_MSGBOX_APPIMAGE_VOLATILE_WARNING,
|
||||||
qt_game_title)) {
|
qt_game_title)) {
|
||||||
|
@ -1998,11 +1998,11 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga
|
||||||
if (CreateShortcutMessagesGUI(this, CREATE_SHORTCUT_MSGBOX_FULLSCREEN_PROMPT, qt_game_title)) {
|
if (CreateShortcutMessagesGUI(this, CREATE_SHORTCUT_MSGBOX_FULLSCREEN_PROMPT, qt_game_title)) {
|
||||||
arguments = "-f " + arguments;
|
arguments = "-f " + arguments;
|
||||||
}
|
}
|
||||||
const std::string comment = fmt::format("Start {:s} with the Citra Emulator", game_title);
|
const std::string comment = fmt::format("Start {:s} with the Lime3DS Emulator", game_title);
|
||||||
const std::string categories = "Game;Emulator;Qt;";
|
const std::string categories = "Game;Emulator;Qt;";
|
||||||
const std::string keywords = "3ds;Nintendo;";
|
const std::string keywords = "3ds;Nintendo;";
|
||||||
|
|
||||||
if (CreateShortcutLink(shortcut_path, comment, out_icon_path, citra_command, arguments,
|
if (CreateShortcutLink(shortcut_path, comment, out_icon_path, lime_command, arguments,
|
||||||
categories, keywords, game_title)) {
|
categories, keywords, game_title)) {
|
||||||
CreateShortcutMessagesGUI(this, CREATE_SHORTCUT_MSGBOX_SUCCESS, qt_game_title);
|
CreateShortcutMessagesGUI(this, CREATE_SHORTCUT_MSGBOX_SUCCESS, qt_game_title);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue