Skip to content

Commit

Permalink
Allow rif licenses to be selected during pkg installation.
Browse files Browse the repository at this point in the history
  • Loading branch information
nishinji committed Sep 8, 2023
1 parent de5a9a6 commit 4641ac0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions vita3k/gui/src/pkg_install_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void draw_pkg_install_dialog(GuiState &gui, EmuEnvState &emuenv) {
if (state.empty()) {
ImGui::SetCursorPosX(POS_BUTTON);
title = lang["select_key_type"];
if (ImGui::Button(lang["select_work"].c_str(), BUTTON_SIZE))
if (ImGui::Button(lang["select_bin_rif"].c_str(), BUTTON_SIZE))
state = "work";
ImGui::SetCursorPosX(POS_BUTTON);
if (ImGui::Button(lang["enter_zrif"].c_str(), BUTTON_SIZE))
Expand All @@ -98,7 +98,7 @@ void draw_pkg_install_dialog(GuiState &gui, EmuEnvState &emuenv) {
draw_file_dialog = true;
}
} else if (state == "work") {
result = host::dialog::filesystem::open_file(work_path, { { "PlayStation Vita software license file", { "bin" } } });
result = host::dialog::filesystem::open_file(work_path, { { "PlayStation Vita software license file", { "bin", "rif" } } });
if (result == host::dialog::filesystem::Result::SUCCESS) {
fs::ifstream binfile(work_path.wstring(), std::ios::in | std::ios::binary | std::ios::ate);
zRIF = rif2zrif(binfile);
Expand Down Expand Up @@ -145,7 +145,7 @@ void draw_pkg_install_dialog(GuiState &gui, EmuEnvState &emuenv) {
ImGui::Spacing();
ImGui::Checkbox(lang["delete_pkg"].c_str(), &delete_pkg_file);
if (work_path != "")
ImGui::Checkbox(lang["delete_work"].c_str(), &delete_work_file);
ImGui::Checkbox(lang["delete_bin_rif"].c_str(), &delete_work_file);
ImGui::Spacing();
ImGui::SetCursorPos(ImVec2(POS_BUTTON, ImGui::GetWindowSize().y - BUTTON_SIZE.y - (20.f * SCALE.y)));
if (ImGui::Button(common["ok"].c_str(), BUTTON_SIZE)) {
Expand Down
6 changes: 3 additions & 3 deletions vita3k/lang/include/lang/state.h
Original file line number Diff line number Diff line change
Expand Up @@ -328,14 +328,14 @@ struct LangState {
};
std::map<std::string, std::string> pkg_install = {
{ "select_key_type", "Select key type" },
{ "select_work", "Select work.bin" },
{ "select_bin_rif", "Select work.bin/rif" },
{ "enter_zrif", "Enter zRIF" },
{ "enter_zrif_key", "Enter zRIF key" },
{ "input_zrif", "Please input your zRIF here" },
{ "copy_paste_zrif", "Ctrl (Cmd) + C to copy, Ctrl (Cmd) + V to paste." },
{ "delete_pkg", "Delete the pkg file?" },
{ "delete_work", "Delete the work.bin file?" },
{ "failed_install_package", "Failed to install package.\nPlease check pkg and work.bin file or zRIF key." }
{ "delete_bin_rif", "Delete the work.bin/rif file?" },
{ "failed_install_package", "Failed to install package.\nPlease check pkg and work.bin/rif file or zRIF key." }
};
std::map<std::string, std::string> archive_install = {
{ "select_install_type", "Select install type" },
Expand Down

0 comments on commit 4641ac0

Please sign in to comment.