Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SceCommonDialog: Add common_dialog.savedata.display_type == 0 #3208

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/2-feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Feature Request
description: Template for feature request
title: "[Feature Request]: "
labels: "Feature Request"
labels: "feature request"
body:
- type: markdown
attributes:
value: Tech support does not belong here. You should only file an issue here if you are requesting a feature you believe would make Vit3K better.
value: Tech support does not belong here. You should only file an issue here if you are requesting a feature you believe would make Vita3K better.
- type: checkboxes
attributes:
label: Is there an existing issue for this?
Expand Down
1 change: 1 addition & 0 deletions vita3k/dialog/include/dialog/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ enum SceSaveDataDialogListItemStyle {
};

enum SceSaveDataDialogType {
SCE_SAVEDATA_DIALOG_TYPE_HIDDEN = 0,
SCE_SAVEDATA_DIALOG_TYPE_SAVE = 1,
SCE_SAVEDATA_DIALOG_TYPE_LOAD = 2,
SCE_SAVEDATA_DIALOG_TYPE_DELETE = 3
Expand Down
6 changes: 3 additions & 3 deletions vita3k/gui/src/common_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -615,12 +615,12 @@ static void draw_savedata_dialog(GuiState &gui, EmuEnvState &emuenv, float FONT_
ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 12.f * SCALE.x);
const auto BUTTON_SIZE_HEIGHT = 46.f * SCALE.y;
const ImVec2 buttons_size(320.f * SCALE.x, BUTTON_SIZE_HEIGHT);
const auto boutton_height_pos = WINDOW_SIZE.y - BUTTON_SIZE_HEIGHT - (22 * SCALE.y);
const auto boutton_width_pos = HALF_WINDOW_SIZE.x - (emuenv.common_dialog.savedata.btn_num == 2 ? (buttons_size.x + (20.f * SCALE.x)) : (buttons_size.x / 2.f));
const auto button_height_pos = WINDOW_SIZE.y - BUTTON_SIZE_HEIGHT - (22 * SCALE.y);
const auto button_width_pos = HALF_WINDOW_SIZE.x - (emuenv.common_dialog.savedata.btn_num == 2 ? (buttons_size.x + (20.f * SCALE.x)) : (buttons_size.x / 2.f));
ImGui::BeginGroup();
for (int i = 0; i < emuenv.common_dialog.savedata.btn_num; i++) {
ImGui::PushID(i);
const ImVec2 button_id_pos(boutton_width_pos + (i * (buttons_size.x + (40.f * SCALE.x))), boutton_height_pos);
const ImVec2 button_id_pos(button_width_pos + (i * (buttons_size.x + (40.f * SCALE.x))), button_height_pos);
ImGui::SetCursorPos(button_id_pos);
if (ImGui::Button(emuenv.common_dialog.savedata.btn[i].c_str(), buttons_size)) {
emuenv.common_dialog.savedata.button_id = emuenv.common_dialog.savedata.btn_val[i];
Expand Down
3 changes: 3 additions & 0 deletions vita3k/modules/SceCommonDialog/SceCommonDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,9 @@ static void handle_sys_message(SceSaveDataDialogSystemMessageParam *sys_message,
break;
case SCE_SAVEDATA_DIALOG_SYSMSG_TYPE_FINISHED:
switch (emuenv.common_dialog.savedata.display_type) {
case SCE_SAVEDATA_DIALOG_TYPE_HIDDEN:
emuenv.common_dialog.status = SCE_COMMON_DIALOG_STATUS_FINISHED;
break;
case SCE_SAVEDATA_DIALOG_TYPE_SAVE:
emuenv.common_dialog.savedata.msg = save["saving_complete"];
break;
Expand Down