mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
overlays: add system sounds
This commit is contained in:
parent
59b1c324a9
commit
ff5e31f396
8 changed files with 37 additions and 9 deletions
|
@ -124,6 +124,7 @@ namespace rsx
|
|||
return_code = CELL_MSGDIALOG_BUTTON_YES;
|
||||
}
|
||||
|
||||
Emu.GetCallbacks().play_sound(fs::get_config_dir() + "sounds/snd_system_ok.wav");
|
||||
break;
|
||||
}
|
||||
case pad_button::circle:
|
||||
|
@ -143,6 +144,7 @@ namespace rsx
|
|||
return_code = CELL_MSGDIALOG_BUTTON_NO;
|
||||
}
|
||||
|
||||
Emu.GetCallbacks().play_sound(fs::get_config_dir() + "sounds/snd_cancel.wav");
|
||||
break;
|
||||
}
|
||||
default: return;
|
||||
|
|
|
@ -420,6 +420,8 @@ namespace rsx
|
|||
}
|
||||
};
|
||||
|
||||
bool play_cursor_sound = true;
|
||||
|
||||
switch (button_press)
|
||||
{
|
||||
case pad_button::L1:
|
||||
|
@ -522,7 +524,9 @@ namespace rsx
|
|||
}
|
||||
case pad_button::start:
|
||||
{
|
||||
Emu.GetCallbacks().play_sound(fs::get_config_dir() + "sounds/snd_system_ok.wav");
|
||||
Close(CELL_OSKDIALOG_CLOSE_CONFIRM);
|
||||
play_cursor_sound = false;
|
||||
break;
|
||||
}
|
||||
case pad_button::triangle:
|
||||
|
@ -537,13 +541,17 @@ namespace rsx
|
|||
}
|
||||
case pad_button::cross:
|
||||
{
|
||||
Emu.GetCallbacks().play_sound(fs::get_config_dir() + "sounds/snd_decide.wav");
|
||||
on_accept();
|
||||
m_reset_pulse = true;
|
||||
play_cursor_sound = false;
|
||||
break;
|
||||
}
|
||||
case pad_button::circle:
|
||||
{
|
||||
Emu.GetCallbacks().play_sound(fs::get_config_dir() + "sounds/snd_cancel.wav");
|
||||
Close(CELL_OSKDIALOG_CLOSE_CANCEL);
|
||||
play_cursor_sound = false;
|
||||
break;
|
||||
}
|
||||
case pad_button::L2:
|
||||
|
@ -560,6 +568,11 @@ namespace rsx
|
|||
break;
|
||||
}
|
||||
|
||||
if (play_cursor_sound)
|
||||
{
|
||||
Emu.GetCallbacks().play_sound(fs::get_config_dir() + "sounds/snd_cursor.wav");
|
||||
}
|
||||
|
||||
if (m_reset_pulse)
|
||||
{
|
||||
m_update = true;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "stdafx.h"
|
||||
#include "overlay_save_dialog.h"
|
||||
#include "Utilities/date_time.h"
|
||||
#include "Emu/System.h"
|
||||
|
||||
namespace rsx
|
||||
{
|
||||
|
@ -120,10 +121,13 @@ namespace rsx
|
|||
if (m_no_saves)
|
||||
break;
|
||||
return_code = m_list->get_selected_index();
|
||||
[[fallthrough]];
|
||||
case pad_button::circle:
|
||||
Emu.GetCallbacks().play_sound(fs::get_config_dir() + "sounds/snd_system_ok.wav");
|
||||
close(true, true);
|
||||
break;
|
||||
return;
|
||||
case pad_button::circle:
|
||||
Emu.GetCallbacks().play_sound(fs::get_config_dir() + "sounds/snd_cancel.wav");
|
||||
close(true, true);
|
||||
return;
|
||||
case pad_button::dpad_up:
|
||||
m_list->select_previous();
|
||||
break;
|
||||
|
@ -140,6 +144,8 @@ namespace rsx
|
|||
rsx_log.trace("[ui] Button %d pressed", static_cast<u8>(button_press));
|
||||
break;
|
||||
}
|
||||
|
||||
Emu.GetCallbacks().play_sound(fs::get_config_dir() + "sounds/snd_decide.wav");
|
||||
}
|
||||
|
||||
compiled_resource save_dialog::get_compiled()
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace rsx
|
|||
{
|
||||
// First tick
|
||||
creation_time = t;
|
||||
Emu.GetCallbacks().play_sound(fs::get_config_dir() + "sounds/trophy.wav");
|
||||
Emu.GetCallbacks().play_sound(fs::get_config_dir() + "sounds/snd_trophy.wav");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include "overlay_user_list_dialog.h"
|
||||
#include "Emu/vfs_config.h"
|
||||
#include "Emu/system_utils.hpp"
|
||||
#include "Emu/System.h"
|
||||
#include "Utilities/StrUtil.h"
|
||||
#include "Utilities/Thread.h"
|
||||
|
||||
|
@ -98,10 +99,13 @@ namespace rsx
|
|||
{
|
||||
return_code = selection_code::error;
|
||||
}
|
||||
[[fallthrough]];
|
||||
case pad_button::circle:
|
||||
Emu.GetCallbacks().play_sound(fs::get_config_dir() + "sounds/snd_system_ok.wav");
|
||||
close(true, true);
|
||||
break;
|
||||
return;
|
||||
case pad_button::circle:
|
||||
Emu.GetCallbacks().play_sound(fs::get_config_dir() + "sounds/snd_cancel.wav");
|
||||
close(true, true);
|
||||
return;
|
||||
case pad_button::dpad_up:
|
||||
m_list->select_previous();
|
||||
break;
|
||||
|
@ -118,6 +122,8 @@ namespace rsx
|
|||
rsx_log.trace("[ui] Button %d pressed", static_cast<u8>(button_press));
|
||||
break;
|
||||
}
|
||||
|
||||
Emu.GetCallbacks().play_sound(fs::get_config_dir() + "sounds/snd_decide.wav");
|
||||
}
|
||||
|
||||
compiled_resource user_list_dialog::get_compiled()
|
||||
|
|
|
@ -277,6 +277,7 @@ void Emulator::Init(bool add_only)
|
|||
make_path_verbose(fs::get_cache_dir() + "shaderlog/");
|
||||
make_path_verbose(fs::get_cache_dir() + "spu_progs/");
|
||||
make_path_verbose(fs::get_config_dir() + "captures/");
|
||||
make_path_verbose(fs::get_config_dir() + "sounds/");
|
||||
make_path_verbose(patch_engine::get_patches_path());
|
||||
|
||||
if (add_only)
|
||||
|
|
|
@ -722,7 +722,7 @@ void gs_frame::take_screenshot(std::vector<u8> data, const u32 sshot_width, cons
|
|||
// Play a sound
|
||||
Emu.CallAfter([]()
|
||||
{
|
||||
if (const std::string sound_path = fs::get_config_dir() + "sounds/screenshot.wav"; fs::is_file(sound_path))
|
||||
if (const std::string sound_path = fs::get_config_dir() + "sounds/snd_screenshot.wav"; fs::is_file(sound_path))
|
||||
{
|
||||
QSound::play(qstr(sound_path));
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ s32 trophy_notification_helper::ShowTrophyNotification(const SceNpTrophyDetails&
|
|||
trophy_notification->move(m_game_window->mapToGlobal(QPoint(0, 0)));
|
||||
trophy_notification->show();
|
||||
|
||||
Emu.GetCallbacks().play_sound(fs::get_config_dir() + "sounds/trophy.wav");
|
||||
Emu.GetCallbacks().play_sound(fs::get_config_dir() + "sounds/snd_trophy.wav");
|
||||
});
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue