mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 19:45:20 +00:00
Merge branch 'master' into panvk
This commit is contained in:
commit
4acf8d9faf
39 changed files with 294 additions and 73 deletions
2
3rdparty/FAudio
vendored
2
3rdparty/FAudio
vendored
|
@ -1 +1 @@
|
|||
Subproject commit b7c2e109ea86b82109244c9c4569ce9ad0c884df
|
||||
Subproject commit 707114aef2907793644d4067a6e7b09b51502ca9
|
2
3rdparty/libsdl-org/SDL
vendored
2
3rdparty/libsdl-org/SDL
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 9c821dc21ccbd69b2bda421fdb35cb4ae2da8f5e
|
||||
Subproject commit fa24d868ac2f8fd558e4e914c9863411245db8fd
|
2
3rdparty/qt6.cmake
vendored
2
3rdparty/qt6.cmake
vendored
|
@ -1,6 +1,6 @@
|
|||
add_library(3rdparty_qt6 INTERFACE)
|
||||
|
||||
set(QT_MIN_VER 6.4.0)
|
||||
set(QT_MIN_VER 6.7.0)
|
||||
|
||||
find_package(Qt6 ${QT_MIN_VER} CONFIG COMPONENTS Widgets Concurrent Multimedia MultimediaWidgets Svg SvgWidgets)
|
||||
if(WIN32)
|
||||
|
|
2
3rdparty/wolfssl/wolfssl
vendored
2
3rdparty/wolfssl/wolfssl
vendored
|
@ -1 +1 @@
|
|||
Subproject commit bdd62314f00fca0e216bf8c963c8eeff6327e0cb
|
||||
Subproject commit 239b85c80438bf60d9a5b9e0ebe9ff097a760d0d
|
91
3rdparty/wolfssl/wolfssl.vcxproj
vendored
91
3rdparty/wolfssl/wolfssl.vcxproj
vendored
|
@ -139,6 +139,94 @@
|
|||
<ItemGroup>
|
||||
<ClInclude Include="extra\win32\user_settings.h" />
|
||||
<ClInclude Include="wolfssl\resource.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\aes.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\arc4.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\asn.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\asn_public.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\blake2-impl.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\blake2-int.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\blake2.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\camellia.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\chacha.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\chacha20_poly1305.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\cmac.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\coding.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\compress.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\cpuid.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\cryptocb.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\curve25519.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\curve448.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\des3.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\dh.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\dilithium.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\dsa.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ecc.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\eccsi.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ed25519.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ed448.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\error-crypt.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ext_kyber.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ext_lms.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ext_xmss.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\falcon.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\fe_448.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\fe_operations.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\fips_test.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ge_448.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ge_operations.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\hash.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\hmac.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\hpke.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\integer.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\kdf.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\kyber.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\lms.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\logging.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\md2.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\md4.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\md5.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\memory.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\mem_track.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\misc.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\mpi_class.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\mpi_superclass.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\pkcs11.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\pkcs12.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\pkcs7.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\poly1305.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\pwdbased.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\random.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\rc2.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ripemd.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\rsa.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sakke.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\selftest.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\settings.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sha.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sha256.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sha3.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sha512.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\signature.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\siphash.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sm2.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sm3.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sm4.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sp.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sphincs.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sp_int.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\srp.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\tfm.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\types.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\visibility.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_encrypt.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_kyber.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_lms.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_pkcs11.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_port.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_xmss.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wolfevent.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wolfmath.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\xmss.h" />
|
||||
<CustomBuild Include="wolfssl\wolfcrypt\src\aes_asm.asm">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">false</ExcludedFromBuild>
|
||||
|
@ -160,6 +248,9 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="wolfssl\wolfssl\wolfcrypt\include.am" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
|
2
3rdparty/xxHash
vendored
2
3rdparty/xxHash
vendored
|
@ -1 +1 @@
|
|||
Subproject commit bbb27a5efb85b92a0486cf361a8635715a53f6ba
|
||||
Subproject commit e626a72bc2321cd320e953a0ccf1584cad60f363
|
39
rpcs3/Emu/Audio/audio_utils.cpp
Normal file
39
rpcs3/Emu/Audio/audio_utils.cpp
Normal file
|
@ -0,0 +1,39 @@
|
|||
#include "stdafx.h"
|
||||
#include "audio_utils.h"
|
||||
#include "Emu/system_config.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/IdManager.h"
|
||||
#include "Emu/RSX/Overlays/overlay_message.h"
|
||||
|
||||
namespace audio
|
||||
{
|
||||
f32 get_volume()
|
||||
{
|
||||
return g_fxo->get<audio_fxo>().audio_muted ? 0.0f : g_cfg.audio.volume / 100.0f;
|
||||
}
|
||||
|
||||
void toggle_mute()
|
||||
{
|
||||
audio_fxo& fxo = g_fxo->get<audio_fxo>();
|
||||
fxo.audio_muted = !fxo.audio_muted;
|
||||
Emu.GetCallbacks().update_emu_settings();
|
||||
|
||||
rsx::overlays::queue_message(fxo.audio_muted ? localized_string_id::AUDIO_MUTED : localized_string_id::AUDIO_UNMUTED, 3'000'000);
|
||||
}
|
||||
|
||||
void change_volume(s32 delta)
|
||||
{
|
||||
// Ignore if muted
|
||||
if (g_fxo->get<audio_fxo>().audio_muted) return;
|
||||
|
||||
const s32 old_volume = g_cfg.audio.volume;
|
||||
const s32 new_volume = old_volume + delta;
|
||||
|
||||
if (old_volume == new_volume) return;
|
||||
|
||||
g_cfg.audio.volume.set(std::clamp<s32>(new_volume, g_cfg.audio.volume.min, g_cfg.audio.volume.max));
|
||||
Emu.GetCallbacks().update_emu_settings();
|
||||
|
||||
rsx::overlays::queue_message(get_localized_string(localized_string_id::AUDIO_CHANGED, fmt::format("%d%%", g_cfg.audio.volume.get()).c_str()), 3'000'000);
|
||||
}
|
||||
}
|
14
rpcs3/Emu/Audio/audio_utils.h
Normal file
14
rpcs3/Emu/Audio/audio_utils.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#pragma once
|
||||
|
||||
namespace audio
|
||||
{
|
||||
struct audio_fxo
|
||||
{
|
||||
atomic_t<bool> audio_muted {false};
|
||||
};
|
||||
|
||||
f32 get_volume();
|
||||
|
||||
void toggle_mute();
|
||||
void change_volume(s32 delta);
|
||||
}
|
|
@ -125,6 +125,7 @@ target_sources(rpcs3_emu PRIVATE
|
|||
# Audio
|
||||
target_sources(rpcs3_emu PRIVATE
|
||||
Audio/audio_resampler.cpp
|
||||
Audio/audio_utils.cpp
|
||||
Audio/AudioDumper.cpp
|
||||
Audio/AudioBackend.cpp
|
||||
Audio/Cubeb/CubebBackend.cpp
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/system_config.h"
|
||||
#include "Emu/Audio/audio_utils.h"
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
#include "Emu/Cell/lv2/sys_process.h"
|
||||
#include "Emu/Cell/lv2/sys_event.h"
|
||||
|
@ -1041,7 +1042,7 @@ void cell_audio_thread::mix(float* out_buffer, s32 offset)
|
|||
constexpr u32 out_channels = static_cast<u32>(channels);
|
||||
constexpr u32 out_buffer_sz = out_channels * AUDIO_BUFFER_SAMPLES;
|
||||
|
||||
const float master_volume = g_cfg.audio.volume / 100.0f;
|
||||
const float master_volume = audio::get_volume();
|
||||
|
||||
// Reset out_buffer
|
||||
std::memset(out_buffer, 0, out_buffer_sz * sizeof(float));
|
||||
|
|
|
@ -71,7 +71,7 @@ CellError lv2_cond::on_id_create()
|
|||
|
||||
std::function<void(void*)> lv2_cond::load(utils::serial& ar)
|
||||
{
|
||||
return load_func(make_shared<lv2_cond>(ar));
|
||||
return load_func(make_shared<lv2_cond>(stx::exact_t<utils::serial&>(ar)));
|
||||
}
|
||||
|
||||
void lv2_cond::save(utils::serial& ar)
|
||||
|
|
|
@ -37,8 +37,8 @@ lv2_event_queue::lv2_event_queue(utils::serial& ar) noexcept
|
|||
|
||||
std::function<void(void*)> lv2_event_queue::load(utils::serial& ar)
|
||||
{
|
||||
auto queue = make_shared<lv2_event_queue>(ar);
|
||||
return [ptr = lv2_obj::load(queue->key, queue)](void* storage) { *static_cast<shared_ptr<lv2_obj>*>(storage) = ptr; };
|
||||
auto queue = make_shared<lv2_event_queue>(stx::exact_t<utils::serial&>(ar));
|
||||
return [ptr = lv2_obj::load(queue->key, queue)](void* storage) { *static_cast<atomic_ptr<lv2_obj>*>(storage) = ptr; };
|
||||
}
|
||||
|
||||
void lv2_event_queue::save(utils::serial& ar)
|
||||
|
|
|
@ -24,7 +24,7 @@ lv2_event_flag::lv2_event_flag(utils::serial& ar)
|
|||
|
||||
std::function<void(void*)> lv2_event_flag::load(utils::serial& ar)
|
||||
{
|
||||
return load_func(make_shared<lv2_event_flag>(ar));
|
||||
return load_func(make_shared<lv2_event_flag>(stx::exact_t<utils::serial&>(ar)));
|
||||
}
|
||||
|
||||
void lv2_event_flag::save(utils::serial& ar)
|
||||
|
|
|
@ -33,7 +33,7 @@ std::function<void(void*)> lv2_memory_container::load(utils::serial& ar)
|
|||
// Use idm::last_id() only for the instances at IDM
|
||||
return [ptr = make_shared<lv2_memory_container>(stx::exact_t<utils::serial&>(ar), true)](void* storage)
|
||||
{
|
||||
*static_cast<shared_ptr<lv2_memory_container>*>(storage) = ptr;
|
||||
*static_cast<atomic_ptr<lv2_memory_container>*>(storage) = ptr;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ CellError lv2_memory::on_id_create()
|
|||
|
||||
std::function<void(void*)> lv2_memory::load(utils::serial& ar)
|
||||
{
|
||||
auto mem = make_shared<lv2_memory>(ar);
|
||||
auto mem = make_shared<lv2_memory>(stx::exact_t<utils::serial&>(ar));
|
||||
mem->exists++; // Disable on_id_create()
|
||||
auto func = load_func(mem, +mem->pshared);
|
||||
mem->exists--;
|
||||
|
|
|
@ -27,7 +27,7 @@ lv2_mutex::lv2_mutex(utils::serial& ar)
|
|||
|
||||
std::function<void(void*)> lv2_mutex::load(utils::serial& ar)
|
||||
{
|
||||
return load_func(make_shared<lv2_mutex>(ar));
|
||||
return load_func(make_shared<lv2_mutex>(stx::exact_t<utils::serial&>(ar)));
|
||||
}
|
||||
|
||||
void lv2_mutex::save(utils::serial& ar)
|
||||
|
|
|
@ -293,7 +293,7 @@ std::function<void(void*)> lv2_socket::load(utils::serial& ar)
|
|||
sock_lv2->bind(sock_lv2->last_bound_addr);
|
||||
}
|
||||
|
||||
return [ptr = sock_lv2](void* storage) { *static_cast<shared_ptr<lv2_socket>*>(storage) = ptr; };;
|
||||
return [ptr = sock_lv2](void* storage) { *static_cast<atomic_ptr<lv2_socket>*>(storage) = ptr; };;
|
||||
}
|
||||
|
||||
void lv2_socket::save(utils::serial& ar, bool save_only_this_class)
|
||||
|
|
|
@ -112,7 +112,7 @@ std::function<void(void*)> lv2_overlay::load(utils::serial& ar)
|
|||
|
||||
return [ovlm](void* storage)
|
||||
{
|
||||
*static_cast<shared_ptr<lv2_obj>*>(storage) = ovlm;
|
||||
*static_cast<atomic_ptr<lv2_obj>*>(storage) = ovlm;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -372,7 +372,7 @@ std::function<void(void*)> lv2_prx::load(utils::serial& ar)
|
|||
|
||||
return [prx](void* storage)
|
||||
{
|
||||
*static_cast<shared_ptr<lv2_obj>*>(storage) = prx;
|
||||
*static_cast<atomic_ptr<lv2_obj>*>(storage) = prx;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "Emu/IdManager.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/system_config.h"
|
||||
#include "Emu//Audio/audio_utils.h"
|
||||
#include "Emu//Cell/Modules/cellAudioOut.h"
|
||||
#include "util/video_provider.h"
|
||||
|
||||
|
@ -1308,11 +1309,11 @@ rsxaudio_backend_thread::rsxaudio_backend_thread()
|
|||
{
|
||||
new_emu_cfg = get_emu_cfg();
|
||||
|
||||
const u64 new_vol = g_cfg.audio.volume;
|
||||
const f32 new_vol = audio::get_volume();
|
||||
|
||||
callback_cfg.atomic_op([&](callback_config& val)
|
||||
{
|
||||
val.target_volume = static_cast<u16>(new_vol / 100.0 * callback_config::VOL_NOMINAL);
|
||||
val.target_volume = static_cast<u16>(new_vol * callback_config::VOL_NOMINAL);
|
||||
val.initial_volume = val.current_volume;
|
||||
});
|
||||
}
|
||||
|
@ -1332,11 +1333,11 @@ void rsxaudio_backend_thread::update_emu_cfg()
|
|||
{
|
||||
std::unique_lock lock(state_update_m);
|
||||
const emu_audio_cfg _new_emu_cfg = get_emu_cfg();
|
||||
const u64 new_vol = g_cfg.audio.volume;
|
||||
const f32 new_vol = audio::get_volume();
|
||||
|
||||
callback_cfg.atomic_op([&](callback_config& val)
|
||||
{
|
||||
val.target_volume = static_cast<u16>(new_vol / 100.0 * callback_config::VOL_NOMINAL);
|
||||
val.target_volume = static_cast<u16>(new_vol * callback_config::VOL_NOMINAL);
|
||||
val.initial_volume = val.current_volume;
|
||||
});
|
||||
|
||||
|
|
|
@ -449,7 +449,7 @@ public:
|
|||
static std::function<void(void*)> load_func(shared_ptr<T> make, u64 pshared = umax)
|
||||
{
|
||||
const u64 key = make->key;
|
||||
return [ptr = load<T>(key, make, pshared)](void* storage) { *static_cast<shared_ptr<Storage>*>(storage) = ptr; };
|
||||
return [ptr = load<T>(key, make, pshared)](void* storage) { *static_cast<atomic_ptr<Storage>*>(storage) = ptr; };
|
||||
}
|
||||
|
||||
static bool wait_timeout(u64 usec, ppu_thread* cpu = {}, bool scale = true, bool is_usleep = false);
|
||||
|
|
|
@ -147,7 +147,7 @@ u64 convert_to_timebased_time(u64 time)
|
|||
|
||||
u64 get_timebased_time()
|
||||
{
|
||||
if (u64 freq = utils::get_tsc_freq())
|
||||
if (0) if (u64 freq = utils::get_tsc_freq())
|
||||
{
|
||||
const u64 tsc = utils::get_tsc();
|
||||
|
||||
|
@ -207,7 +207,7 @@ void initialize_timebased_time(u64 timebased_init, bool reset)
|
|||
// Returns some relative time in microseconds, don't change this fact
|
||||
u64 get_system_time()
|
||||
{
|
||||
if (u64 freq = utils::get_tsc_freq())
|
||||
if (0) if (u64 freq = utils::get_tsc_freq())
|
||||
{
|
||||
const u64 tsc = utils::get_tsc();
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ namespace id_manager
|
|||
ptr = stx::make_shared<T>(stx::exact_t<utils::serial&>(ar));
|
||||
}
|
||||
|
||||
return [ptr](void* storage) { *static_cast<stx::shared_ptr<T>*>(storage) = ptr; };
|
||||
return [ptr](void* storage) { *static_cast<stx::atomic_ptr<T>*>(storage) = ptr; };
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ namespace rsx
|
|||
{
|
||||
m_dim_background = std::make_unique<overlay_element>();
|
||||
m_dim_background->set_size(virtual_width, virtual_height);
|
||||
m_dim_background->back_color.a = 0.5f;
|
||||
m_dim_background->back_color.a = 0.9f;
|
||||
|
||||
m_list = std::make_unique<list_view>(virtual_width - 2 * 20, 540);
|
||||
m_list->set_pos(20, 85);
|
||||
|
|
|
@ -282,6 +282,10 @@ enum class localized_string_id
|
|||
HOME_MENU_TROPHY_GRADE_GOLD,
|
||||
HOME_MENU_TROPHY_GRADE_PLATINUM,
|
||||
|
||||
AUDIO_MUTED,
|
||||
AUDIO_UNMUTED,
|
||||
AUDIO_CHANGED,
|
||||
|
||||
PROGRESS_DIALOG_PROGRESS,
|
||||
PROGRESS_DIALOG_PROGRESS_ANALYZING,
|
||||
PROGRESS_DIALOG_REMAINING,
|
||||
|
@ -303,6 +307,7 @@ enum class localized_string_id
|
|||
EMULATION_PAUSED_RESUME_WITH_START,
|
||||
EMULATION_RESUMING,
|
||||
EMULATION_FROZEN,
|
||||
|
||||
SAVESTATE_FAILED_DUE_TO_VDEC,
|
||||
SAVESTATE_FAILED_DUE_TO_SAVEDATA,
|
||||
SAVESTATE_FAILED_DUE_TO_SPU,
|
||||
|
|
|
@ -41,6 +41,7 @@ void progress_dialog_server::operator()()
|
|||
{
|
||||
std::shared_ptr<rsx::overlays::progress_dialog> native_dlg;
|
||||
g_system_progress_stopping = false;
|
||||
g_system_progress_canceled = false;
|
||||
|
||||
const auto get_state = []()
|
||||
{
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "sdl_pad_handler.h"
|
||||
#include "Emu/system_utils.hpp"
|
||||
#include "Emu/system_config.h"
|
||||
#include "Emu/System.h"
|
||||
|
||||
#include <mutex>
|
||||
|
||||
|
@ -262,7 +263,14 @@ bool sdl_pad_handler::Init()
|
|||
if (m_is_init)
|
||||
return true;
|
||||
|
||||
if (!sdl_instance::get_instance().initialize())
|
||||
bool instance_success;
|
||||
|
||||
Emu.BlockingCallFromMainThread([&instance_success]()
|
||||
{
|
||||
instance_success = sdl_instance::get_instance().initialize();
|
||||
});
|
||||
|
||||
if (!instance_success)
|
||||
return false;
|
||||
|
||||
if (g_cfg.io.load_sdl_mappings)
|
||||
|
|
|
@ -40,10 +40,10 @@
|
|||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>..\3rdparty\miniupnp\miniupnp\miniupnpc\include;..\3rdparty\wolfssl\wolfssl;..\3rdparty\flatbuffers\include;..\3rdparty\libusb\libusb\libusb;..\3rdparty\yaml-cpp\yaml-cpp\include;..\3rdparty\SoundTouch\soundtouch\include;..\3rdparty\rtmidi\rtmidi;..\3rdparty\zlib\zlib;$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build\include;$(SolutionDir)build\lib_ext\$(Configuration)-$(Platform)\llvm_build\include;$(SolutionDir)build\lib_ext\$(Configuration)-$(Platform)\llvm\include;$(VULKAN_SDK)\Include;..\3rdparty\zstd\zstd\lib;$(SolutionDir)3rdparty\fusion\fusion\Fusion</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\3rdparty\miniupnp\miniupnp\miniupnpc\include;..\3rdparty\wolfssl\wolfssl;..\3rdparty\flatbuffers\include;..\3rdparty\libusb\libusb\libusb;..\3rdparty\yaml-cpp\yaml-cpp\include;..\3rdparty\SoundTouch\soundtouch\include;..\3rdparty\rtmidi\rtmidi;..\3rdparty\zlib\zlib;$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build\include;$(SolutionDir)build\lib_ext\$(Configuration)-$(Platform)\llvm_build\include;$(SolutionDir)build\lib_ext\$(Configuration)-$(Platform)\llvm\include;$(VULKAN_SDK)\Include;..\3rdparty\zstd\zstd\lib;$(SolutionDir)3rdparty\fusion\fusion\Fusion;$(SolutionDir)3rdparty\wolfssl\extra\win32</AdditionalIncludeDirectories>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AL_LIBTYPE_STATIC;MINIUPNP_STATICLIB;HAVE_VULKAN;HAVE_SDL2;ZLIB_CONST;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AL_LIBTYPE_STATIC;MINIUPNP_STATICLIB;HAVE_VULKAN;HAVE_SDL2;ZLIB_CONST;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AL_LIBTYPE_STATIC;MINIUPNP_STATICLIB;HAVE_VULKAN;HAVE_SDL2;ZLIB_CONST;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AL_LIBTYPE_STATIC;MINIUPNP_STATICLIB;HAVE_VULKAN;HAVE_SDL2;ZLIB_CONST;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalModuleDependencies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalModuleDependencies)</AdditionalModuleDependencies>
|
||||
<AdditionalModuleDependencies Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalModuleDependencies)</AdditionalModuleDependencies>
|
||||
</ClCompile>
|
||||
|
@ -58,6 +58,7 @@
|
|||
<ClCompile Include="Crypto\decrypt_binaries.cpp" />
|
||||
<ClCompile Include="Crypto\unzip.cpp" />
|
||||
<ClCompile Include="Emu\Audio\audio_resampler.cpp" />
|
||||
<ClCompile Include="Emu\Audio\audio_utils.cpp" />
|
||||
<ClCompile Include="Emu\Audio\FAudio\FAudioBackend.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
|
@ -530,6 +531,7 @@
|
|||
<ClInclude Include="Crypto\unzip.h" />
|
||||
<ClInclude Include="Emu\Audio\audio_resampler.h" />
|
||||
<ClInclude Include="Emu\Audio\audio_device_enumerator.h" />
|
||||
<ClInclude Include="Emu\Audio\audio_utils.h" />
|
||||
<ClInclude Include="Emu\Audio\FAudio\FAudioBackend.h">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
|
|
|
@ -1324,6 +1324,9 @@
|
|||
<ClCompile Include="Emu\RSX\Overlays\Trophies\overlay_trophy_list_dialog.cpp">
|
||||
<Filter>Emu\GPU\RSX\Overlays\Trophies</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\Audio\audio_utils.cpp">
|
||||
<Filter>Emu\Audio</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Crypto\aes.h">
|
||||
|
@ -2677,6 +2680,9 @@
|
|||
<ClInclude Include="Emu\RSX\Overlays\Trophies\overlay_trophy_list_dialog.h">
|
||||
<Filter>Emu\GPU\RSX\Overlays\Trophies</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Audio\audio_utils.h">
|
||||
<Filter>Emu\Audio</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Emu\RSX\Program\GLSLSnippets\GPUDeswizzle.glsl">
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\opencv\opencv\opencv410\build\include;$(SolutionDir)3rdparty\SoundTouch\soundtouch\include;$(SolutionDir)3rdparty\cubeb\extra;$(SolutionDir)3rdparty\cubeb\cubeb\include\;$(SolutionDir)3rdparty\flatbuffers\include;$(SolutionDir)3rdparty\wolfssl\wolfssl;$(SolutionDir)3rdparty\curl\curl\include;$(SolutionDir)3rdparty\rtmidi\rtmidi;$(SolutionDir)3rdparty\libusb\libusb\libusb;$(VULKAN_SDK)\Include;$(SolutionDir)3rdparty\libsdl-org\SDL\include;$(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtConcurrent;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtSvg;$(QTDIR)\include\QtSvgWidgets;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtMultimedia;$(QTDIR)\mkspecs\win32-msvc;.\release;.\QTGeneratedFiles\$(ConfigurationName);.\QTGeneratedFiles;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\opencv\opencv\opencv410\build\include;$(SolutionDir)3rdparty\SoundTouch\soundtouch\include;$(SolutionDir)3rdparty\cubeb\extra;$(SolutionDir)3rdparty\cubeb\cubeb\include\;$(SolutionDir)3rdparty\flatbuffers\include;$(SolutionDir)3rdparty\wolfssl\wolfssl;$(SolutionDir)3rdparty\wolfssl\extra\win32;$(SolutionDir)3rdparty\curl\curl\include;$(SolutionDir)3rdparty\rtmidi\rtmidi;$(SolutionDir)3rdparty\libusb\libusb\libusb;$(VULKAN_SDK)\Include;$(SolutionDir)3rdparty\libsdl-org\SDL\include;$(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtConcurrent;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtSvg;$(QTDIR)\include\QtSvgWidgets;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtMultimedia;$(QTDIR)\mkspecs\win32-msvc;.\release;.\QTGeneratedFiles\$(ConfigurationName);.\QTGeneratedFiles;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/Zc:__cplusplus -Zc:strictStrings -Zc:throwingNew- -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AssemblerListingLocation>release\</AssemblerListingLocation>
|
||||
<BrowseInformation>false</BrowseInformation>
|
||||
|
@ -79,7 +79,7 @@
|
|||
<DisableSpecificWarnings>4577;4467;4281;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;WIN32;WIN64;WIN32_LEAN_AND_MEAN;HAVE_VULKAN;HAVE_OPENCV;CV_IGNORE_DEBUG_BUILD_GUARD;MINIUPNP_STATICLIB;ZLIB_CONST;AL_LIBTYPE_STATIC;HAVE_SDL2;WITH_DISCORD_RPC;QT_NO_DEBUG;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;NDEBUG;QT_WINEXTRAS_LIB;QT_CONCURRENT_LIB;QT_MULTIMEDIA_LIB;QT_MULTIMEDIAWIDGETS_LIB;QT_SVG_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;WIN32;WIN64;WIN32_LEAN_AND_MEAN;HAVE_VULKAN;HAVE_OPENCV;CV_IGNORE_DEBUG_BUILD_GUARD;MINIUPNP_STATICLIB;ZLIB_CONST;AL_LIBTYPE_STATIC;WOLFSSL_USER_SETTINGS;HAVE_SDL2;WITH_DISCORD_RPC;QT_NO_DEBUG;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;NDEBUG;QT_WINEXTRAS_LIB;QT_CONCURRENT_LIB;QT_MULTIMEDIA_LIB;QT_MULTIMEDIAWIDGETS_LIB;QT_SVG_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessToFile>false</PreprocessToFile>
|
||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
|
@ -124,7 +124,7 @@
|
|||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\opencv\opencv\opencv410\build\include;$(SolutionDir)3rdparty\SoundTouch\soundtouch\include;$(SolutionDir)3rdparty\cubeb\extra;$(SolutionDir)3rdparty\cubeb\cubeb\include\;$(SolutionDir)3rdparty\flatbuffers\include;$(SolutionDir)3rdparty\wolfssl\wolfssl;$(SolutionDir)3rdparty\curl\curl\include;$(SolutionDir)3rdparty\rtmidi\rtmidi;$(SolutionDir)3rdparty\libusb\libusb\libusb;$(VULKAN_SDK)\Include;$(SolutionDir)3rdparty\libsdl-org\SDL\include;$(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtConcurrent;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtSvg;$(QTDIR)\include\QtSvgWidgets;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtMultimedia;$(QTDIR)\mkspecs\win32-msvc;.\debug;.\QTGeneratedFiles\$(ConfigurationName);.\QTGeneratedFiles;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\opencv\opencv\opencv410\build\include;$(SolutionDir)3rdparty\SoundTouch\soundtouch\include;$(SolutionDir)3rdparty\cubeb\extra;$(SolutionDir)3rdparty\cubeb\cubeb\include\;$(SolutionDir)3rdparty\flatbuffers\include;$(SolutionDir)3rdparty\wolfssl\wolfssl;$(SolutionDir)3rdparty\wolfssl\extra\win32;$(SolutionDir)3rdparty\curl\curl\include;$(SolutionDir)3rdparty\rtmidi\rtmidi;$(SolutionDir)3rdparty\libusb\libusb\libusb;$(VULKAN_SDK)\Include;$(SolutionDir)3rdparty\libsdl-org\SDL\include;$(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtConcurrent;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtSvg;$(QTDIR)\include\QtSvgWidgets;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtMultimedia;$(QTDIR)\mkspecs\win32-msvc;.\debug;.\QTGeneratedFiles\$(ConfigurationName);.\QTGeneratedFiles;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/Zc:__cplusplus -Zc:strictStrings -Zc:throwingNew- -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AssemblerListingLocation>debug\</AssemblerListingLocation>
|
||||
<BrowseInformation>false</BrowseInformation>
|
||||
|
@ -132,7 +132,7 @@
|
|||
<DisableSpecificWarnings>4577;4467;4281;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;WIN32;WIN64;WIN32_LEAN_AND_MEAN;HAVE_VULKAN;HAVE_OPENCV;CV_IGNORE_DEBUG_BUILD_GUARD;MINIUPNP_STATICLIB;ZLIB_CONST;AL_LIBTYPE_STATIC;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;QT_WINEXTRAS_LIB;QT_CONCURRENT_LIB;QT_MULTIMEDIA_LIB;QT_MULTIMEDIAWIDGETS_LIB;QT_SVG_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;WIN32;WIN64;WIN32_LEAN_AND_MEAN;HAVE_VULKAN;HAVE_OPENCV;CV_IGNORE_DEBUG_BUILD_GUARD;MINIUPNP_STATICLIB;ZLIB_CONST;AL_LIBTYPE_STATIC;WOLFSSL_USER_SETTINGS;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;QT_WINEXTRAS_LIB;QT_CONCURRENT_LIB;QT_MULTIMEDIA_LIB;QT_MULTIMEDIAWIDGETS_LIB;QT_SVG_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessToFile>false</PreprocessToFile>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
|
|
|
@ -2277,11 +2277,13 @@ void game_list_frame::RemoveHDD1Cache(const std::string& base_dir, const std::st
|
|||
game_list_log.fatal("Only %d/%d HDD1 cache directories could be removed in %s (%s)", dirs_removed, dirs_total, base_dir, title_id);
|
||||
}
|
||||
|
||||
void game_list_frame::BatchActionBySerials(progress_dialog* pdlg, const std::set<std::string>& serials, QString progressLabel, std::function<bool(const std::string&)> action, std::function<void(u32, u32)> cancel_log, bool refresh_on_finish, bool can_be_concurrent, std::function<bool()> should_wait_cb)
|
||||
void game_list_frame::BatchActionBySerials(progress_dialog* pdlg, const std::set<std::string>& serials, QString progressLabel, std::function<bool(const std::string&)> action, std::function<void(u32, u32)> cancel_log, bool refresh_on_finish, bool can_be_concurrent, std::function<bool()> should_wait_cb)
|
||||
{
|
||||
// Concurrent tasks should not wait (at least not in current implementation)
|
||||
ensure(!should_wait_cb || !can_be_concurrent);
|
||||
|
||||
g_system_progress_canceled = false;
|
||||
|
||||
const std::shared_ptr<std::function<bool(int)>> iterate_over_serial = std::make_shared<std::function<bool(int)>>();
|
||||
|
||||
const std::shared_ptr<atomic_t<int>> index = std::make_shared<atomic_t<int>>(0);
|
||||
|
@ -2297,12 +2299,16 @@ void game_list_frame::BatchActionBySerials(progress_dialog* pdlg, const std::set
|
|||
|
||||
const std::string& serial = *std::next(serials.begin(), index);
|
||||
|
||||
if (pdlg->wasCanceled() || g_system_progress_canceled)
|
||||
if (pdlg->wasCanceled() || g_system_progress_canceled.exchange(false))
|
||||
{
|
||||
cancel_log(index, serials_size);
|
||||
if (cancel_log)
|
||||
{
|
||||
cancel_log(index, serials_size);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else if (action(serial))
|
||||
|
||||
if (action(serial))
|
||||
{
|
||||
const int done = index_ptr->load();
|
||||
pdlg->setLabelText(progressLabel.arg(done + 1).arg(serials_size));
|
||||
|
@ -2360,19 +2366,17 @@ void game_list_frame::BatchActionBySerials(progress_dialog* pdlg, const std::set
|
|||
if ((*iterate_over_serial)(*index))
|
||||
{
|
||||
QTimer::singleShot(1, this, *periodic_func);
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
||||
pdlg->setLabelText(progressLabel.arg(*index).arg(serials_size));
|
||||
pdlg->setCancelButtonText(tr("OK"));
|
||||
connect(pdlg, &progress_dialog::canceled, this, [pdlg](){ pdlg->deleteLater(); });
|
||||
QApplication::beep();
|
||||
|
||||
if (refresh_on_finish && index)
|
||||
{
|
||||
pdlg->setLabelText(progressLabel.arg(*index).arg(serials_size));
|
||||
pdlg->setCancelButtonText(tr("OK"));
|
||||
QApplication::beep();
|
||||
|
||||
if (refresh_on_finish && index)
|
||||
{
|
||||
Refresh(true);
|
||||
}
|
||||
|
||||
pdlg->deleteLater();
|
||||
Refresh(true);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -2414,6 +2418,14 @@ void game_list_frame::BatchCreateCPUCaches(const std::vector<game_info>& game_da
|
|||
pdlg->setAutoReset(false);
|
||||
pdlg->open();
|
||||
|
||||
connect(pdlg, &progress_dialog::canceled, this, []()
|
||||
{
|
||||
if (!Emu.IsStopped())
|
||||
{
|
||||
Emu.GracefulShutdown(false, true);
|
||||
}
|
||||
});
|
||||
|
||||
BatchActionBySerials(pdlg, serials, tr("%0\nProgress: %1/%2 caches compiled").arg(main_label),
|
||||
[&, game_data](const std::string& serial)
|
||||
{
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "Emu/system_config.h"
|
||||
#include "Emu/system_progress.hpp"
|
||||
#include "Emu/IdManager.h"
|
||||
#include "Emu/Audio/audio_utils.h"
|
||||
#include "Emu/Cell/Modules/cellScreenshot.h"
|
||||
#include "Emu/Cell/Modules/cellVideoOut.h"
|
||||
#include "Emu/Cell/Modules/cellAudio.h"
|
||||
|
@ -358,6 +359,21 @@ void gs_frame::handle_shortcut(gui::shortcuts::shortcut shortcut_key, const QKey
|
|||
pad::g_home_menu_requested = true;
|
||||
break;
|
||||
}
|
||||
case gui::shortcuts::shortcut::gw_mute_unmute:
|
||||
{
|
||||
audio::toggle_mute();
|
||||
break;
|
||||
}
|
||||
case gui::shortcuts::shortcut::gw_volume_up:
|
||||
{
|
||||
audio::change_volume(5);
|
||||
break;
|
||||
}
|
||||
case gui::shortcuts::shortcut::gw_volume_down:
|
||||
{
|
||||
audio::change_volume(-5);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "_discord_utils.h"
|
||||
#endif
|
||||
|
||||
#include "Emu/Audio/audio_utils.h"
|
||||
#include "Emu/Io/Null/null_camera_handler.h"
|
||||
#include "Emu/Io/Null/null_music_handler.h"
|
||||
#include "Emu/vfs_config.h"
|
||||
|
@ -621,7 +622,7 @@ void gui_application::InitializeCallbacks()
|
|||
// Create a new sound effect. Re-using the same object seems to be broken for some users starting with Qt 6.6.3.
|
||||
std::unique_ptr<QSoundEffect> sound_effect = std::make_unique<QSoundEffect>();
|
||||
sound_effect->setSource(QUrl::fromLocalFile(QString::fromStdString(path)));
|
||||
sound_effect->setVolume(g_cfg.audio.volume * 0.01f);
|
||||
sound_effect->setVolume(audio::get_volume());
|
||||
sound_effect->play();
|
||||
|
||||
m_sound_effects.push_back(std::move(sound_effect));
|
||||
|
|
|
@ -302,6 +302,9 @@ private:
|
|||
case localized_string_id::HOME_MENU_TROPHY_GRADE_SILVER: return tr("Silver", "Trophy type");
|
||||
case localized_string_id::HOME_MENU_TROPHY_GRADE_GOLD: return tr("Gold", "Trophy type");
|
||||
case localized_string_id::HOME_MENU_TROPHY_GRADE_PLATINUM: return tr("Platinum", "Trophy type");
|
||||
case localized_string_id::AUDIO_MUTED: return tr("Audio muted", "Audio");
|
||||
case localized_string_id::AUDIO_UNMUTED: return tr("Audio unmuted", "Audio");
|
||||
case localized_string_id::AUDIO_CHANGED: return tr("Volume changed to %0", "Audio").arg(std::forward<Args>(args)...);
|
||||
case localized_string_id::PROGRESS_DIALOG_PROGRESS: return tr("Progress:");
|
||||
case localized_string_id::PROGRESS_DIALOG_PROGRESS_ANALYZING: return tr("Progress: analyzing...");
|
||||
case localized_string_id::PROGRESS_DIALOG_REMAINING: return tr("remaining");
|
||||
|
|
|
@ -394,7 +394,7 @@ void main_window::OnMissingFw()
|
|||
{
|
||||
const QString title = tr("Missing Firmware Detected!");
|
||||
const QString message = tr("Commercial games require the firmware (PS3UPDAT.PUP file) to be installed."
|
||||
"\n<br>For information about how to obtain the required firmware read the <a %0 href=\"https://rpcs3.net/quickstart\">quickstart guide</a>.").arg(gui::utils::get_link_style());
|
||||
"\n<br>For information about how to obtain the required firmware read the <a %0 href=\"https://rpcs3.net/quickstart\">quickstart guide</a>.").arg(gui::utils::get_link_style());
|
||||
|
||||
QMessageBox* mb = new QMessageBox(QMessageBox::Question, title, message, QMessageBox::Ok | QMessageBox::Cancel, this, Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint | Qt::WindowStaysOnTopHint);
|
||||
mb->setTextFormat(Qt::RichText);
|
||||
|
@ -405,7 +405,7 @@ void main_window::OnMissingFw()
|
|||
|
||||
connect(mb, &QDialog::accepted, this, [this]()
|
||||
{
|
||||
InstallPup();
|
||||
QTimer::singleShot(1, [this](){ InstallPup(); }); // singleShot to avoid a Qt bug that causes a deletion of the sender during long slots.
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -2852,6 +2852,7 @@ void main_window::CreateConnects()
|
|||
connect(dlg, &settings_dialog::EmuSettingsApplied, this, &main_window::NotifyEmuSettingsChange);
|
||||
connect(dlg, &settings_dialog::EmuSettingsApplied, this, &main_window::update_gui_pad_thread);
|
||||
connect(dlg, &settings_dialog::EmuSettingsApplied, m_log_frame, &log_frame::LoadSettings);
|
||||
dlg->setAttribute(Qt::WA_DeleteOnClose);
|
||||
dlg->open();
|
||||
};
|
||||
|
||||
|
|
|
@ -1247,7 +1247,16 @@ bool patch_manager_dialog::handle_json(const QByteArray& data)
|
|||
if (patch_engine::load(patches, "From Download", content, true, &log_message))
|
||||
{
|
||||
patch_log.notice("Successfully validated downloaded patch file");
|
||||
const std::string path = patch_engine::get_patches_path() + "patch.yml";
|
||||
|
||||
const std::string patches_path = patch_engine::get_patches_path();
|
||||
|
||||
if (!fs::create_path(patches_path))
|
||||
{
|
||||
patch_log.fatal("Failed to create path: %s (%s)", patches_path, fs::g_tls_error);
|
||||
return false;
|
||||
}
|
||||
|
||||
const std::string path = patches_path + "patch.yml";
|
||||
|
||||
// Back up current patch file if possible
|
||||
if (fs::is_file(path))
|
||||
|
|
|
@ -20,7 +20,7 @@ shortcut_handler::shortcut_handler(gui::shortcuts::shortcut_handler_id handler_i
|
|||
|
||||
const QKeySequence key_sequence = sc_settings.get_key_sequence(info, gui_settings);
|
||||
QShortcut* shortcut = new QShortcut(key_sequence, parent);
|
||||
shortcut->setAutoRepeat(false);
|
||||
shortcut->setAutoRepeat(info.allow_auto_repeat);
|
||||
|
||||
shortcut_key_info key_info{};
|
||||
key_info.shortcut = shortcut;
|
||||
|
|
|
@ -29,6 +29,9 @@ void fmt_class_string<shortcut>::format(std::string& out, u64 arg)
|
|||
case shortcut::gw_frame_limit: return "gw_frame_limit";
|
||||
case shortcut::gw_toggle_mouse_and_keyboard: return "gw_toggle_mouse_and_keyboard";
|
||||
case shortcut::gw_home_menu: return "gw_home_menu";
|
||||
case shortcut::gw_mute_unmute: return "gw_mute_unmute";
|
||||
case shortcut::gw_volume_up: return "gw_volume_up";
|
||||
case shortcut::gw_volume_down: return "gw_volume_down";
|
||||
case shortcut::count: return "count";
|
||||
}
|
||||
|
||||
|
@ -53,26 +56,29 @@ void fmt_class_string<shortcut_handler_id>::format(std::string& out, u64 arg)
|
|||
|
||||
shortcut_settings::shortcut_settings()
|
||||
: shortcut_map({
|
||||
{ shortcut::mw_start, shortcut_info{ "main_window_start", tr("Start"), "Ctrl+E", shortcut_handler_id::main_window } },
|
||||
{ shortcut::mw_stop, shortcut_info{ "main_window_stop", tr("Stop"), "Ctrl+S", shortcut_handler_id::main_window } },
|
||||
{ shortcut::mw_pause, shortcut_info{ "main_window_pause", tr("Pause"), "Ctrl+P", shortcut_handler_id::main_window } },
|
||||
{ shortcut::mw_restart, shortcut_info{ "main_window_restart", tr("Restart"), "Ctrl+R", shortcut_handler_id::main_window } },
|
||||
{ shortcut::mw_toggle_fullscreen, shortcut_info{ "main_window_toggle_fullscreen", tr("Toggle Fullscreen"), "Alt+Return", shortcut_handler_id::main_window } },
|
||||
{ shortcut::mw_exit_fullscreen, shortcut_info{ "main_window_exit_fullscreen", tr("Exit Fullscreen"), "Esc", shortcut_handler_id::main_window } },
|
||||
{ shortcut::mw_refresh, shortcut_info{ "main_window_refresh", tr("Refresh"), "Ctrl+F5", shortcut_handler_id::main_window } },
|
||||
{ shortcut::gw_toggle_fullscreen, shortcut_info{ "game_window_toggle_fullscreen", tr("Toggle Fullscreen"), "Alt+Return", shortcut_handler_id::game_window } },
|
||||
{ shortcut::gw_exit_fullscreen, shortcut_info{ "game_window_exit_fullscreen", tr("Exit Fullscreen"), "Esc", shortcut_handler_id::game_window } },
|
||||
{ shortcut::gw_log_mark, shortcut_info{ "game_window_log_mark", tr("Add Log Mark"), "Alt+L", shortcut_handler_id::game_window } },
|
||||
{ shortcut::gw_mouse_lock, shortcut_info{ "game_window_mouse_lock", tr("Mouse lock"), "Ctrl+L", shortcut_handler_id::game_window } },
|
||||
{ shortcut::gw_toggle_recording, shortcut_info{ "game_window_toggle_recording", tr("Start/Stop Recording"), "F11", shortcut_handler_id::game_window } },
|
||||
{ shortcut::gw_screenshot, shortcut_info{ "game_window_screenshot", tr("Screenshot"), "F12", shortcut_handler_id::game_window } },
|
||||
{ shortcut::gw_pause_play, shortcut_info{ "game_window_pause_play", tr("Pause/Play"), "Ctrl+P", shortcut_handler_id::game_window } },
|
||||
{ shortcut::gw_savestate, shortcut_info{ "game_window_savestate", tr("Savestate"), "Ctrl+S", shortcut_handler_id::game_window } },
|
||||
{ shortcut::gw_restart, shortcut_info{ "game_window_restart", tr("Restart"), "Ctrl+R", shortcut_handler_id::game_window } },
|
||||
{ shortcut::gw_rsx_capture, shortcut_info{ "game_window_rsx_capture", tr("RSX Capture"), "Alt+C", shortcut_handler_id::game_window } },
|
||||
{ shortcut::gw_frame_limit, shortcut_info{ "game_window_frame_limit", tr("Toggle Framelimit"), "Ctrl+F10", shortcut_handler_id::game_window } },
|
||||
{ shortcut::gw_toggle_mouse_and_keyboard, shortcut_info{ "game_window_toggle_mouse_and_keyboard", tr("Toggle Keyboard"), "Ctrl+F11", shortcut_handler_id::game_window } },
|
||||
{ shortcut::gw_home_menu, shortcut_info{ "gw_home_menu", tr("Open Home Menu"), "Shift+F10", shortcut_handler_id::game_window } },
|
||||
{ shortcut::mw_start, shortcut_info{ "main_window_start", tr("Start"), "Ctrl+E", shortcut_handler_id::main_window, false } },
|
||||
{ shortcut::mw_stop, shortcut_info{ "main_window_stop", tr("Stop"), "Ctrl+S", shortcut_handler_id::main_window, false } },
|
||||
{ shortcut::mw_pause, shortcut_info{ "main_window_pause", tr("Pause"), "Ctrl+P", shortcut_handler_id::main_window, false } },
|
||||
{ shortcut::mw_restart, shortcut_info{ "main_window_restart", tr("Restart"), "Ctrl+R", shortcut_handler_id::main_window, false } },
|
||||
{ shortcut::mw_toggle_fullscreen, shortcut_info{ "main_window_toggle_fullscreen", tr("Toggle Fullscreen"), "Alt+Return", shortcut_handler_id::main_window, false } },
|
||||
{ shortcut::mw_exit_fullscreen, shortcut_info{ "main_window_exit_fullscreen", tr("Exit Fullscreen"), "Esc", shortcut_handler_id::main_window, false } },
|
||||
{ shortcut::mw_refresh, shortcut_info{ "main_window_refresh", tr("Refresh"), "Ctrl+F5", shortcut_handler_id::main_window, false } },
|
||||
{ shortcut::gw_toggle_fullscreen, shortcut_info{ "game_window_toggle_fullscreen", tr("Toggle Fullscreen"), "Alt+Return", shortcut_handler_id::game_window, false } },
|
||||
{ shortcut::gw_exit_fullscreen, shortcut_info{ "game_window_exit_fullscreen", tr("Exit Fullscreen"), "Esc", shortcut_handler_id::game_window, false } },
|
||||
{ shortcut::gw_log_mark, shortcut_info{ "game_window_log_mark", tr("Add Log Mark"), "Alt+L", shortcut_handler_id::game_window, false } },
|
||||
{ shortcut::gw_mouse_lock, shortcut_info{ "game_window_mouse_lock", tr("Mouse lock"), "Ctrl+L", shortcut_handler_id::game_window, false } },
|
||||
{ shortcut::gw_toggle_recording, shortcut_info{ "game_window_toggle_recording", tr("Start/Stop Recording"), "F11", shortcut_handler_id::game_window, false } },
|
||||
{ shortcut::gw_screenshot, shortcut_info{ "game_window_screenshot", tr("Screenshot"), "F12", shortcut_handler_id::game_window, false } },
|
||||
{ shortcut::gw_pause_play, shortcut_info{ "game_window_pause_play", tr("Pause/Play"), "Ctrl+P", shortcut_handler_id::game_window, false } },
|
||||
{ shortcut::gw_savestate, shortcut_info{ "game_window_savestate", tr("Savestate"), "Ctrl+S", shortcut_handler_id::game_window, false } },
|
||||
{ shortcut::gw_restart, shortcut_info{ "game_window_restart", tr("Restart"), "Ctrl+R", shortcut_handler_id::game_window, false } },
|
||||
{ shortcut::gw_rsx_capture, shortcut_info{ "game_window_rsx_capture", tr("RSX Capture"), "Alt+C", shortcut_handler_id::game_window, false } },
|
||||
{ shortcut::gw_frame_limit, shortcut_info{ "game_window_frame_limit", tr("Toggle Framelimit"), "Ctrl+F10", shortcut_handler_id::game_window, false } },
|
||||
{ shortcut::gw_toggle_mouse_and_keyboard, shortcut_info{ "game_window_toggle_mouse_and_keyboard", tr("Toggle Keyboard"), "Ctrl+F11", shortcut_handler_id::game_window, false } },
|
||||
{ shortcut::gw_home_menu, shortcut_info{ "gw_home_menu", tr("Open Home Menu"), "Shift+F10", shortcut_handler_id::game_window, false } },
|
||||
{ shortcut::gw_mute_unmute, shortcut_info{ "gw_mute_unmute", tr("Mute/Unmute Audio"), "Shift+M", shortcut_handler_id::game_window, false } },
|
||||
{ shortcut::gw_volume_up, shortcut_info{ "gw_volume_up", tr("Volume Up"), "Shift++", shortcut_handler_id::game_window, true } },
|
||||
{ shortcut::gw_volume_down, shortcut_info{ "gw_volume_down", tr("Volume Down"), "Shift+-", shortcut_handler_id::game_window, true } },
|
||||
})
|
||||
{
|
||||
}
|
||||
|
|
|
@ -37,6 +37,9 @@ namespace gui
|
|||
gw_frame_limit,
|
||||
gw_toggle_mouse_and_keyboard,
|
||||
gw_home_menu,
|
||||
gw_mute_unmute,
|
||||
gw_volume_up,
|
||||
gw_volume_down,
|
||||
|
||||
count
|
||||
};
|
||||
|
@ -49,6 +52,7 @@ struct shortcut_info
|
|||
QString localized_name;
|
||||
QString key_sequence;
|
||||
gui::shortcuts::shortcut_handler_id handler_id{};
|
||||
bool allow_auto_repeat = false;
|
||||
};
|
||||
|
||||
class shortcut_settings : public QObject
|
||||
|
|
Loading…
Add table
Reference in a new issue